diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 246573e3f3fc0d05de413632b0f68b5c257404a6..f96775360f0ea80ae9edfa31594c63a2e3e30798 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
* Authors:
* bulia byak <buliabyak@users.sf.net>
* Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
+ * Jon A. Cruz <jon@joncruz.org>
*
* Copyright (C) 2007 Johan Engelen
- * Copyright (C) 2005 Authors
+ * Copyright (C) 2005,2010 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
if (addknot) {
SPGradient *vector = sp_gradient_get_forked_vector_if_necessary (gradient, false);
- SPStop* prev_stop = sp_first_stop(vector);
+ SPStop* prev_stop = vector->getFirstStop();
SPStop* next_stop = sp_next_stop(prev_stop);
guint i = 1;
while ( (next_stop) && (next_stop->offset < offset) ) {
switch (draggable->point_type) { // if we delete first or last stop, move the next/previous to the edge
case POINT_LG_BEGIN:
case POINT_RG_CENTER:
- stop = sp_first_stop(gradient);
+ stop = gradient->getFirstStop();
{
SPStop *next = sp_next_stop (stop);
if (next) {
{
SPStop *stop = NULL;
if ( (draggable->point_type == POINT_LG_BEGIN) || (draggable->point_type == POINT_RG_CENTER) ) {
- stop = sp_first_stop(vector);
+ stop = vector->getFirstStop();
} else {
stop = sp_last_stop(vector);
}
SPLinearGradient *lg = SP_LINEARGRADIENT(stopinfo->gradient);
Geom::Point oldbegin = Geom::Point (lg->x1.computed, lg->y1.computed);
Geom::Point end = Geom::Point (lg->x2.computed, lg->y2.computed);
- SPStop *stop = sp_first_stop(stopinfo->vector);
+ SPStop *stop = stopinfo->vector->getFirstStop();
gdouble offset = stop->offset;
Geom::Point newbegin = oldbegin + offset * (end - oldbegin);
lg->x1.computed = newbegin[Geom::X];
sp_repr_set_css_double (SP_OBJECT_REPR (laststop), "offset", 1);
// iterate through midstops to set new offset values such that they won't move on canvas.
- SPStop *stop = sp_first_stop(stopinfo->vector);
+ SPStop *stop = stopinfo->vector->getFirstStop();
stop = sp_next_stop(stop);
while ( stop != laststop ) {
stop->offset = stop->offset / offset;
sp_repr_set_css_double (SP_OBJECT_REPR (laststop), "offset", 1);
// iterate through midstops to set new offset values such that they won't move on canvas.
- SPStop *stop = sp_first_stop(stopinfo->vector);
+ SPStop *stop = stopinfo->vector->getFirstStop();
stop = sp_next_stop(stop);
while ( stop != laststop ) {
stop->offset = stop->offset / offset;