summaryrefslogtreecommitdiffstats
path: root/src/gradient-context.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-01-07 21:51:23 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-01-07 21:51:23 +0000
commit8fe7ff9d578c6118d3cd2b0f2e3f201c99aabaec (patch)
tree87b954886e124361ecf940831316131d4f2af9fa /src/gradient-context.cpp
parentUpdate of Brazilian Portuguese translation (diff)
downloadinkscape-8fe7ff9d578c6118d3cd2b0f2e3f201c99aabaec.tar.gz
inkscape-8fe7ff9d578c6118d3cd2b0f2e3f201c99aabaec.zip
Reverting revision 13615
(bzr r2150)
Diffstat (limited to 'src/gradient-context.cpp')
-rw-r--r--src/gradient-context.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index c54041a82..ad1dd8730 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -433,15 +433,11 @@ static void sp_gradient_drag(SPGradientContext &rc, NR::Point const pt, guint st
sp_item_set_gradient(SP_ITEM(i->data), vector, (SPGradientType) type, fill_or_stroke);
if (type == SP_GRADIENT_TYPE_LINEAR) {
- sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_LG_BEGIN, 0, rc.origin, fill_or_stroke, true, false);
-/* FIXGRADIENT
- Add sensible code to handle the midpoints, or maybe not necessary?
- not necessary i think because this only creates default gradient?
-*/
- sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_LG_END, 0, pt, fill_or_stroke, true, false);
+ sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_LG_P1, rc.origin, fill_or_stroke, true, false);
+ sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_LG_P2, pt, fill_or_stroke, true, false);
} else if (type == SP_GRADIENT_TYPE_RADIAL) {
- sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_RG_CENTER, 0, rc.origin, fill_or_stroke, true, false);
- sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_RG_R1, 0, pt, fill_or_stroke, true, false);
+ sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_RG_CENTER, rc.origin, fill_or_stroke, true, false);
+ sp_item_gradient_set_coords (SP_ITEM(i->data), POINT_RG_R1, pt, fill_or_stroke, true, false);
}
SP_OBJECT (i->data)->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
@@ -453,8 +449,7 @@ static void sp_gradient_drag(SPGradientContext &rc, NR::Point const pt, guint st
// give the grab out-of-bounds values of xp/yp because we're already dragging
// and therefore are already out of tolerance
ec->_grdrag->grabKnot (SP_ITEM(selection->itemList()->data),
- type == SP_GRADIENT_TYPE_LINEAR? POINT_LG_END : POINT_RG_R1,
- 0, //point_i
+ type == SP_GRADIENT_TYPE_LINEAR? POINT_LG_P2 : POINT_RG_R1,
fill_or_stroke, 99999, 99999, etime);
}
// We did an undoable action, but sp_document_done will be called by the knot when released