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
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 541
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!
From tony [...] develop-help.com Thu Jan 10 18: 14:53 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-5.592 tagged_above=-99.9 required=10 tests=[AWL=1.307, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-26357-1357633854-1924.82558-4-0 [...] rt.cpan.org>
Content-Disposition: inline
X-Spam-Flag: NO
References: <RT-Ticket-82558 [...] rt.cpan.org> <rt-3.8.HEAD-26357-1357633854-1924.82558-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20130110231443.GA20702 [...] mars.tony.develop-help.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.592
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 40F5624045D for <cpan-bug+Imager [...] hipster.bestpractical.com>; Thu, 10 Jan 2013 18:14:53 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6XbedrXTwCpI for <cpan-bug+Imager [...] hipster.bestpractical.com>; Thu, 10 Jan 2013 18:14:51 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 664002400D4 for <bug-Imager [...] rt.cpan.org>; Thu, 10 Jan 2013 18:14:50 -0500 (EST)
Received: (qmail 17762 invoked by uid 103); 10 Jan 2013 23:14:50 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 10 Jan 2013 23:14:50 -0000
Received: from 202-154-105-237.people.net.au (HELO mars.tony.develop-help.com) (202.154.105.237) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Thu, 10 Jan 2013 15:14:47 -0800
Received: from mars.tony.develop-help.com (localhost [127.0.0.1]) by mars.tony.develop-help.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0ANEh5o001649 for <bug-Imager [...] rt.cpan.org>; Fri, 11 Jan 2013 10:14:43 +1100
Received: (from tony [...] localhost) by mars.tony.develop-help.com (8.14.3/8.14.3/Submit) id r0ANEhpj001594 for bug-Imager [...] rt.cpan.org; Fri, 11 Jan 2013 10:14:43 +1100
Delivered-To: cpan-bug+Imager [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #82558] polygon should include all endpoints
User-Agent: Mutt/1.5.20 (2009-06-14)
Return-Path: <tony [...] develop-help.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Imager [...] hipster.bestpractical.com
X-RT-Mail-Extension: imager
Date: Fri, 11 Jan 2013 10:14:43 +1100
X-Spam-Level:
To: Bill via RT <bug-Imager [...] rt.cpan.org>
From: Tony Cook <tony [...] develop-help.com>
RT-Message-ID: <rt-3.8.HEAD-20915-1357859694-1696.82558-0-0 [...] rt.cpan.org>
Content-Length: 942
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.