Dear Yaser,

I had not thought other value except pre-defined type.

I also checked it works fine when I passed "0" to ClutterTextureFlags.


Thank you for your comment.

BR. Rubric



2009/5/13 Yaser Hameed (RBEI/ECA3) <[email protected]>

>  Hi
>
> This works for me
>
>
>                     ClutterActor *newTexture = clutter_texture_new( );
>
>                     // pixbuf_icon is the gdkpixbuf
>
>                     clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE(
> newTexture),
>                         gdk_pixbuf_get_pixels(pixbuf_icon),
>                         gdk_pixbuf_get_has_alpha(pixbuf_icon),
>                         gdk_pixbuf_get_width(pixbuf_icon),
>                         gdk_pixbuf_get_height(pixbuf_icon),
>                         gdk_pixbuf_get_rowstride(pixbuf_icon),
>                         gdk_pixbuf_get_n_channels(pixbuf_icon),
>                         0,
>                         &error);
>
> *Yaser Hameed*
> ------------------------------
> *From:* Rubric [mailto:[email protected]]
> *Sent:* Wednesday, 13. May 2009 1:01 PM
> *To:* Kan-I Jyo
> *Cc:* Jianchun Zhou; [email protected]
> *Subject:* Re: [clutter] Where is set_pixbuf method in clutter.Texture?
>
> Hi All.
>
> I used clutter_texture_set_from_rgb_data with CLUTTER_TEXTURE_RGB_FLAG_BGR
> flag in order to set bitmap data from gdk pixbuf.
>
> But texture has reversed color since CLUTTER_TEXTURE_RGB_FLAG_BGR means
> COGL_BGR_BIT internally.
>
> In my opinion, clutter texture should support more ClutterTextureFlags like
> CLUTTER_TEXTURE_RGB_FLAG_RGB.
>
>
> Isn't there anyone who is using clutter texture from gdk pixbuf?
>
>
> Thank you.
>
> BR. Rubric.
>
>
> 2009/5/11 Kan-I Jyo <[email protected]>
>
>> Dear Jianchun,
>>
>> 2009/5/11 Jianchun Zhou <[email protected]>:
>> >
>> > I found in pyclutter version 0.8.0, the method set_pixbuf in
>> clutter.Texture
>> > is removed, why?
>>
>> It looks like that this is a result of API change for ClutterTexture is
>> capable
>> of loading images without exposing GdkPixbuf API since 0.8.
>>
>> You may want to take a look a look at Bassi's comment in the following
>> mail.
>>
>> http://lists.o-hand.com/clutter/1937.html
>>
>> --
>> Sincerely,
>>
>> Jyo
>> --
>> To unsubscribe send a mail to 
>> [email protected]<clutter%[email protected]>
>>
>>
>

Reply via email to