Lines Matching refs:buf
28 static void sp_canvastext_render (SPCanvasItem *item, SPCanvasBuf *buf);
80 sp_canvastext_render (SPCanvasItem *item, SPCanvasBuf *buf)
84 if (!buf->ct)
87 cairo_set_font_size(buf->ct, cl->fontsize);
91 cairo_text_extents(buf->ct, cl->text, &extents);
93 cairo_rectangle(buf->ct, item->x1 - buf->rect.left(),
94 item->y1 - buf->rect.top(),
98 ink_cairo_set_source_rgba32(buf->ct, cl->rgba_background);
99 cairo_fill(buf->ct);
103 double offsetx = s[Geom::X] - cl->anchor_offset_x - buf->rect.left();
104 double offsety = s[Geom::Y] - cl->anchor_offset_y - buf->rect.top();
106 cairo_move_to(buf->ct, round(offsetx), round(offsety));
107 cairo_text_path(buf->ct, cl->text);
110 ink_cairo_set_source_rgba32(buf->ct, cl->rgba_stroke);
111 cairo_set_line_width (buf->ct, 2.0);
112 cairo_stroke_preserve(buf->ct);
114 ink_cairo_set_source_rgba32(buf->ct, cl->rgba);
115 cairo_fill(buf->ct);