wMemoryDC

A memory device context provides a means to draw graphics onto a bitmap. Notice that the memory DC must be deleted (or the bitmap selected out of it) before a bitmap can be reselected into another memory DC. And, before performing any other operations on the bitmap data, the bitmap must be selected out of the memory DC:

tempdc.selectObject(wNilBitmap) # here wNilBitmap is a predefined bitmap

Like other DC object, wMemoryDC need nim's destructors to release the resource.

Superclass:wDC

Procs

proc selectObject(self: var wMemoryDC; bitmap: wBitmap) {...}{.raises: [NilAccessError],
    tags: [].}
Selects the given bitmap into the device context, to use as the memory bitmap.
proc MemoryDC(): wMemoryDC {...}{.raises: [NilAccessError, Exception, IndexError,
                                  wFontError, wPenError, wBrushError],
                          tags: [RootEffect].}
Constructs a new memory device context.
proc MemoryDC(dc: wDC): wMemoryDC {...}{.raises: [NilAccessError, Exception, IndexError,
                                        wFontError, wPenError, wBrushError],
                                tags: [RootEffect].}
Constructs a new memory device context compatible with the specified device.
proc delete(self: var wMemoryDC) {...}{.raises: [], tags: [].}
Nim's destructors will delete this object by default. However, sometimes you maybe want to do that by yourself. (Nim's destructors don't work in some version?)

Methods

method getSize(self: wMemoryDC): wSize {...}{.locks: "unknown", raises: [], tags: [].}
Gets the size of the device context.