diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index ed1d6a7a4820f3248c00ad63a28616460822c331..d33a33f7b12f2d740f293c97b7ad941dd336c3db 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
((SPEventContextClass *) draw_parent_class)->setup(ec);
}
- dc->selection = SP_DT_SELECTION(dt);
+ dc->selection = sp_desktop_selection(dt);
/* Connect signals to track selection changes */
dc->sel_changed_connection = dc->selection->connectChanged(
);
/* Create red bpath */
- dc->red_bpath = sp_canvas_bpath_new(SP_DT_SKETCH(ec->desktop), NULL);
+ 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 = sp_curve_new_sized(4);
/* Create blue bpath */
- dc->blue_bpath = sp_canvas_bpath_new(SP_DT_SKETCH(ec->desktop), NULL);
+ 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 = sp_curve_new_sized(8);
case GDK_KEY_PRESS:
switch (get_group0_keyval (&event->key)) {
case GDK_Escape:
- SP_DT_SELECTION(desktop)->clear();
+ sp_desktop_selection(desktop)->clear();
ret = TRUE;
break;
case GDK_Tab: // Tab - cycle selection forward
@@ -367,10 +367,10 @@ void spdc_endpoint_snap_rotation(SPEventContext const *const ec, NR::Point &p, N
}
v = t;
}
-
+
if (fabs(bdot) > 0) {
p = o + bdot * best;
-
+
/* Snap it along best vector */
SnapManager const m(SP_EVENT_CONTEXT_DESKTOP(ec)->namedview);
p = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT | Inkscape::Snapper::BBOX_POINT,
: sp_desktop_dt2root_affine(SP_EVENT_CONTEXT_DESKTOP(dc)) ));
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
- SPDocument *doc = SP_DT_DOCUMENT(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
if ( c && !sp_curve_empty(c) ) {
/* We actually have something to write */