[cairo] [PATCH] Enable links to image files in SVG backend

Alexander Shulgin alex.shulgin at gmail.com
Sun Jan 3 23:44:55 PST 2010


On Fri, Jan 1, 2010 at 12:07, Kouhei Sutou <kou at cozmixng.org> wrote:
> Hi,
>
> In <4B3DC232.4060109 at redneon.com>
>  "Re: [cairo] [PATCH] Enable links to image files in SVG backend" on Fri, 01 Jan 2010 20:06:50 +1030,
>  Adrian Johnson <ajohnson at redneon.com> wrote:
>
>> Alexander Shulgin wrote:
>>> [1] Again, I'm doing my stuff in Ruby, and I found no way to obtain
>>> necessary image data from JPEG file to feed to
>>> cairo_image_surface_create_for_data().  Using gdk-pixbuf is of no help
>>> as it gives BGR instead of RGB expected by cairo (or vice-versa).
>
> rcairo can render a Gdk::Pixbuf:
>
>  context.save do
>    context.set_source_pixbuf(pixbuf, 0, 0)
>    context.paint
>  end

Thanks for the tip.  I didn't try it with Gdk's CairoContext, so was
unaware of this possibility.

--
Alex


More information about the cairo mailing list