Re: Drawing glyph bounding box on rendered text?
- From: Behdad Esfahbod <behdad behdad org>
- To: Alex Kerr <alex phonething com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Drawing glyph bounding box on rendered text?
- Date: Mon, 09 May 2011 17:25:36 -0400
Try this instead:
> for (i = 0; i < pRun->glyphs->num_glyphs; i++)
> {
>
> pango_font_get_glyph_extents(font, glyphID, &glyphbox, NULL);
^^^^^^^^^^^^^^^
Note we are getting ink box now, not logical box.
> cairo_rectangle(context, glyphX + glyphbox.x, glyphY + glyphbox.y,
> glyphbox.width, glyphbox.height);
> cairo_stroke(context);
>
> glyphX += pango_to_ink * pRun->glyphs->glyphs[i].geometry.width;
> }
behdad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]