BufferedGraphicsContext.Allocate Method (Graphics, Rectangle)
Creates a graphics buffer of the specified size using the pixel format of the specified Graphics.
Assembly: System.Drawing (in System.Drawing.dll)
public BufferedGraphics Allocate( Graphics targetGraphics, Rectangle targetRectangle )
- Type: System.Drawing.Graphics
The Graphics to match the pixel format for the new buffer to.
When you call the Allocate method with a rectangle whose size exceeds the value of the MaximumBuffer property, a temporary BufferedGraphicsContext is created to allocate the buffer and provide a temporary context for the buffer. The new BufferedGraphicsContext is distinct from the BufferedGraphicsContext for the application domain and it is disposed automatically when the BufferedGraphics returned by the Allocate method is disposed.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.