Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 82558
Status: open
Priority: 80/
Queue: Imager

People
Owner: Nobody in particular
Requestors: bill_foster [...] symantec.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.93
Fixed in: (no value)



Subject: polygon should include all endpoints
Download (untitled) / with headers
text/plain 541b
Most, if not all, drawing methods will include the endpoints, but polygon does not and it seems that it should to be consistent (and easier to use for my purposes). If I draw a polygon with endpoints at 1,1 1,10 10,10 10,1, I get a 9x9 box. If I draw a box with xmin=1 xmax=10 ymin=1 ymax=10, I get a 10x10 box. If I use polyline with the same args as polygon, I get a 10x10 box. I have tried to resolve my issue by drawing a polyline on top of polygon, but the ansi-aliasing causes problems. I am using Imager .93 with Perl 5.12. Thanks!
Subject: Re: [rt.cpan.org #82558] polygon should include all endpoints
Date: Fri, 11 Jan 2013 10:14:43 +1100
To: Bill via RT <bug-Imager [...] rt.cpan.org>
From: Tony Cook <tony [...] develop-help.com>
Download (untitled) / with headers
text/plain 942b
On Tue, Jan 08, 2013 at 03:30:55AM -0500, Bill via RT wrote: Show quoted text
> Most, if not all, drawing methods will include the endpoints, but > polygon does not and it seems that it should to be consistent (and > easier to use for my purposes). If I draw a polygon with endpoints at > 1,1 1,10 10,10 10,1, I get a 9x9 box. If I draw a box with xmin=1 > xmax=10 ymin=1 ymax=10, I get a 10x10 box. If I use polyline with the > same args as polygon, I get a 10x10 box. > > I have tried to resolve my issue by drawing a polyline on top of > polygon, but the ansi-aliasing causes problems. > > I am using Imager .93 with Perl 5.12.
polygon() won't ever include the end-points by default, but I may add an option in the future to do so. Doing that is complicated by having to modify the supplied polygon to wrap itself around the pixels, which may impose some limits on the supplied polygon, eg. points supplied in clock-wise order, no line crossing. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.