public ClipBuffer(Image image, Graphics imageGraphics, Rectangle region, Graphics ownerGraphics) { this.image = image; this.region = region; this.ownerGraphics = ownerGraphics; this.graphics = imageGraphics; this.drawingGraphics = DrawingGraphics.FromGraphicsAndRect(this.graphics, this.image, new Rectangle(0, 0, this.image.Width, this.image.Height)); }
public static DrawingGraphics FromPaintEventArgs(PaintEventArgs e, Image canvasImage) { return(DrawingGraphics.FromGraphicsAndRect(e.Graphics, canvasImage, e.ClipRectangle)); }