On Tue, 2008-11-04 at 14:49 +0100, Leonard Ritter wrote: > On Tue, Nov 4, 2008 at 2:37 PM, Emmanuele Bassi > <[EMAIL PROTECTED]> wrote: > most of tidy is implementable in pure python. I removed the > tidy python > bindings because they were not compiled by default and because > tidy is a > moving target. pytidy will return later, as a separate module, > maybe > using gobject-introspection to cut down the pain of keeping > everything > in sync. > > TidyViewport is just a wrapper around the cogl_translate() > function, > which is wrapped in pyclutter as > clutter.cogl.translate(x,y,z). I > suggest you also have a look at GtkClutterViewport in > clutter-gtk trunk > on how to use GtkAdjustments with cogl_translate() and a > ClutterActor. > > emmanuele, thank you for your quick reply, but pierre-luc's response > has probably been confusing my original intention.
no, it hasn't. Pierre-Luc reply was exactly what you need. > at the moment, zooming is implemented by scaling the stage using > set_scale. why are you scaling the stage? the stage is the viewport: you should use a group and scale/translate that. > unfortunately, any mouse events sent still carry untransformed > coordinates, so i have to translate them properly before i can read > them. that kind of bugs me, but works. is there a simpler way for > achieving this? no, quite obviously. if you are applying transformations you will have to translate the points using Clutter's API. > also, i fail at implementing panning. the stages set_position, > set_anchor_point functions do not seem to work as i think they might. > what can i do here? use a Group. setting the anchor point and the position of the stage is obviously not going to work. > i am not interested in using tidy, neither do i want to incorporate > gtk or adjustments/scrollbars into the mix, only when it is really > neccessary. what options are left? can i use cogl_translate on the > stage to translate everything? *don't* translate the stage. use a group and apply transformations to the group. ciao, Emmanuele. -- Emmanuele Bassi, Intel Open Source Technology Center -- To unsubscribe send a mail to [EMAIL PROTECTED]
