_HEIGHT, _WIDTH

From QB64.org wiki
Revision as of 10:32, 19 July 2017 by Flukiluke (talk) (Created page with "{{DISPLAYTITLE:_HEIGHT, _WIDTH}} The _HEIGHT and _WIDTH functions return the width and height of an image, respectively. If no image handle is given, they default the current...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The _HEIGHT and _WIDTH functions return the width and height of an image, respectively. If no image handle is given, they default the current _DEST.

Syntax

image_width& = _HEIGHT[(image&)]
image_height& = _WIDTH[(image&)]

Where image& is a valid image handle. If a handle is not given, the functions return information about the current _DEST image.

Details

For most images (i.e. graphics images) the values returned are a measure of the number of pixels in each direction. For text-mode images (i.e. SCREEN 0 or _NEWIMAGE(x, y, 0)) the values returned describe the number of character cells. So a text-mode image has _HEIGHT rows of characters and _WIDTH columns.