Re: pango layout in irregular (non-rectangular) bounding shape
- From: Behdad Esfahbod <behdad behdad org>
- To: august <august alien mur at>
- Cc: gtk-i18n-list gnome org
- Subject: Re: pango layout in irregular (non-rectangular) bounding shape
- Date: Mon, 02 Mar 2009 11:37:55 +0330
august wrote:
> hey y'all,
>
> I'm just getting started with cairo and pango and trying to figure
> out how to render text within a non-rectangular bounding shape? I
> can already render stuff to screen and bound a text segment by width
> and height....but still haven't figgered out how to translate it by
> x,y.
If you are using pango_cairo_show_layout(), you need a cairo_move_to() before
that.
> In addition, I'd like to render text inside a polygon shape.
This is not possible yet. Here is the bug tracking this issue:
http://bugzilla.gnome.org/show_bug.cgi?id=435706
> Can someone point me in the right direction? I've been reading the
> mailinglist archives and looking at the online api reference trying
> to figure this out. I've also started to inspect the Inkscape code
> to see how they do it....but can't yet see where.
>
> Do I need to iterate through the text segment, character by
> character, and draw each glyph to screen, measuring it's x and y?
> Is that slow?
No. Just do that one line at a time.
behdad
> Any help or pointers would be much appreciated.
>
> many thanks -august.
> _______________________________________________
> gtk-i18n-list mailing list
> gtk-i18n-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]