typemytype / drawbot

http://www.drawbot.com
Other
406 stars 63 forks source link

incorrect path.bounds (?) #434

Closed slobzheninov closed 3 years ago

slobzheninov commented 3 years ago

Hello! I was trying to get bounds of a path (made of path.text), but its width and height seem to be incorrect. On the screenshots, the S is path and the grey area is its bounds:

image

translating the path changes the bounds’s width and height:

image

Am I misunderstanding something or is it a bug? Thanks!

justvanrossum commented 3 years ago

The returned tuple is (xmin, ymin, xmax, ymax), sounds like you interpret it as (x, y, width, height).

(I see this is not documented clearly: we should improve that.)

slobzheninov commented 3 years ago

Thank you, yes I thought it was width and height indeed!