Re: canvas overlapping bug?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: canvas overlapping bug?

From: Aleks <vuje@ifg.uni-hannover.de>
Date: Thu Dec 01 2005 - 11:29:24 CET

Andreas Leitgeb schrieb:
> Aleks <vuje@ifg.uni-hannover.de> wrote:
>
>>I've noticed following behaviour with canvas overlapping which is at
>>least unexpected to me.
>>.c create oval 100 100 100 100 -outline red
>
>
> oh boy, why create an oval item, when you need a single point? ;-)

There are some special circumstances that led to this idea...
I'm now using a line with some width and capstyle round to display a point.

> Usually, ovals don't include the corner points used to place them.
> a 1-sized oval could be expected to be one pixel on the canvas,
> but it isn't. Actually it is drawn as 4 pixels, but what its
> actual size is, can only be found by trial&error
>
> % .c find overlapping 100.5 100 100.5 100
> % .c find overlapping 100 100.5 10 100.5
> both find the oval!

> strangely, some other coordinates that I thought
> would have to ly on the oval didn't, not even
> when I used a filled oval.
>
> I can't tell if this can be seen as a bug or not.
>

I'd say it's bug. If you query the coords of an object and use the
result to look what's overlapping it you should find the object.

It is also not consistent with other items. I've tested arc, line and
rectangle items with 1px which all are found.
Received on Sat Dec 3 03:28:35 2005