@@ -638,6 +638,7 @@ class PathSimplifier : protected EmbeddedQueue<9>
638
638
to the outbound queue, not to run through the entire path
639
639
in one go. This eliminates the need to allocate and fill
640
640
an entire additional path array on each draw. */
641
+ m_dnorm2BackwardMax = 0.0 ;
641
642
while ((cmd = m_source->vertex (x, y)) != agg::path_cmd_stop) {
642
643
/* if we are starting a new path segment, move to the first point
643
644
+ init */
@@ -692,6 +693,7 @@ class PathSimplifier : protected EmbeddedQueue<9>
692
693
693
694
// set all the variables to reflect this new orig vector
694
695
m_dnorm2ForwardMax = m_origdNorm2;
696
+ m_dnorm2BackwardMax = 0.0 ;
695
697
m_lastForwardMax = true ;
696
698
697
699
m_nextX = m_lastWrittenX = m_lastx = *x;
@@ -726,9 +728,7 @@ class PathSimplifier : protected EmbeddedQueue<9>
726
728
727
729
/* If the perp vector is less than some number of (squared)
728
730
pixels in size, then merge the current vector */
729
- // std::cout << "here?\n";
730
731
if (perpdNorm2 < m_simplify_threshold) {
731
- // std::cout << "do we get here?\n";
732
732
/* check if the current vector is parallel or
733
733
anti-parallel to the orig vector. If it is
734
734
parallel, test if it is the longest of the vectors
@@ -745,9 +745,8 @@ class PathSimplifier : protected EmbeddedQueue<9>
745
745
m_nextY = *y;
746
746
}
747
747
} else {
748
- std::cout << " almost next backwards\n " ;
749
748
if (paradNorm2 > m_dnorm2BackwardMax) {
750
- std::cout << " next backwards\n " ;
749
+ // std::cout << "next backwards\n";
751
750
m_lastBackwardMax = true ;
752
751
m_dnorm2BackwardMax = paradNorm2;
753
752
m_nextBackwardX = *x;
@@ -767,6 +766,7 @@ class PathSimplifier : protected EmbeddedQueue<9>
767
766
/* If the line needs to extend in the opposite direction from the
768
767
direction we are drawing in, move back to we start drawing from
769
768
back there. */
769
+ // std::cout << "at this push " << m_dnorm2BackwardMax;
770
770
_push (x, y);
771
771
772
772
break ;
@@ -829,7 +829,7 @@ class PathSimplifier : protected EmbeddedQueue<9>
829
829
/* If we observed any backward (anti-parallel) vectors, then
830
830
we need to move to the furthest backward point. */
831
831
if (m_dnorm2BackwardMax > 0.0 ) {
832
- std::cout << " pushing backwards \n " ;
832
+ // std::cout << "pushing backward points \n";
833
833
queue_push (agg::path_cmd_line_to, m_nextBackwardX, m_nextBackwardY);
834
834
}
835
835
0 commit comments