Re: non rectangular cairo shape as an Actor in 1.12



On 11 December 2012 16:34, Johannes Deutsch <j_deutsch web de> wrote:
i have just the same question as Veli Ogla Sungutay [1]. I want to
create an actor with arbitrary geometry via cairo. To achieve this i
set the content of a ClutterActor to a ClutterCanvas. The draw signal
is connected to a callback that draws the image with the use of cairo
(like explained in the reference).

But only the non-transparent parts of the Actor should be reactive to
button-.*-event's .

The cookbook for 1.12 has a recipe for creating a star-shaped actor using a Cogl path. This has the properties you're looking for: the actor has the shape of the path and only responds to events occurring within the bounds of that shape.

The recipe is called "Creating an actor with a non-rectangular shape". Unfortunately, the Clutter docs site seems to be unavailable right now, but the Clutter source has the raw XML which is readable (doc/cookbook/actors.xml).

Elliot
Â

Unfortunately the reference's entry to
clutter_texture_set_pick_with_alpha doesn't link to an alternative.

Probably the developers didn't reject the feature but find a more
elegant way to achieve this. Maybe someone of you experts can give me a
hint of how to achieve this in clutter 1.12!

With best regards and thanks for your time

Johannes Deutsch

[1]
http://www.mail-archive.com/clutter-app-devel-list clutter-project org/msg00541.html
_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list



--
Elliot Smith
Senior Software Engineer
Intel Open Source Technology Centre


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]