<FONT size=1>Having some trouble rendering now that I have added Pango to my existing Cairo implementation.<br>
<br>
<<<br>
#0 *INT_cairo_restore (cr=0x0) at cairo.c:397<br>
#1 0x00304f45 in pango_cairo_renderer_draw_glyphs (renderer=0xbb318a0, font=0xbb2d018, glyphs=0xbb33b90, x=0, y=37888)<br>
at pangocairo-render.c:360<br>
#2 0x008f3e00 in pango_renderer_draw_glyphs (renderer=0xbb318a0, font=0xbb2d018, glyphs=0xbb33b90, x=0, y=37888)<br>
at pango-renderer.c:629<br>
#3 0x008f4f70 in pango_renderer_draw_layout_line (renderer=0xbb318a0, line=0xbb30cc8, x=0, y=37888)<br>
at pango-renderer.c:559<br>
#4 0x008f51f1 in pango_renderer_draw_layout (renderer=0xbb318a0, layout=0xbb18770, x=0, y=0) at pango-renderer.c:186<br>
#5 0x003057d9 in _pango_cairo_do_layout (cr=0x88dca748, layout=0xbb18770, do_path=0) at pangocairo-render.c:670<br>
>><br>
<br>
The code correlating to the above is as follows . . .<br>
<br>
<<<br>
<FONT size=1>
<div>cairo_save (cr);</div>
<div>pango_layout_set_text (layout, utf8, -1);</div>
<div>cairo_set_source_rgba (cr, r, g, b, a);</div>
<div>pango_cairo_update_layout (cr, layout);</div>
<div>pango_layout_get_size (layout, &width, &height);</div>
<div>cairo_move_to (cr, m_dXPos+m_dXPosStart, m_dYPos+m_dYPosStart);</div>
<div><EM>pango_cairo_show_layout(cr, layout);</EM></div>
<div>cairo_restore (cr);<br>
<FONT size=2>>><br>
<br>
I know the cairo context is fine up to the call to pango_cairo_show_layout. Not sure how it becomes NULL at the point I get the segfault. I am using a cairo surface based on an external ARGB data buffer as shown below, this worked fine when using just cairo. Anyone have any suggestions?<br>
<br>
<<<br>
<FONT size=1><FONT size=1>surface = cairo_image_surface_create_for_data (pRGB32Buffer, CAIRO_FORMAT_ARGB32, width, height, width*4);</div>
<div></FONT><br>
cr = cairo_create(surface);<br>
</FONT><FONT size=1>fontmap = pango_cairo_font_map_get_default ();</div>
<div>layout = pango_cairo_create_layout (cr);</div>
<div></FONT>>><br>
<br>
Thanks,<br>
Bob<br>
</FONT></div>
</FONT></FONT><div id='u8CA5BEC692A52C8-12C0-FF1' class='aol_ad_footer'><FONT style="color: black; font: normal 10pt ARIAL, SAN-SERIF;"><HR style="MARGIN-TOP: 10px">Planning your summer road trip? Check out <A title="http://travel.aol.com/travel-guide/united-states?ncid=aoltrv00030000000015" href="http://travel.aol.com/travel-guide/united-states?ncid=aoltrv00030000000015" target="_blank">AOL Travel Guides</A>.</FONT> </div>