A wxbitmap object represents a bitmap resource that can be provided to any of the wx-based controls that allow a bitmap such as an icon. A separate type may be provided as an image control.
Creates a new wxbitmap object either by loading a bitmap from the supplied file name or by loading the bitmap from the blob supplied. If a filename parameter and format are provided then the blob, width and height should not be provided. The reverse is also true.
wxbitmap.new (
string ,
string filename,
blob format,
integer rgb,
integer width,
integer height )
error
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| filename | None | string | The name of the file conatining the bitmap to be loaded. |
| format | "xpm" | string | The format of the image to be loaded. Currently the supported formats are: "xpm" and "bmp". |
| rgb | None | blob | A blob containing an image in rgb format (three bytes per pixel). This allows the creation of the image by the program, or the storage of the image in a database field, for example. |
| width | rgb.size / height | integer |
The width of the image contained in rgb. Either
the height or the width must be provided when using the
rgb argument.
|
| height | rgb.size / width | integer |
The height of the image contained in rgb.
Either the height or the width must be provided when using the
rgb argument.
|
| error | .nul | integer |
Specifies an object which is used to output any error code
generated during creation of the wxbitmap object. If
error is not specified or is
.nul then any error which occurs during object
creation will halt the program. If an error object is specified and
an error occurs during object creation then the error code is
output into that object and the new()
method returns .nul.
|
| Property | Type | Description |
|---|---|---|
| _ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. |
| __ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property. |
| height | integer | Gives the height of the bitmap in pixels. |
| type | type | Specifies the wxbitmap type object. |
| width | integer | Gives the width of the bitmap in pixels. |



