Show / Hide Table of Contents

Class MemoryBitmap

Creates and manages native bitmap handle and memory DC (GDI device context). The bitmap is selected in the DC.

public class MemoryBitmap : IDisposable

Namespace: Au.More
Assembly: Au.dll
Inheritance
object
MemoryBitmap

Constructors

Name Description
MemoryBitmap()

Does nothing. Later you can call MemoryBitmap.Create or MemoryBitmap.Attach.

MemoryBitmap(int, int)

Calls MemoryBitmap.Create.

Properties

Name Description
Hbitmap

Bitmap handle.

Hdc

DC handle.

Methods

Name Description
Attach(nint)

Sets this variable to manage an existing bitmap. Selects the bitmap into a memory DC. Deletes previous bitmap and DC.

Create(int, int)

Creates new memory DC and bitmap of specified size and selects it into the DC.

Delete()

Deletes the bitmap and DC.

Detach()

Deletes memory DC, clears this variable and returns its bitmap (native bitmap handle). The returned bitmap is not selected into a DC. Will need to delete it with API DeleteObject.

Dispose()

Deletes the bitmap and DC.

Dispose(bool)