Description of MUSHclient world function: world.WindowGradient
||Draws a gradient in a rectangle
long WindowGradient(BSTR WindowName, long Left, long Top, long Right, long Bottom, long StartColour, long EndColour, short Mode);
View list of data type meanings
Draws a gradient - that is a rectangle that gradually changes from the start colour to the end colour.
Note that changes to miniwindows will not become visible until the output window is redrawn. This happens when new (visible) lines arrive from the MUD, or if you call WindowShow, or Redraw.
WindowName - the name of an existing miniwindow.
Left, Top, Right, Bottom - describes the rectangle to draw into.
StartColour - the colour to start the gradient (or, see below if you are using Mode 3)
EndColour - the colour to end the gradient.
Mode - the drawing direction. One of:
1 - horizontal - left to right
2 - vertical - top to bottom
3 - make a texture by xoring the x and y columns sequentially.
For Mode 3 (make a texture) - the StartColour has 3 components, red multiplier, green multiplier, blue multiplier. These are multiplied by the generated colour to give special effects to the generated texture. For example: 0x010203 would multiply the blue component by 1, the green component by 2 and the red component by 3.
For more information, see:
Note: Available in version 4.35 onwards.
WindowGradient (win, 20, 110, 160, 180,
1) -- left to right
WindowGradient (win, 20, 20, 160, 100,
2) -- top to bottom
WindowGradient (win, 0, 0, 256, 256,
3) -- XOR texture
You can use the following constants for the mode:
miniwin.gradient_horizontal = 1
miniwin.gradient_vertical = 2
miniwin.gradient_texture = 3
eNoSuchWindow - no such miniwindow (either source or destination)
eUnknownOption - mode not one of the modes specified above
eOK - completed OK
View list of return code meanings
|Introduced in version
See also ...
Search for script function
Enter a word or phrase in the box below to narrow the list down to those that match.
The function name, prototype, summary, and description are searched.
Leave blank to show all functions.
Many functions return a "code" which indicates the success or otherwise
of the function.
view a list of the return codes
The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).
view a list of the data types used in function prototypes
View all functions
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )