Page 1 of 1

SG node width/height wrong?

PostPosted: April 23rd, 2006, 6:38 pm
by HPW
I noticed that node-width and height contains values 1 pixel smaller than it has real on screen.

Also the demo with enabled grid-snap let me draw a rectangle on 8x8 and width/height 24x24 which is really 25x25.

Is this intentional by design or a bug?

PostPosted: April 24th, 2006, 7:30 am
by Kambiz
It's Windows behavior and depends on Pen.Style property.

PostPosted: April 24th, 2006, 7:44 am
by HPW
Kambiz wrote:It's Windows behavior and depends on Pen.Style property.


But with a solid line and 1 Pixel width schouldn't the border of a node not be completly included in width/height?

It shows for example (32,32) and is in fact 33,33.

Anyway, will it stay as it is in 2.61?

PostPosted: April 24th, 2006, 10:36 am
by Kambiz
Most of windows APIs exclude the bottom and right edges. For example, look at Rectangle Windows API help on MSDN.