[cairo] [PATCH] _cairo_win32_surface_show_glyphs

Behdad Esfahbod behdad at behdad.org
Tue Jan 2 22:29:26 PST 2007


On Tue, 2006-12-12 at 18:21 -0500, Jonathan Watt wrote:
> 
> Here's a patch to fix a couple of bugs in
> _cairo_win32_surface_show_glyphs while 
> at the same time simplifying it to use a single ExtTextOut call using
> ETO_PDY 
> (as suggested by Stuart) instead of (potentially) multiple calls.

Hi Jonathan,

Since you've been hacking on this win32 font code, there are a couple of
changes I can suggest, to bring the win32 show_glyphs in par with the
latest changes I made in the show_glyphs API and the xlib surface.

First, since we were using stack buffers in a few places, I went on and
defined CAIRO_STACK_BUFFER_SIZE.  See cairo-xlib-surface.c for example.

Next, you may notice that the cairo_glyph_t* parameter to show_glyphs is
not const anymore.  This means, you are allowed to modify the contents
as long as you don't return CAIRO_STATUS_UNSUPPORTED.  So, you may want
to reuse that as one of your output buffers, dxy_buf for example.
Again, you can check cairo-xlib-surface.c for an example.

Regards,
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list