@@ -961,13 +961,13 @@ inline void RendererAgg::_draw_path_collection_generic(GCAgg &gc,
961961 typename PathGenerator::path_iterator path = path_generator (i);
962962
963963 if (Ntransforms) {
964- typename TransformArray:: sub_t subtrans = transforms[ i % Ntransforms] ;
965- trans = agg::trans_affine (subtrans ( 0 , 0 ),
966- subtrans ( 1 , 0 ),
967- subtrans ( 0 , 1 ),
968- subtrans ( 1 , 1 ),
969- subtrans ( 0 , 2 ),
970- subtrans ( 1 , 2 ));
964+ int it = i % Ntransforms;
965+ trans = agg::trans_affine (transforms (it, 0 , 0 ),
966+ transforms (it, 1 , 0 ),
967+ transforms (it, 0 , 1 ),
968+ transforms (it, 1 , 1 ),
969+ transforms (it, 0 , 2 ),
970+ transforms (it, 1 , 2 ));
971971 trans *= master_transform;
972972 } else {
973973 trans = master_transform;
@@ -989,13 +989,13 @@ inline void RendererAgg::_draw_path_collection_generic(GCAgg &gc,
989989 trans *= agg::trans_affine_translation (0.0 , (double )height);
990990
991991 if (Nfacecolors) {
992- typename ColorArray:: sub_t facecolor = facecolors[ i % Nfacecolors] ;
993- face.second = agg::rgba (facecolor ( 0 ), facecolor ( 1 ), facecolor ( 2 ), facecolor ( 3 ));
992+ int ic = i % Nfacecolors;
993+ face.second = agg::rgba (facecolors (ic, 0 ), facecolors (ic, 1 ), facecolors (ic, 2 ), facecolors (ic, 3 ));
994994 }
995995
996996 if (Nedgecolors) {
997- typename ColorArray:: sub_t edgecolor = edgecolors[ i % Nedgecolors] ;
998- gc.color = agg::rgba (edgecolor ( 0 ), edgecolor ( 1 ), edgecolor ( 2 ), edgecolor ( 3 ));
997+ int ic = i % Nedgecolors;
998+ gc.color = agg::rgba (edgecolors (ic, 0 ), edgecolors (ic, 1 ), edgecolors (ic, 2 ), edgecolors (ic, 3 ));
999999
10001000 if (Nlinewidths) {
10011001 gc.linewidth = linewidths (i % Nlinewidths);
@@ -1274,8 +1274,8 @@ inline void RendererAgg::draw_gouraud_triangles(GCAgg &gc,
12741274 bool has_clippath = render_clippath (gc.clippath .path , gc.clippath .trans );
12751275
12761276 for (int i = 0 ; i < points.dim (0 ); ++i) {
1277- typename PointArray::sub_t point = points[i] ;
1278- typename ColorArray::sub_t color = colors[i] ;
1277+ typename PointArray::sub_t point = points. subarray (i) ;
1278+ typename ColorArray::sub_t color = colors. subarray (i) ;
12791279
12801280 _draw_gouraud_triangle (point, color, trans, has_clippath);
12811281 }
0 commit comments