I have a DrawingVisual
and want to draw a grape tree, show to screen then after that, draw a fox. Like this:
public class Gif : DrawingVisual
{
void Draw_Geometry(Geometry geo)
{
using (DrawingContext dc = RenderOpen())
{
dc.DrawGeometry(Brushes.Brown, new Pen(Brushes.Brown, 0), geo);
}
}
void Draw_Grape ()
{
Draw_Geometry(grape);
}
void Draw_Fox ()
{
Draw_Geometry(fox);
}
}
Problem is when call Draw_Fox ()
, the DrawingContext
auto clear existing grape tree. So I want to ask how to keep existing drawing content when draw new geometry? Thank!