Hello,
On 01/27/2011 03:34 AM, Romain Janvier wrote:
Hi,
first sorry for my bad english...
For archeological purpose, i'm trying to implement a kind of
vectorial drawing tool with clutter.
In my clutter's stage i have a clutterGroup (my viewport) which
contain a photo. I can add some "points" (a custom clutterActor) to
this Cluttergroup (the viewport). The problem came when I tried to
implement zoom.
I want to zoom in/out the photo but not the "points" which must
have a constant size and a constant position relative to the photo.
I've tried two things but I've got some issues with both
-scaling the clutterGroup : the relative position is ok, but the
"points" are resized too (the transormed size change)
-scaling ONLY the photo : the points' size is ok, but now the
relative position change.
Could you please tell me what's the best way to implement this
kind of zoom ?
If I understand correctly, you need to reposition the points every time
the photo is scaled. For this, you could connect a handler to the
photo's "notify" signal and do the repositioning when "scale-x" and
"scale-y" have a new value. I believe another option is to implement
your own constraint that binds the photo's scaling to the points' positions:
http://docs.clutter-project.org/docs/clutter/stable/ClutterConstraint.html#ClutterConstraint-implementation
These are options, I don't claim they are the most efficient ones :)
Dio.-
Regards,
Romain
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list