DoubleBufferCanvas Class
Provides a canvas to use for double-buffered painting.
public class DoubleBufferCanvas : DisposableObjectBase, IDoubleBufferCanvas, IDisposable
- Inheritance:
- object DisposableObjectBase object
- Implements:
- IDoubleBufferCanvas IDisposable
Constructors
DoubleBufferCanvas(Control)
Provides a canvas to use for double-buffered painting.
public DoubleBufferCanvas(Control control)
| Parameter | Type | Description |
|---|---|---|
| control | Control | The Control that is using the canvas. |
Properties
Graphics
The Graphics object to use for all drawing operations.
Methods
Copy(Rectangle, Point)
Copies one area of the canvas to another.
public void Copy(Rectangle sourceRect, Point destinationLocation)
| Parameter | Type | Description |
|---|---|---|
| sourceRect | Rectangle | A |
| destinationLocation | Point | A |
Dispose(bool)
Releases the unmanaged resources used by the object and optionally releases the managed resources.
protected override void Dispose(bool disposing)
| Parameter | Type | Description |
|---|---|---|
| disposing | bool |
|
Remarks
This method is called by the public Dispose() method and the Finalize method.
Dispose invokes this method with the disposing parameter set to true.
Finalize invokes this method with disposing set to false.
Flush()
Flushes the contents of the double-buffer canvas back to the original Graphics object.
public void Flush()
Invert(Rectangle)
Inverts the specified bounds in the canvas.
public void Invert(Rectangle bounds)
| Parameter | Type | Description |
|---|---|---|
| bounds | Rectangle | A |
PrepareGraphics(PaintEventArgs)
Prepares the double-buffer canvas for drawing.
public void PrepareGraphics(PaintEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | PaintEventArgs | The event data. |
Reset()
Resets the Graphics and canvas.
public void Reset()
Inherited Members
- DisposableObjectBase.Dispose()
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()