CODRulerWrapper_T::PrepareRulerDC
voidCODRulerWrapper_T::PrepareRulerDC(CDC*pDC, const intnOrientation)
Prepare a device context for either the horizontal or vertical ruler.
Defined in: OdRulerWrapper.h
Return Value
void
Parameters
pDC
Pointer to device context to draw onto.
nOrientation
Indicates whether to prepare the device context for the horizontal or vertical ruler.
Comments
Preparing a DC for drawing the rulers is slightly different than the general case of preparing a DC for the viewport. First, the class MvcWrapper_T offsets the viewport origin so that the logical point (0,0) starts past the margins. The rulers must be drawn within the margins, so this function subtracts the margin value back out of the viewport origin so that the rulers can be at logical (0,0) and still draw in the margins. Zooming is also a special consideration. For the horizontal ruler, the zoom factor should only affect the X axis. For the vertical ruler, the zoom factor should only affect the Y axis.See Also