Re: pango layout in irregular (non-rectangular) bounding shape

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

>   In addition, I'd like to render text inside a polygon shape. 

This is not possible yet.  Here is the bug tracking this issue:

> 	 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.


> 	 Any help or pointers would be much appreciated.
> 	 many thanks -august.
> _______________________________________________
> gtk-i18n-list mailing list
> gtk-i18n-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]