Opened 19 years ago

Closed 13 years ago

#1376 closed defect (wontfix)

symbols out of whack

Reported by: ken.boss@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: 4.6
Severity: normal Keywords:
Cc: gabrielram@…

Description (last modified by tbonfort)

With the addition of MINWIDTH and MAXWIDTH parameters for symbols, 'circle'
symbols of traditional definition go awry when SYMBOLSCALE is set.  I think you
were going to throw in a couple of lines setting defaults for those params so
that default behavior would stay the same as previous versions.

Attachments (2)

test.c (1.1 KB ) - added by sdlime 19 years ago.
Test program showing GD ellipse drawing problems.
test.png (160 bytes ) - added by sdlime 19 years ago.
Test.c output…

Download all attachments as: .zip

Change History (8)

comment:1 by ken.boss@…, 19 years ago

MINSIZE 1 results in disappearing circle symbols at small scales, even though
they're "in scale" (i.e., no degenerate single-pixel symbol).  Must use MINSIZE
2 or greater.

With MINSIZE 2, circle symbols are more like short vertical lines than circles
at small scales.




comment:2 by sdlime, 19 years ago

Status: newassigned
There looks to be problems in the GD ellipse drawing code, still testing that.
Circles with w/h of 1 don't produce anything. I also found that w/h of 2
produces just a single 2 pixel long vertical line, w/h 3 gives a 3x3 rectangle
which might be ok. W/h 4 is ok on the top but fills too many pixels on the
bottom. From 5 up it's ok. This is not related to the width parameter but to
using the GD ellipse drawing code as opposed to drawing an arc and flood filling.

I've fixed the 1x1 case with an explicit test and pixel draw.

Steve

by sdlime, 19 years ago

Attachment: test.c added

Test program showing GD ellipse drawing problems.

by sdlime, 19 years ago

Attachment: test.png added

Test.c output...

comment:3 by sdlime, 19 years ago

I can confirm that the problems lie with GD. It doesn't handle even size circles
(didn't try ellipses) correctly. They end up being 1 pixel too tall. GD does not
render 1x1 circles as a single pixel as it should.

I added trivial cases to deal with 1x1 and 2x2 sized circles. Will follow up
with the GD folks and file a bug. Will close once I commit to the 4.6 branch too.

Steve

comment:4 by sdlime, 19 years ago

Cc: gabrielram@… added

comment:5 by sdlime, 19 years ago

*** Bug 1186 has been marked as a duplicate of this bug. ***

comment:6 by tbonfort, 13 years ago

Description: modified (diff)
Resolution: wontfix
Status: assignedclosed

workaround is to use agg renderer, as rendering small circles makes no sense for an integer based renderer.

Note: See TracTickets for help on using tickets.