hello Matthias, thank you for your answer, and looking forward the next commits then! Have a nice week. Pierre
On 17 sept. 08, at 11:37 am, Nitro wrote: > Am 17.09.2008, 10:13 Uhr, schrieb Pierre Schmidt > <[EMAIL PROTECTED]>: > >> On Wed, Sep 17, 2008 at 8:09 AM, Christopher Barker >> <[EMAIL PROTECTED]> wrote: >>> Pierre Schmidt wrote: >>>> I used the tip that you provided, but applied the transform >>>> matrix to >>>> the root node of the canvas. >>>> >>>> floatcanvas2.NavCanvas.__init__(self, parent) ### in the context of >>>> subclassing NavCanvas >>>> matrix = np.eye(3,3) >>>> matrix[1,1] =-1 >>>> y_up_transform = >>>> floatcanvas2.math.transform.LinearTransform2D(matrix >>>> = matrix) >>>> self.root.transform = y_up_transform >>>> >>>> I'm not sure it is the same as applying it to the canvas as you >>>> indicate at the end of your email, but I think every child of the >>>> root >>>> node will inherit this transform. >>> >>> I think so too. In fact, there may be no way to apply it to the >>> canvas >>> -- I think the root node is the way to go -- I"m still learning it >>> too! >>> >>> Is it working the way you want now? >> >> Yes, it's working just like you described, thank you! > > I'm a bit late, here's my answer: > > The linear transform thing is exactly what's required, you can do it > simpler by doing self.root.scale = (1, -1) though. This will invert > the > y-axis. Another way to turn things upside down is canvas.camera.zoom > = (1, > -1) or canvas.camera.scale = (1, -1). I don't know if the negative > camera > zoom makes the zoomToExtends function useless though. > On your question regarding the origin: By default the world (0,0) > origin > is centered on the viewport. So if you're viewport is 800x600 it will > appear at (400, 300). I've worked on some code which makes this > configurable (either using the default locations like "tl" or "cc" or > plugging in a custom origin). These changes are not ready yet for svn > though and only exist in my local working copy. > > -Matthias > _______________________________________________ > FloatCanvas mailing list > [email protected] > http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
