From 5f9b5232318acdb98f9f71f968b9852e501377f0 Mon Sep 17 00:00:00 2001
From: Ansgar Philippsen <ansgar.philippsen@gmail.com>
Date: Thu, 27 Jan 2011 15:27:21 -0500
Subject: [PATCH] fix for BZDNG-195: force start/end of cartoon segments to
 always be of type coil

---
 modules/gfx/src/impl/cartoon_renderer.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/gfx/src/impl/cartoon_renderer.cc b/modules/gfx/src/impl/cartoon_renderer.cc
index 0f76e247d..ff1537ea1 100644
--- a/modules/gfx/src/impl/cartoon_renderer.cc
+++ b/modules/gfx/src/impl/cartoon_renderer.cc
@@ -245,6 +245,12 @@ void CartoonRenderer::FudgeSplineObj(SplineEntryListList& olistlist)
   for(unsigned int llc=0;llc<olistlist.size();++llc) {
     LOG_DEBUG("CartoonRenderer: fudging spline segment " << llc);
     SplineEntryList olist = olistlist[llc];
+
+    if(!olist.empty()) {
+      olist.front().type=0;
+      olist.back().type=0;
+    }
+
     for(unsigned int lc=0;lc<olist.size();++lc) {
       if(olist.at(lc).type==1) {
         if(options_->GetHelixMode()==1) {
-- 
GitLab