[cairo] Pango and pixbuf

Ignas B. ignohp at gmail.com
Tue Jan 9 10:08:32 PST 2007


Is there a gtk equivalent equivalent for cairo_image_surface_create_for_data
?

Some of the platforms im working with does not have cairo.

Thank you.

Ignas


On 1/9/07, Carl Worth <cworth at cworth.org> wrote:
>
> On Tue, 9 Jan 2007 16:40:39 +0000, "Ignas B." wrote:
> > is it possible to draw text not in to GdkDrawable but into GdkPixbuf?
>
> What's the eventual goal for that?
>
> In general GdkPixbuf is an inefficient thing to draw _into_, and
> should be avoided. GdkPixbuf is still useful as a way to load images
> of many formats, so it's useful to use GdkPixbuf as a source to get
> image data _from_ but not much after that.
>
> What I wonder is if you've got some API that wants a GdkPixbuf and
> nothing else. If so, that API should probably be fixed to work with a
> cairo_surface_t or so.
>
> > If there is no direct function for that, would it be possible to extract
> > pixel data from the PangoLayout ?
>
> You can definitely use cairo_image_surface_create_for_data, then
> cairo_create to target that surface and render your PangoLayout into
> there. That gives you direct access to all the pixel data.
>
> -Carl
>
>
>


-- 
Mane galima pasiekti:
ignohp at hotmail.com
ignohp at yahoo.com
ignohp at gmail.com
ibudvytis at acm.org
ibudvytis at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20070109/17c79785/attachment.html


More information about the cairo mailing list