Function 50 -
Set Window Form
Regular windows are rectangles. With this function,
the window can be given an arbitrary shape. The form is defined by a set of
points inside the framing rectangle belonging to the window. Position and the
sizes of the framing rectangle are set by function 0 and change by function 67.
Data Setup with Form Information
Options:
·
eax = 50 - function
number
·
ebx = 0 - number of subfunction
·
ecx = pointer to the
form data (byte array 0/1)
Return value:
·
function does not
return value
Scaling form data
Options:
·
eax = 50 - function
number
·
ebx = 1 - number of subfunction
·
ecx sets the scale: each
data byte defines (2 ^ scale) * (2 ^ scale) pixels
Return value:
·
function does not
return value
Remarks:
·
The default scale is 0 (scaling factor 1). If in the
form data one byte corresponds to one pixel, then the scale can be not set.
·
Denote xsize = window width
(in pixels), ysize = height; note that they are one
more than those set by functions 0, 67.
·
By defining the scale, xsize
and ysize should be divided by 2 ^ scale.
·
The data byte at offset a must be 0/1 and determines
that the window has a square with a side of 2 ^ scale (with scale = 0 we get a
pixel) and coordinates of the upper left corner (a mod (xsize
shr scale), a div (xsize shr scale))
·
Data size: (xsize shr scale) * (ysize shr scale).
·
Data must be present in the memory and not change
after setting the form.
·
The system views the form data every time the window
is redrawn with function 0.
·
Calling subfunction 0 with a
null pointer results in a return to a rectangular shape.
Constants for registers:
eax
- SF_SET_WINDOW_SHAPE (50)