Note that there are already rulers in ArtRage that can be rotated and positioned as needed.
All stencils (and rulers) have three modes:
Stencil mode: Simple masking
Ruler Mode: The movement of your drawing tool is constrained by the edge of the stencil, and it also masks out your stroke.
Guide Mode: Like the ruler mode, but with no masking - so your strokes follow the path around the edge of the stencil.
Stencils can be scaled, rotated, and moved around as necessary. You can either use the Scale/rotate/move tool buttons at the bottom of the ArtRage window, or you can use left-click in combination with <space> to move, <ctrl> to rotate, and <alt> to zoom.
For template overlays, you can either load them as a tracing paper, or you can load them into a new layer, and set the layer opacity down (probably with a 'multiply' layer blending mode) to overlay your work area.
AndyRage's mantra for graphics engine code:
"Sure - how hard can it be?"