#2868 closed defect (fixed)
agg rendering offset x -99 lines trouble
Reported by: | szigeti | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 5.4 release |
Component: | AGG | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | agg offset |
Cc: | tbonfort |
Description
There are adjacent lines of direction dx/dy==2 (probably also 1/2, -1/2 or -2) in the same shape object. E.g.: FEATURE POINTS 0 0 200 100 300 150 END END
.
Offset style is used with y=-99.
This scenario may turn the agg renderer into long (probably infinite) loop.
The attached mapfile contain various examples (commented out) related to this bug.
Attachments (2)
Change History (11)
by , 15 years ago
Attachment: | linetest.map added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
http://trac.osgeo.org/mapserver/attachment/ticket/2868/maputils.patch
I have introduced some vector primitives (pointObj functions), e.g., addition subtraction, resize, rotation, etc. and have rewritten the msOffsetPolyline
function. Feel free to to apply this changes to the trunk in your own coding style.
Note that for the sake of simplicity I have used the type pointObj everywhere insead vectors - in fact point - point = vector, point + vector = point, vector + vector = vector, etc.
comment:3 by , 15 years ago
Component: | MapServer C Library → AGG |
---|---|
Owner: | changed from | to
comment:4 by , 15 years ago
Cc: | added |
---|
comment:5 by , 15 years ago
Cc: | added; removed |
---|---|
Owner: | changed from | to
Seems to work ok, want to look things over before committing...
Steve
comment:6 by , 15 years ago
Status: | new → assigned |
---|
comment:7 by , 15 years ago
Milestone: | → 5.4 release |
---|
follow-up: 9 comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The limited testing I did was successful (perhaps GD should use this too). I did just a bit of format clean up and committed in time for beta 2 (r8613). Thanks for the patch!
Can I assume all contributions are legally unencumbered (i.e. yours to make) and are now covered by the MapServer license?
Steve
comment:9 by , 15 years ago
Replying to sdlime:
Can I assume all contributions are legally unencumbered (i.e. yours to make) and are now covered by the MapServer license?
Yes, of course, and moving the vector helper functions into mapprimitive.c is also a good idea. But these vector primitives are certainly implemented in other libs as well. Just to avoid redundancy:)
My home-made bugfix: set
float par=0.7071
instead of 0.71 for better sqrt(0.5) approximation inshapeObj* msOffsetPolyline(shapeObj *p, double offsetx, double offsety)
function (maputil.c).Note, it is not the best overall solution, but for me it works:)