From e9cec1110c7abef2d7c89161ca07d2819a7bdff1 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Mon, 28 May 2012 00:27:39 -0700 Subject: Cleanup of measure text for moving away from overlap. (bzr r11430) --- src/display/canvas-text.cpp | 5 ++--- src/display/canvas-text.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/display') diff --git a/src/display/canvas-text.cpp b/src/display/canvas-text.cpp index f7a8713b6..c7ca4ab16 100644 --- a/src/display/canvas-text.cpp +++ b/src/display/canvas-text.cpp @@ -255,8 +255,7 @@ sp_canvastext_update (SPCanvasItem *item, Geom::Affine const &affine, unsigned i item->canvas->requestRedraw((int)item->x1, (int)item->y1, (int)item->x2, (int)item->y2); } -SPCanvasItem * -sp_canvastext_new(SPCanvasGroup *parent, SPDesktop *desktop, Geom::Point pos, gchar const *new_text) +SPCanvasText *sp_canvastext_new(SPCanvasGroup *parent, SPDesktop *desktop, Geom::Point pos, gchar const *new_text) { // Pos specifies the position of the anchor, which is at the bounding box of the text itself (i.e. not at the border of the filled background rectangle) // The relative position of the anchor can be set using e.g. anchor_position = TEXT_ANCHOR_LEFT @@ -270,7 +269,7 @@ sp_canvastext_new(SPCanvasGroup *parent, SPDesktop *desktop, Geom::Point pos, gc g_free(ct->text); ct->text = g_strdup(new_text); - return item; + return ct; } diff --git a/src/display/canvas-text.h b/src/display/canvas-text.h index ecdb77f1c..b779d7170 100644 --- a/src/display/canvas-text.h +++ b/src/display/canvas-text.h @@ -58,7 +58,7 @@ struct SPCanvasTextClass : public SPCanvasItemClass{}; GType sp_canvastext_get_type (void); -SPCanvasItem *sp_canvastext_new(SPCanvasGroup *parent, SPDesktop *desktop, Geom::Point pos, gchar const *text); +SPCanvasText *sp_canvastext_new(SPCanvasGroup *parent, SPDesktop *desktop, Geom::Point pos, gchar const *text); void sp_canvastext_set_rgba32 (SPCanvasText *ct, guint32 rgba, guint32 rgba_stroke); void sp_canvastext_set_coords (SPCanvasText *ct, gdouble x0, gdouble y0); -- cgit v1.2.3