Difference between revisions of "HEIGHT"

From QB64 Wiki
Jump to navigation Jump to search
(Redirected page to HEIGHT, WIDTH)
Line 1: Line 1:
The [[_HEIGHT]] function returns the height of an image handle or current write page.
:''result&'' = {{KW|_HEIGHT}}[({{Parameter|imageHandle&}})]
* If {{Parameter|imageHandle&}} is omitted, it's assumed to be the handle of the current write page.
* To get the width of the current program window use zero for the handle value: depth& = _HEIGHT(0)
* If the image specified by {{Parameter|imageHandle&}} is in text mode, the number of characters per column is returned.
* If the image specified by {{Parameter|imageHandle&}} is in graphics mode, the number of pixels per column is returned.
* If {{Parameter|imageHandle&}} is an invalid handle, then an [[ERROR Codes|invalid handle]] error will occur.
* The maximum pixel coordinate of a program [[SCREEN|screen]] is one less than what the function returns.
''Example:'' Displays the current program window area.
{{CodeStart}} '' ''
{{Cl|SCREEN}} 12
wide = {{Cl|_WIDTH (function)|_WIDTH}}
deep = {{Cl|_HEIGHT}}
{{Cl|PRINT}} "The program screen is"; wide; "X"; deep '' ''
* [[_WIDTH (function)]]
* [[Bitmaps]]

Revision as of 12:23, 19 July 2017

Redirect to: