CachedBitmap Class

Definition

Represents a device-dependent copy of a Bitmap matching a specified Graphics object's current device (display) settings. Avoids reformatting step when rendering, which can significantly improve performance.

public sealed class CachedBitmap : IDisposable
Inheritance
CachedBitmap
Implements

Remarks

CachedBitmap matches the current bit depth of the Graphics's device. If the device bit depth changes, the CachedBitmap will no longer be usable and a new instance will need to be created that matches. If the CachedBitmap was created against Format32bppRgb it will always work.

CachedBitmap will not work with any transformations other than translation.

CachedBitmap cannot be used to draw to a printer or metafile.

Constructors

CachedBitmap(Bitmap, Graphics)

Creates a device-dependent copy of bitmap for the device settings of graphics.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize()
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
Windows Desktop 8, 9