diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index f4070079b42c07af1a38315b349ee1735afd6c0c..59081475ee22a0f6550b243f844e1889f71445a9 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
cf[3] /= count;
// set both fill and stroke with our stop-color and stop-opacity
- sp_color_set_rgb_float((SPColor *) &style->fill.value.color, cf[0], cf[1], cf[2]);
+ style->fill.clear();
+ style->fill.setColor( cf[0], cf[1], cf[2] );
style->fill.set = TRUE;
- style->fill.type = SP_PAINT_TYPE_COLOR;
- sp_color_set_rgb_float((SPColor *) &style->stroke.value.color, cf[0], cf[1], cf[2]);
+ style->stroke.clear();
+ style->stroke.setColor( cf[0], cf[1], cf[2] );
style->stroke.set = TRUE;
- style->stroke.type = SP_PAINT_TYPE_COLOR;
style->fill_opacity.value = SP_SCALE24_FROM_FLOAT (1.0);
style->fill_opacity.set = TRUE;
@@ -436,7 +436,7 @@ gr_knot_moved_handler(SPKnot *knot, NR::Point const *ppointer, guint state, gpoi
if (!((state & GDK_SHIFT_MASK) || ((state & GDK_CONTROL_MASK) && (state & GDK_MOD1_MASK)))) {
// Try snapping to the grid or guides
SnapManager const &m = dragger->parent->desktop->namedview->snap_manager;
- Inkscape::SnappedPoint s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE | Inkscape::Snapper::SNAPPOINT_BBOX, p, NULL);
+ Inkscape::SnappedPoint s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p, NULL);
if (s.getDistance() < 1e6) {
p = s.getPoint();
sp_knot_moveto (knot, &p);
SPItem *item = SP_ITEM(i->data);
SPStyle *style = SP_OBJECT_STYLE (item);
- if (style && (style->fill.type == SP_PAINT_TYPE_PAINTSERVER)) {
+ if (style && (style->fill.isPaintserver())) {
SPObject *server = SP_OBJECT_STYLE_FILL_SERVER (item);
if (SP_IS_LINEARGRADIENT (server)) {
addDraggersLinear (SP_LINEARGRADIENT (server), item, true);
}
}
- if (style && (style->stroke.type == SP_PAINT_TYPE_PAINTSERVER)) {
+ if (style && (style->stroke.isPaintserver())) {
SPObject *server = SP_OBJECT_STYLE_STROKE_SERVER (item);
if (SP_IS_LINEARGRADIENT (server)) {
addDraggersLinear (SP_LINEARGRADIENT (server), item, false);
SPStyle *style = SP_OBJECT_STYLE (item);
- if (style && (style->fill.type == SP_PAINT_TYPE_PAINTSERVER)) {
+ if (style && (style->fill.isPaintserver())) {
SPObject *server = SP_OBJECT_STYLE_FILL_SERVER (item);
if (SP_IS_LINEARGRADIENT (server)) {
this->addLine (sp_item_gradient_get_coords (item, POINT_LG_BEGIN, 0, true), sp_item_gradient_get_coords (item, POINT_LG_END, 0, true), GR_LINE_COLOR_FILL);
}
}
- if (style && (style->stroke.type == SP_PAINT_TYPE_PAINTSERVER)) {
+ if (style && (style->stroke.isPaintserver())) {
SPObject *server = SP_OBJECT_STYLE_STROKE_SERVER (item);
if (SP_IS_LINEARGRADIENT (server)) {
this->addLine (sp_item_gradient_get_coords (item, POINT_LG_BEGIN, 0, false), sp_item_gradient_get_coords (item, POINT_LG_END, 0, false), GR_LINE_COLOR_STROKE);