@@ -715,6 +715,7 @@ RendererAgg::draw_markers(const Py::Tuple& args)
715
715
theRasterizer.reset ();
716
716
theRasterizer.reset_clipping ();
717
717
rendererBase.reset_clipping (true );
718
+ agg::rect_i marker_size (0x7FFFFFFF , 0x7FFFFFFF , -0x7FFFFFFF , -0x7FFFFFFF );
718
719
719
720
agg::int8u staticFillCache[MARKER_CACHE_SIZE];
720
721
agg::int8u staticStrokeCache[MARKER_CACHE_SIZE];
@@ -738,6 +739,8 @@ RendererAgg::draw_markers(const Py::Tuple& args)
738
739
fillCache = new agg::int8u[fillSize];
739
740
}
740
741
scanlines.serialize (fillCache);
742
+ marker_size = agg::rect_i (scanlines.min_x (), scanlines.min_y (),
743
+ scanlines.max_x (), scanlines.max_y ());
741
744
}
742
745
743
746
stroke_t stroke (marker_path_curve);
@@ -757,6 +760,10 @@ RendererAgg::draw_markers(const Py::Tuple& args)
757
760
strokeCache = new agg::int8u[strokeSize];
758
761
}
759
762
scanlines.serialize (strokeCache);
763
+ marker_size = agg::rect_i (std::min (marker_size.x1 , scanlines.min_x ()),
764
+ std::min (marker_size.y1 , scanlines.min_y ()),
765
+ std::max (marker_size.x2 , scanlines.max_x ()),
766
+ std::max (marker_size.y2 , scanlines.max_y ()));
760
767
761
768
theRasterizer.reset_clipping ();
762
769
rendererBase.reset_clipping (true );
@@ -769,10 +776,10 @@ RendererAgg::draw_markers(const Py::Tuple& args)
769
776
agg::serialized_scanlines_adaptor_aa8::embedded_scanline sl;
770
777
771
778
agg::rect_d clipping_rect (
772
- -1.0 - scanlines. max_x () ,
773
- -1.0 - scanlines. max_y () ,
774
- 1.0 + width - scanlines. min_x () ,
775
- 1.0 + height - scanlines. min_y () );
779
+ -1.0 - marker_size. x2 ,
780
+ -1.0 - marker_size. y2 ,
781
+ 1.0 + width - marker_size. x1 ,
782
+ 1.0 + height - marker_size. y1 );
776
783
777
784
if (has_clippath)
778
785
{
0 commit comments