System.Drawing 2.0.0.0 System.Object System.IDisposable

The class allows you to implement custom double buffering for your graphics. Graphics that use double buffering can reduce or eliminate flicker that is caused by redrawing a display surface.

The simplest way to use double buffering is to set the control style flag on a control using the method. Setting the control styles flag for a control redirects all painting for the control through a default graphics buffer, without requiring any additional code. This flag is set to true by default.

The class provides methods for creating and configuring a graphics buffer. The method creates a , which is a wrapper for a graphics buffer that also provides methods you can use to write to the buffer and render its contents to an output device.

You can retrieve the for the current application domain from the static property. For graphically intensive applications such as animation, you can create a dedicated using the constructor, but for most applications the property will be sufficient.

For more information on drawing buffered graphics and custom buffering implementations, see Double Buffered Graphics and How to: Manually Manage Buffered Graphics.

Provides methods for creating graphics buffers that can be used for double buffering.

- Constructor

  For graphically intensive applications such as animation, you can sometimes improve performance by using a dedicated instead of the default instance provided by the . This allows you to create and manage graphics buffers individually.

  You should always call when you finish using a dedicated .

  For more information about dedicated graphics buffers, see How to: Manually Manage Buffered Graphics.

  Initializes a new instance of the class.

  2.0.0.0
- Method
  System.Drawing.BufferedGraphics `` ``

  When you call the method with a rectangle whose size exceeds the value of the property, a temporary is created to allocate the buffer and provide a temporary context for the buffer. The new is distinct from the for the application domain and it is disposed automatically when the returned by the method is disposed.

  Creates a graphics buffer of the specified size using the pixel format of the specified .

  A that can be used to draw to a buffer of the specified dimensions.

  The to match the pixel format for the new buffer to. A indicating the size of the buffer to create. 2.0.0.0
- Method
  System.Drawing.BufferedGraphics `` ``

  When you call the method with a rectangle whose size exceeds the value of the property, a temporary is created to allocate the buffer and provide a temporary context for the buffer. The new is distinct from the for the application domain and it is disposed automatically when the returned by the method is disposed.

  Creates a graphics buffer of the specified size using the pixel format of the specified .

  A that can be used to draw to a buffer of the specified dimensions.

  An to a device context to match the pixel format of the new buffer to. A indicating the size of the buffer to create. 2.0.0.0
- Method
  System.Void

  Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

  Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the method of the .

  Releases all resources used by the .

  2.0.0.0
- Method
  System.Void To be added. To be added. 2.0.0.0
- Method
  System.Void

  If the graphics buffer is in use, it will be marked for disposal as soon as it is free; otherwise, it will be disposed immediately.

  Disposes of the current graphics buffer, if a buffer has been allocated and has not yet been disposed.

  2.0.0.0
- Property
  System.Drawing.Size To be added.

  This property allows you to get or set the maximum dimensions for a buffer that should be retained in memory. You can allocate a buffer of any size, however any buffer with dimensions greater than the size will be used temporarily and then discarded when the object is released.

  Gets or sets the maximum size of the buffer to use.

  2.0.0.0