Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 64889
Status: rejected
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: KWittrock [...] web.de
Cc:
AdminCc:

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



Subject: Bug in $canvas->createRectangle
Date: Tue, 18 Jan 2011 17:28:55 +0100
To: bug-Tk [...] rt.cpan.org
From: "K. Wittrock" <KWittrock [...] web.de>
The attached program shows a problem with $canvas->createRectangle: The displayed rectangle is correct with option -width => 1. Whenever -width is increased by 1, the total width of the rectangle is increased by 1, while the interior is reduced by 1. Please remember that option -width sets the line width of the outline, not the width of the rectangle itself. The values returned by method coords are correct, but the display is wrong. I also include a section of a screendump taken from a magnified view of the canvas. Version info: OpenSuse 11.1, perl v5.10.0 built for x86_64-linux-thread-multi, $Tk::VERSION 804.028. Windows XP with SP3, perl v5.10.1 built for MSWin32-x86-multi-thread, $Tk::VERSION 804.028. Kind regards Klaus Wittrock
Download tst_canv-rect2.jpg
image/jpeg 3.6k

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #64889] Bug in $canvas->createRectangle
Date: Wed, 19 Jan 2011 15:04:49 +0100
To: bug-Tk [...] rt.cpan.org
From: "K. Wittrock" <KWittrock [...] web.de>
I extended my demo program and then I saw my misunderstanding. I took it for granted that the outline of a rectangle is inside the rectangle's area. Actually the rectangle is implemented as a special case of a polygon. So nearly everthing works as designed. The only exception concerns -width => 0. I don't see any reason why the interior shouldn't cover the whole rectangle in this case. On the other hand, the current implementation fits to the rule that reducing the width by 1 will increase the width of the interior by 1. And as a workaround I can use the default -width => 1 and set the outline color equal to the fill color. Please remove my bug report from the bug list. I apologize for any inconvenience caused. Kind regards Klaus Wittrock
Le Mer 19 Jan 2011 09:05:10, KWittrock@web.de a écrit : Show quoted text
> I extended my demo program and then I saw my misunderstanding. I took > it for granted that the outline of a rectangle is inside the > rectangle's area. Actually the rectangle is implemented as a > special case of a polygon. So nearly everthing works as designed. > > The only exception concerns -width => 0. I don't see any reason why > the interior shouldn't cover the whole rectangle in this case. On > the other hand, the current implementation fits to the rule that > reducing the width by 1 will increase the width of the interior by > 1. And as a workaround I can use the default -width => 1 and set > the outline color equal to the fill color. > > Please remove my bug report from the bug list. I apologize for any > inconvenience caused. > > Kind regards > > Klaus Wittrock > >
well !