示例#1
0
 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));
 }
示例#2
0
 public static DrawingGraphics FromPaintEventArgs(PaintEventArgs e, Image canvasImage)
 {
     return(DrawingGraphics.FromGraphicsAndRect(e.Graphics, canvasImage, e.ClipRectangle));
 }