Author: Carlos Lopez <[email protected]>
Date: Sun Aug 19 08:52:44 2012 +0200
ConicalGracient: sort gradient between insertion of extra Color stops at start
and end of the gradient
---
.../src/modules/mod_gradient/conicalgradient.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/synfig-core/src/modules/mod_gradient/conicalgradient.cpp
b/synfig-core/src/modules/mod_gradient/conicalgradient.cpp
index 9dc0076..f95507d 100644
--- a/synfig-core/src/modules/mod_gradient/conicalgradient.cpp
+++ b/synfig-core/src/modules/mod_gradient/conicalgradient.cpp
@@ -389,10 +389,16 @@ ConicalGradient::compile_mesh(cairo_pattern_t* pattern,
Gradient mygradient, Rea
// stop at start and end of gradient.
cp=*mygradient.begin();
if(cp.pos!=0.0)
+ {
mygradient.push_back(GradientCPoint(0.0, cp.color));
+ mygradient.sort();
+ }
cp=*(--mygradient.end());
if(cp.pos!=1.0)
+ {
mygradient.push_back(GradientCPoint(1.0, cp.color));
+ mygradient.sort();
+ }
mygradient.sort();
Gradient cgradient=mygradient;
for(iter=cgradient.begin();iter!=cgradient.end(); iter++)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl