On Wed, 2010-07-21 at 17:58 +0100, donn wrote:
> Robert,
> First-off, thanks for that great reply.
>
> Your assumption was correct — I am using the
> xxx.set_property('pick-with-alpha',True) and then cloning xxx.
>
> My use-case is mainly centered around CairoTexture actors. I get RSVG to
> do the drawing which has the side-effect of leaving me sans a path to
> use in a manual do_pick function. (Unless I am missing something in
> rsvg, but even-so I'd have to translate the path over to cogl drawing
> commands.)
(This might be a bit of an aside, but hopefully a useful one.)
I'm pretty sure what you're describing is a "shaped pick". I wrote a
recipe describing how to do this using ClutterPath a while back (see
http://bugzilla.clutter-project.org/show_bug.cgi?id=2120): basically you
store the custom actor's shape in a ClutterPath, which is then used in
the paint function to write using Cogl primitives; the same path doubles
up for the pick.
(Another alternative I didn't cover could have been writing the
ClutterPath onto a Cairo surface instead. But I don't know whether this
approach applies if you're using RSVG.)
It's not been incorporated into the cookbook, probably because Clutter's
path API is being rewritten to support 3D paths. But the patch attached
to that bug might give you some hints about how you might be able to do
this kind of in future.
Elliot
--
Elliot Smith
Intel Open Source Technology Centre
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list