#496 closed task (fixed)
Fix inconsistent naming of units in stylization
Reported by: | waltweltonlair | Owned by: | waltweltonlair |
---|---|---|---|
Priority: | high | Milestone: | 2.1 |
Component: | General | Version: | 2.0.0 |
Severity: | minor | Keywords: | |
Cc: | External ID: | 1064832 |
Description
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
Change History (4)
comment:1 by , 17 years ago
Status: | new → assigned |
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 17 years ago
External ID: | → 1064832 |
---|
comment:4 by , 17 years ago
Merged fix into branch stream with submission https://trac.osgeo.org/mapguide/changeset/3125.
Fixed with submission https://trac.osgeo.org/mapguide/changeset/3085.