@@ -1824,19 +1824,15 @@ RendererAgg::draw_quad_mesh(const Py::Tuple& args)
1824
1824
}
1825
1825
1826
1826
void
1827
- RendererAgg::_draw_gouraud_triangle (const GCAgg& gc, const double * points,
1827
+ RendererAgg::_draw_gouraud_triangle (const double * points,
1828
1828
const double * colors,
1829
- agg::trans_affine trans)
1829
+ agg::trans_affine trans,
1830
+ bool has_clippath)
1830
1831
{
1831
1832
typedef agg::rgba8 color_t ;
1832
1833
typedef agg::span_gouraud_rgba<color_t > span_gen_t ;
1833
1834
typedef agg::span_allocator<color_t > span_alloc_t ;
1834
1835
1835
- theRasterizer.reset_clipping ();
1836
- rendererBase.reset_clipping (true );
1837
- set_clipbox (gc.cliprect , theRasterizer);
1838
- bool has_clippath = render_clippath (gc.clippath , gc.clippath_trans );
1839
-
1840
1836
trans *= agg::trans_affine_scaling (1.0 , -1.0 );
1841
1837
trans *= agg::trans_affine_translation (0.0 , (double )height);
1842
1838
@@ -1897,6 +1893,11 @@ RendererAgg::draw_gouraud_triangle(const Py::Tuple& args)
1897
1893
PyArrayObject* points = NULL ;
1898
1894
PyArrayObject* colors = NULL ;
1899
1895
1896
+ theRasterizer.reset_clipping ();
1897
+ rendererBase.reset_clipping (true );
1898
+ set_clipbox (gc.cliprect , theRasterizer);
1899
+ bool has_clippath = render_clippath (gc.clippath , gc.clippath_trans );
1900
+
1900
1901
try
1901
1902
{
1902
1903
points = (PyArrayObject*)PyArray_ContiguousFromAny
@@ -1916,7 +1917,8 @@ RendererAgg::draw_gouraud_triangle(const Py::Tuple& args)
1916
1917
}
1917
1918
1918
1919
_draw_gouraud_triangle (
1919
- gc, (double *)PyArray_DATA (points), (double *)PyArray_DATA (colors), trans);
1920
+ (double *)PyArray_DATA (points), (double *)PyArray_DATA (colors),
1921
+ trans, has_clippath);
1920
1922
}
1921
1923
catch (...)
1922
1924
{
@@ -1951,6 +1953,11 @@ RendererAgg::draw_gouraud_triangles(const Py::Tuple& args)
1951
1953
PyArrayObject* points = NULL ;
1952
1954
PyArrayObject* colors = NULL ;
1953
1955
1956
+ theRasterizer.reset_clipping ();
1957
+ rendererBase.reset_clipping (true );
1958
+ set_clipbox (gc.cliprect , theRasterizer);
1959
+ bool has_clippath = render_clippath (gc.clippath , gc.clippath_trans );
1960
+
1954
1961
try
1955
1962
{
1956
1963
points = (PyArrayObject*)PyArray_ContiguousFromAny
@@ -1976,7 +1983,9 @@ RendererAgg::draw_gouraud_triangles(const Py::Tuple& args)
1976
1983
1977
1984
for (int i = 0 ; i < PyArray_DIM (points, 0 ); ++i)
1978
1985
{
1979
- _draw_gouraud_triangle (gc, (double *)PyArray_GETPTR1 (points, i), (double *)PyArray_GETPTR1 (colors, i), trans);
1986
+ _draw_gouraud_triangle (
1987
+ (double *)PyArray_GETPTR1 (points, i),
1988
+ (double *)PyArray_GETPTR1 (colors, i), trans, has_clippath);
1980
1989
}
1981
1990
}
1982
1991
catch (...)
0 commit comments