Lines Matching defs:ct
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(),
98 ink_cairo_set_source_rgba32(buf->ct, cl->rgba_background);
99 cairo_fill(buf->ct);
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);
231 SPCanvasText *ct = SP_CANVASTEXT(item);
233 ct->desktop = desktop;
235 ct->s = pos;
236 g_free(ct->text);
237 ct->text = g_strdup(new_text);
239 return ct;
244 sp_canvastext_set_rgba32 (SPCanvasText *ct, guint32 rgba, guint32 rgba_stroke)
246 g_return_if_fail (ct != NULL);
247 g_return_if_fail (SP_IS_CANVASTEXT (ct));
249 if (rgba != ct->rgba || rgba_stroke != ct->rgba_stroke) {
250 ct->rgba = rgba;
251 ct->rgba_stroke = rgba_stroke;
252 SPCanvasItem *item = SP_CANVAS_ITEM (ct);
261 sp_canvastext_set_coords (SPCanvasText *ct, gdouble x0, gdouble y0)
263 sp_canvastext_set_coords(ct, Geom::Point(x0, y0));
267 sp_canvastext_set_coords (SPCanvasText *ct, const Geom::Point start)
269 g_return_if_fail (ct && ct->desktop);
270 g_return_if_fail (SP_IS_CANVASTEXT (ct));
272 Geom::Point pos = ct->desktop->doc2dt(start);
274 if (DIFFER (pos[0], ct->s[Geom::X]) || DIFFER (pos[1], ct->s[Geom::Y])) {
275 ct->s[Geom::X] = pos[0];
276 ct->s[Geom::Y] = pos[1];
277 sp_canvas_item_request_update (SP_CANVAS_ITEM (ct));
282 sp_canvastext_set_text (SPCanvasText *ct, gchar const * new_text)
284 g_free (ct->text);
285 ct->text = g_strdup(new_text);
286 sp_canvas_item_request_update (SP_CANVAS_ITEM (ct));
290 sp_canvastext_set_number_as_text (SPCanvasText *ct, int num)
294 sp_canvastext_set_text(ct, number.str().c_str());
298 sp_canvastext_set_fontsize (SPCanvasText *ct, double size)
300 ct->fontsize = size;
304 sp_canvastext_set_anchor_manually (SPCanvasText *ct, double anchor_x, double anchor_y)
306 ct->anchor_pos_x_manual = anchor_x;
307 ct->anchor_pos_y_manual = anchor_y;
308 ct->anchor_position = TEXT_ANCHOR_MANUAL;