@@ -528,6 +528,7 @@ inline void RendererAgg::draw_markers(GCAgg &gc,
528
528
theRasterizer.reset ();
529
529
theRasterizer.reset_clipping ();
530
530
rendererBase.reset_clipping (true );
531
+ agg::rect_i marker_size (0x7FFFFFFF , 0x7FFFFFFF , -0x7FFFFFFF , -0x7FFFFFFF );
531
532
532
533
agg::int8u staticFillCache[MARKER_CACHE_SIZE];
533
534
agg::int8u staticStrokeCache[MARKER_CACHE_SIZE];
@@ -545,6 +546,10 @@ inline void RendererAgg::draw_markers(GCAgg &gc,
545
546
fillCache = new agg::int8u[fillSize];
546
547
}
547
548
scanlines.serialize (fillCache);
549
+ marker_size = agg::rect_i (scanlines.min_x (),
550
+ scanlines.min_y (),
551
+ scanlines.max_x (),
552
+ scanlines.max_y ());
548
553
}
549
554
550
555
stroke_t stroke (marker_path_curve);
@@ -559,6 +564,10 @@ inline void RendererAgg::draw_markers(GCAgg &gc,
559
564
strokeCache = new agg::int8u[strokeSize];
560
565
}
561
566
scanlines.serialize (strokeCache);
567
+ marker_size = agg::rect_i (std::min (marker_size.x1 , scanlines.min_x ()),
568
+ std::min (marker_size.y1 , scanlines.min_y ()),
569
+ std::max (marker_size.x2 , scanlines.max_x ()),
570
+ std::max (marker_size.y2 , scanlines.max_y ()));
562
571
563
572
theRasterizer.reset_clipping ();
564
573
rendererBase.reset_clipping (true );
@@ -570,10 +579,10 @@ inline void RendererAgg::draw_markers(GCAgg &gc,
570
579
agg::serialized_scanlines_adaptor_aa8 sa;
571
580
agg::serialized_scanlines_adaptor_aa8::embedded_scanline sl;
572
581
573
- agg::rect_d clipping_rect (-1.0 - scanlines. max_x () ,
574
- -1.0 - scanlines. max_y () ,
575
- 1.0 + width - scanlines. min_x () ,
576
- 1.0 + height - scanlines. min_y () );
582
+ agg::rect_d clipping_rect (-1.0 - marker_size. x2 ,
583
+ -1.0 - marker_size. y2 ,
584
+ 1.0 + width - marker_size. x1 ,
585
+ 1.0 + height - marker_size. y1 );
577
586
578
587
if (has_clippath) {
579
588
while (path_curve.vertex (&x, &y) != agg::path_cmd_stop) {
0 commit comments