summaryrefslogtreecommitdiffstats
path: root/src/draw-context.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-07-17 22:00:40 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-07-17 22:00:40 +0000
commitb8d2a2d3b528d90cd88f96fd4a32b077c98776d5 (patch)
treeaa819f1acb877a25050e6dd559ba2b07daf69154 /src/draw-context.cpp
parentNR::Point : add cast operator to Geom::Point (diff)
downloadinkscape-b8d2a2d3b528d90cd88f96fd4a32b077c98776d5.tar.gz
inkscape-b8d2a2d3b528d90cd88f96fd4a32b077c98776d5.zip
convert all SPCurve's points and matrices arguments and return types to 2Geom
(bzr r6339)
Diffstat (limited to 'src/draw-context.cpp')
-rw-r--r--src/draw-context.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 51938dc9e..19551dd6a 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -171,16 +171,16 @@ sp_draw_context_setup(SPEventContext *ec)
dc->red_bpath = sp_canvas_bpath_new(sp_desktop_sketch(ec->desktop), NULL);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(dc->red_bpath), dc->red_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
/* Create red curve */
- dc->red_curve = new SPCurve(4);
+ dc->red_curve = new SPCurve();
/* Create blue bpath */
dc->blue_bpath = sp_canvas_bpath_new(sp_desktop_sketch(ec->desktop), NULL);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(dc->blue_bpath), dc->blue_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
/* Create blue curve */
- dc->blue_curve = new SPCurve(8);
+ dc->blue_curve = new SPCurve();
/* Create green curve */
- dc->green_curve = new SPCurve(64);
+ dc->green_curve = new SPCurve();
/* No green anchor by default */
dc->green_anchor = NULL;
dc->green_closed = FALSE;
@@ -387,7 +387,7 @@ spdc_attach_selection(SPDrawContext *dc, Inkscape::Selection */*sel*/)
/* Curve list */
/* We keep it in desktop coordinates to eliminate calculation errors */
SPCurve *norm = sp_path_get_curve_for_edit (SP_PATH(item));
- norm->transform(from_2geom(sp_item_i2d_affine(dc->white_item)));
+ norm->transform(sp_item_i2d_affine(dc->white_item));
g_return_if_fail( norm != NULL );
dc->white_curves = g_slist_reverse(norm->split());
norm->unref();
@@ -496,7 +496,7 @@ spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed)
SPCurve *c = dc->green_curve;
/* Green */
- dc->green_curve = new SPCurve(64);
+ dc->green_curve = new SPCurve();
while (dc->green_bpaths) {
gtk_object_destroy(GTK_OBJECT(dc->green_bpaths->data));
dc->green_bpaths = g_slist_remove(dc->green_bpaths, dc->green_bpaths->data);
@@ -610,8 +610,8 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
/* Now we have to go back to item coordinates at last */
c->transform(( dc->white_item
- ? from_2geom(sp_item_dt2i_affine(dc->white_item))
- : sp_desktop_dt2root_affine(SP_EVENT_CONTEXT_DESKTOP(dc)) ));
+ ? sp_item_dt2i_affine(dc->white_item)
+ : to_2geom(sp_desktop_dt2root_affine(SP_EVENT_CONTEXT_DESKTOP(dc))) ));
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
SPDocument *doc = sp_desktop_document(desktop);