13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LyDxDyLogical-coordinate system y-coordinateDevice x-coordinateDevice y-coordinateThe following four ratios are scaling factors:xVE/xWEyVE/yWExWE/xVEyWE/yVEThey are used to determine the necessary stretching orcompressing of logical units. The subtraction and addition ofviewport and window origins is referred to as the translationalcomponent of the equation.Example:MM_TEXTFigure 2.5Mapping with MM_TEXTThe default mapping mode is MM_TEXT. In this mapping mode,one logical unit is mapped to one pixel on the device or display.A simple Windows application created three rectangles as theyappear in the logical and physical coordinate spaces whenMM_TEXTis the mapping mode, as shown in Figure 2.5. Thedrawing on the left illustrates the logical space; the drawing onthe right illustrates the device, or physical, space. The rectanglesappear vertically elongated in the physical space because pixelson the chosen display are longer than they are wide. Therectangles appear to be upside-down because positive y extendsdownward in the physical-coordinate system.Logical Coordinate Systemy-axis(+), •Physical Coordinate SystemOrigin- - - - - - - - - - - .. x-axis(+)..,---- ... ---(-) 'Origin(-) ,t- - - .. x-axis(+)(+r'y-axis104Software development kit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!