On Wed, 2008-02-27 at 13:36 +0000, Matthew Allum wrote:
> Hi;
>
> On Wed, 2008-02-27 at 14:25 +0100, Murray Cumming wrote:
> >
> > Ah. Now I feel less confused.
> >
> > This ID-to-color stuff doesn't need to be done by the pick()
> > implementation right? Whatever color pick() uses to paint(), everything
> > will actually be painted in this special color?
> >
>
> Right the color to use is passed in the pick method. Also check the
> source of clutter_actor_paint().
Does that mean that these pick() implementations are wrong, because they
call the paint() function, which presumably uses the wrong colors, and
sometimes _only_ call the paint() function:
static void
tidy_frame_pick (ClutterActor *actor,
const ClutterColor *pick_color)
{
/* chain up, so we get a box with our coordinates */
CLUTTER_ACTOR_CLASS (tidy_frame_parent_class)->pick (actor,
pick_color);
/* paint our child, if any */
if (CLUTTER_ACTOR_IS_MAPPED (actor))
{
TidyFramePrivate *priv = TIDY_FRAME (actor)->priv;
if (priv->child && CLUTTER_ACTOR_IS_MAPPED (priv->child))
clutter_actor_paint (priv->child);
}
}
static void
tidy_scroll_view_pick (ClutterActor *actor, const ClutterColor *color)
{
gint x, y, width, height;
TidyScrollViewPrivate *priv = TIDY_SCROLL_VIEW (actor)->priv;
/* Paint a background */
cogl_color (color);
x = CLUTTER_UNITS_TO_INT (priv->box.x1);
y = CLUTTER_UNITS_TO_INT (priv->box.y1);
width = CLUTTER_UNITS_TO_INT (priv->box.x2) - x;
height = CLUTTER_UNITS_TO_INT (priv->box.y2) - y;
cogl_rectangle (x, y, width, height);
tidy_scroll_view_paint (actor);
}
static void
tidy_notebook_pick (ClutterActor *self,
const ClutterColor *color)
{
tidy_notebook_paint (self);
}
--
[EMAIL PROTECTED]
www.murrayc.com
www.openismus.com
>
--
To unsubscribe send a mail to [EMAIL PROTECTED]