comparison src/shape_text.c @ 330:b0571f10c1b8

Use pango_cairo_layout_path() instead of pango_cairo_show_layout(). - pango_cairo_show_layout() will stroke and fill text. - We want shape itself add pathes to cairo context, but not stroke and fill. - redraw manager will apply paints (source surface) on cairo context before stroke and fill to get right color. - Using pango_cairo_show_layout() we can not apply stroke and fill color seperately. So, pango_cairo_layout_path() is used instead of.
author Thinker K.F. Li <thinker@branda.to>
date Fri, 06 Mar 2009 21:04:52 +0800
parents f894b30676e9
children b391722bf20e
comparison
equal deleted inserted replaced
329:740844ee48c4 330:b0571f10c1b8
259 printf("text=%s\n",text->data); 259 printf("text=%s\n",text->data);
260 } 260 }
261 static void draw_text(sh_text_t *text, cairo_t *cr) { 261 static void draw_text(sh_text_t *text, cairo_t *cr) {
262 sh_text_P_generate_layout(text, cr); 262 sh_text_P_generate_layout(text, cr);
263 cairo_move_to(cr, text->d_x, text->d_y); 263 cairo_move_to(cr, text->d_x, text->d_y);
264 pango_cairo_show_layout(cr,text->layout); 264 pango_cairo_layout_path(cr,text->layout);
265 } 265 }
266 266
267 267
268 void sh_text_draw(shape_t *shape, cairo_t *cr) { 268 void sh_text_draw(shape_t *shape, cairo_t *cr) {
269 draw_text((sh_text_t *)shape, cr); 269 draw_text((sh_text_t *)shape, cr);