[mapguide-trac] #436: Stylization: Modify rotation calculation
to use atan
MapGuide Open Source
trac_mapguide at osgeo.org
Tue Feb 12 11:34:23 EST 2008
#436: Stylization: Modify rotation calculation to use atan
-------------------------------+--------------------------------------------
Reporter: louisewatson | Owner: louisewatson
Type: defect | Status: closed
Priority: medium | Milestone: 2.1
Component: Rendering Service | Version: 2.0.0
Severity: major | Resolution: fixed
Keywords: | External_id: 1041451
-------------------------------+--------------------------------------------
Changes (by louisewatson):
* status: assigned => closed
* resolution: => fixed
Comment:
This problem was due to the fact that atan2 was being used to calculate
the rotation of the line labels based on the slope of the line. Atan2
takes two parameters, dx and dy, and considers the sign of each to return
values in any of the 4 quadrants.
The fix was to calculate the slope as dy/dx and pass to atan. Atan only
returns values in the first two quadrants.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/436#comment:2>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list