Re: clutter-list Digest, Vol 10, Issue 3



Hi,
We are pursuing using a cogl clip path with cogl_path_round_rectangle to do the rounded rect shape.  However, after having difficulty combining a rounded rect effect with a border effect and (our) gradient content and image content so they all work together we are changing to making a clutter-actor subclass with a rounded rect property (and other properties we need) and overridden paint routine.

As an effect the rounded rect, using a clipping region set before the continue paint routine and popped afterwards, would clip out any children of the actor that were not in its allocation.  If instead the effect completely replaced the drawing of the root actor it required having conditional code for Image content, solid color content, and gradient content.

The documentation warns against overriding the paint() routine in favor of paint_node().  But I may have to override paint() to achieve what we need.  For example image and (our) gradient content draw rectangular areas.  To avoid overriding paint() the content would have to be made aware of the shape of the actor since paint_node() is called after content is already drawn in clutter_actor_paint_node().  It would seem better just to override paint and do everything there. 

Any alternate suggestions would be appreciated.




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