[mapguide-trac] #496: Fix inconsistent naming of units in stylization
MapGuide Open Source
trac_mapguide at osgeo.org
Tue Mar 11 18:49:46 EDT 2008
#496: Fix inconsistent naming of units in stylization
------------------------------+---------------------------------------------
Reporter: waltweltonlair | Owner: waltweltonlair
Type: task | Status: new
Priority: high | Milestone: 2.1
Component: General | Version: 2.0.0
Severity: minor | Keywords:
External_id: |
------------------------------+---------------------------------------------
Stylization code uses terms like "pixels", screen units", and "rendering
units" inconsistently, which leads to confusion when working with the
code. For example, the SE_Renderer class defines a virtual method named
!GetPixelsPerMillimeterScreen. This is supposed to return the number of
native renderer units per millimeter in device space. For some renderers
(AGG, GD) the native units are indeed normal device pixels, but for other
renderers (DWF) the native units are W2D units and not pixels.
The SE_Renderer API also defines low level rendering methods:
!DrawScreenPolyline, !DrawScreenText, etc. These take native renderer
units as arguments, and hence "screen units" are the native renderer
units.
The following changes need to be made:
* code needs to be updated everywhere to use "screen units" when working
with native renderer units
* the word "pixel" should only be used when referring to actual physical
pixels
* !GetPixelsPerMillimeterScreen will be renamed to
!GetScreenUnitsPerMillimeterDevice
* !GetPixelsPerMillimeterWorld will be renamed to
!GetScreenUnitsPerMillimeterWorld
--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/496>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list