Ticket #11769 (closed defect: fixed)
wxPython GraphicsContext.Scale moves (0, 0)
|Reported by:||steveward||Owned by:||csomor|
|Keywords:||GraphicsContext Scale wxMac wxMSW||Cc:||ward@…, csomor|
Presumably a call to GraphicsContext.Scale(xscale, yscale) should scale subsequently drawn graphics but should not move the origin, (0,0). I've
found that a Scale call does seem to move the origin for subsequent graphics, at least on OSX 10.6.2 using the current binary wxpython distribution.
The attached program draws a simple graphic at (0, 0) in a gc, then scales the gc and re-draws the graphic. The two versions are misaligned by a few pixels; the offset seems proportional to the args to Scale, but the constant of proportionality isn't obvious.
The matrix reports that (0, 0) has not been moved, but for some reason the
origin of the graphics move. Is there some kind of margin that's scaled and offsets the graphics?
In any case this seems like a bug, but apologies if I'm doing something stupid.
I've attached the little test program and a screen shot of its window.