This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Create a memory bitmap and load an image into it.
Image file can be one of the following type: .png .jpg .jpeg .gif .bmp .tif
Syntax
hBmp = Canvas_BitmapLoad(FileName, width, height [, Stretch])
Returns
Number
If the bitmap creation is successful, the bitmap handle is assigned to the variable hBmp.
If not successful, hBmp is set to zero.
Parameters
Name |
Type |
Optional |
Meaning |
FileName |
String |
No |
Full path of the bitmap image to load |
Width |
Number |
No |
Bitmap width The parameters Width and Height specify the width and height of the bitmap, in pixels. If either of the size parameters are zero (0), the bitmap is loaded at its natural size. If either of the size parameters is different from the natural size, the bitmap is stretched or condensed to the requested size |
Height |
Number |
No |
Bitmap height The parameters Width and Height specify the width and height of the bitmap, in pixels. If either of the size parameters are zero (0), the bitmap is loaded at its natural size. If either of the size parameters is different from the natural size, the bitmap is stretched or condensed to the requested size |
Stretch |
Number |
Yes |
If present, image will be stretched. |
Remarks
Creates a new memory bitmap, which may be manipulated and drawn just as if it were a Canvas Window, except that it is not visible.
The parameters Width and Height specify the width and height of the bitmap, in pixels. If either of the size parameters are zero (0), the bitmap is loaded at its natural size. If either of the size parameters is different from the natural size, the bitmap is stretched or condensed to the requested size
Use Canvas_BitmapCopy* functions (Canvas_BitmapCopy1, Canvas_BitmapCopy2, Canvas_BitmapCopy3) to copy loaded image into current attached Canvas, see Canvas_Atatch.
Restrictions
When you are finished using this memory bitmap, you must delete it with Canvas_BitmapEnd.
See also
Examples