@@ -549,8 +549,8 @@ RendererAgg::draw_markers(const Py::Tuple& args) {
549
549
agg::serialized_scanlines_adaptor_aa8 sa;
550
550
agg::serialized_scanlines_adaptor_aa8::embedded_scanline sl;
551
551
552
- while (path_quantized. vertex (&x, &y) != agg::path_cmd_stop ) {
553
- if (has_clippath ) {
552
+ if (has_clippath ) {
553
+ while (path_quantized. vertex (&x, &y) != agg::path_cmd_stop ) {
554
554
pixfmt_amask_type pfa (*pixFmt, *alphaMask);
555
555
amask_ren_type r (pfa);
556
556
amask_aa_renderer_type ren (r);
@@ -563,7 +563,9 @@ RendererAgg::draw_markers(const Py::Tuple& args) {
563
563
ren.color (gc.color );
564
564
sa.init (strokeCache, strokeSize, x, y);
565
565
agg::render_scanlines (sa, sl, ren);
566
- } else {
566
+ }
567
+ } else {
568
+ while (path_quantized.vertex (&x, &y) != agg::path_cmd_stop) {
567
569
if (face.first ) {
568
570
rendererAA->color (face.second );
569
571
sa.init (fillCache, fillSize, x, y);
@@ -1139,6 +1141,7 @@ class QuadMeshGenerator {
1139
1141
m_iterator (0 ), m_m(m), m_n(n), m_coordinates(coordinates) {
1140
1142
}
1141
1143
1144
+ private:
1142
1145
inline unsigned vertex (unsigned idx, double * x, double * y) {
1143
1146
size_t m = (idx & 0x2 ) ? (m_m + 1 ) : m_m;
1144
1147
size_t n = (idx+1 & 0x2 ) ? (m_n + 1 ) : m_n;
@@ -1148,8 +1151,9 @@ class QuadMeshGenerator {
1148
1151
return (idx) ? agg::path_cmd_line_to : agg::path_cmd_move_to;
1149
1152
}
1150
1153
1154
+ public:
1151
1155
inline unsigned vertex (double * x, double * y) {
1152
- if (m_iterator >= total_vertices ())
1156
+ if (m_iterator >= total_vertices ())
1153
1157
return agg::path_cmd_stop;
1154
1158
return vertex (m_iterator++, x, y);
1155
1159
}
@@ -1496,7 +1500,7 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args) {
1496
1500
int ymin = height;
1497
1501
int xmax = 0 ;
1498
1502
int ymax = 0 ;
1499
-
1503
+
1500
1504
// Looks at the alpha channel to find the minimum extents of the image
1501
1505
unsigned char * pixel = pixBuffer + 3 ;
1502
1506
for (int y = 0 ; y < (int )height; ++y) {
@@ -1520,11 +1524,11 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args) {
1520
1524
ymin = std::max (0 , ymin - 1 );
1521
1525
xmax = std::min (xmax, (int )width);
1522
1526
ymax = std::min (ymax, (int )height);
1523
-
1527
+
1524
1528
newwidth = xmax - xmin;
1525
1529
newheight = ymax - ymin;
1526
1530
int newsize = newwidth * newheight * 4 ;
1527
-
1531
+
1528
1532
unsigned char * buf = new unsigned char [newsize];
1529
1533
unsigned int * dst = (unsigned int *)buf;
1530
1534
unsigned int * src = (unsigned int *)pixBuffer;
@@ -1540,7 +1544,7 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args) {
1540
1544
bounds[1 ] = Py::Int (ymin);
1541
1545
bounds[2 ] = Py::Int (newwidth);
1542
1546
bounds[3 ] = Py::Int (newheight);
1543
-
1547
+
1544
1548
Py::Tuple result (2 );
1545
1549
result[0 ] = data;
1546
1550
result[1 ] = bounds;
0 commit comments