wBitmap

This class encapsulates the system bitmap. Notice: because there is a naming clash problem, wBitmap's constructor is named as Bmp(). This is the only exception in wNim's naming convention.

Superclass:wGdiObject
Seealso:wDC wPredefined wIconImage

Types

wBitmapError = object of wGdiObjectError
  
An error raised when wBitmap creation failed.

Procs

proc final(self: wBitmap) {...}{.raises: [], tags: [].}
Default finalizer for wBitmap.
proc init(self: wBitmap; width, height: int; depth: int = 0) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(width: int; height: int; depth: int = 0): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a new bitmap. A depth of 0 indicates the depth of the current screen.
proc init(self: wBitmap; size: wSize; depth: int = 0) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(size: wSize; depth: int = 0): wBitmap {...}{.raises: [], tags: [].}
Creates a new bitmap. A depth of 0 indicates the depth of the current screen.
proc init(self: wBitmap; gdipBmp: ptr GpBitmap) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(gdipBmp: ptr GpBitmap): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap from a gdiplus bitmap handle.
proc init(self: wBitmap; image: wImage) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(image: wImage): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap object from the given wImage object.
proc init(self: wBitmap; iconImage: wIconImage) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(iconImage: wIconImage): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap object from the given wIconImage object.
proc init(self: wBitmap; icon: wIcon) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(icon: wIcon): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap object from the given wIcon object.
proc init(self: wBitmap; cursor: wCursor) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(cursor: wCursor): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap object from the given wCursor object.
proc init(self: wBitmap; filename: string) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(filename: string): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap object from a image file.
proc init(self: wBitmap; data: pointer; length: int) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(data: pointer; length: int): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap object from raw image data.
proc init(self: wBitmap; handle: HBITMAP; copy = true) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(handle: HBITMAP; copy = true): wBitmap {...}{.inline, raises: [], tags: [].}
Creates a bitmap from a system bitmap handle. If copy is false, this only wrap it to wBitmap object. It means the handle will be destroyed by wBitmap when it is destroyed.
proc init(self: wBitmap; bmp: wBitmap) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Bmp(bmp: wBitmap): wBitmap {...}{.inline, raises: [], tags: [].}
Copy constructor
proc getSize(self: wBitmap): wSize {...}{.validate, property, inline, raises: [], tags: [].}
Returns the size of the bitmap in pixels.
proc getWidth(self: wBitmap): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets the width of the bitmap in pixels.
proc getHeight(self: wBitmap): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets the height of the bitmap in pixels.
proc getDepth(self: wBitmap): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets the color depth of the bitmap.