Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

In WPF,Use DrawingContext of the DrawingGroup draw, how can I do to clear the shapes in the specified range

$
0
0

I use DrawingContext of the DrawingGroup after the drawing, including straight lines, geometric shapes, pictures, like in this container has 1000*1000 pixels, I'm going to clear the shapes in the specified range, the region beginning to (100,100) the area 100*100 in size, there could be a variety of geometry already did (in a straight line, pictures) part of the how to clear?

var CurrentDrawingGroup = new DrawingGroup();
using (DrawingContext dc = CurrentDrawingGroup.Open())
            {
 dc.DrawLine(CurrentPen, new Point(10, 110), new Point(530, 112));
 dc.DrawLine(CurrentPen, new Point(10, 120), new Point(530, 132));
 dc.DrawLine(CurrentPen, new Point(10, 130), new Point(530, 122));
}

how can i do ?



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>