summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
Diffstat (limited to 'src/display')
-rw-r--r--src/display/canvas-text.cpp5
-rw-r--r--src/display/canvas-text.h2
2 files changed, 3 insertions, 4 deletions
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);