summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 07916b4)
raw | patch | inline | side by side (parent: 07916b4)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 26 Mar 2008 06:04:04 +0000 (06:04 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 26 Mar 2008 06:04:04 +0000 (06:04 +0000) |
src/gradient-chemistry.cpp | patch | blob | history |
index 057877daf61ee76272b084c79443f22fb84d63b8..303db88495cb2b48a879e17aa802d2aac696b912 100644 (file)
sp_get_stop_i(SPGradient *gradient, guint stop_i)
{
SPStop *stop = sp_first_stop (gradient);
+
+ // if this is valid but weird gradient without an offset-zero stop element,
+ // inkscape has created a handle for the start of gradient anyway,
+ // so when it asks for stop N that corresponds to stop element N-1
+ if (stop->offset != 0)
+ stop_i --;
for (guint i=0; i < stop_i; i++) {
if (!stop) return NULL;