diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-01-07 18:26:31 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-01-07 18:26:31 +0000 |
| commit | 6025fee37d2d6ab51e1efbd0194689b5f9180bfb (patch) | |
| tree | 54cdac08c30b27adca0b53c8163daed9d08675ee /src/gradient-context.cpp | |
| parent | double quote the relaytool mimicing defines (diff) | |
| download | inkscape-6025fee37d2d6ab51e1efbd0194689b5f9180bfb.tar.gz inkscape-6025fee37d2d6ab51e1efbd0194689b5f9180bfb.zip | |
Gradient nodes progress...
(bzr r2148)
Diffstat (limited to 'src/gradient-context.cpp')
| -rw-r--r-- | src/gradient-context.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp index ad1dd8730..c54041a82 100644 --- a/src/gradient-context.cpp +++ b/src/gradient-context.cpp @@ -433,11 +433,15 @@ 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_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); + 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); } else if (type == SP_GRADIENT_TYPE_RADIAL) { - 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_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_OBJECT (i->data)->requestModified(SP_OBJECT_MODIFIED_FLAG); } @@ -449,7 +453,8 @@ 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_P2 : POINT_RG_R1, + type == SP_GRADIENT_TYPE_LINEAR? POINT_LG_END : POINT_RG_R1, + 0, //point_i fill_or_stroke, 99999, 99999, etime); } // We did an undoable action, but sp_document_done will be called by the knot when released |
