#436 closed defect (fixed)
Stylization: Modify rotation calculation to use atan
Reported by: | louisewatson | Owned by: | louisewatson |
---|---|---|---|
Priority: | medium | Milestone: | 2.0 |
Component: | Rendering Service | Version: | 2.0.0 |
Severity: | major | Keywords: | |
Cc: | External ID: | 1041451 |
Description
When lines are labeled, some of the labels are upside down making them hard to read.
Change History (3)
comment:1 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 17 years ago
Milestone: | 2.1 → 2.0 |
---|
Note:
See TracTickets
for help on using tickets.
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.