Graphics#
Contains functions related to drawing and visual effects.
Access with Graphics->
.
Variables#
const int[] |
|
const int |
|
const int |
|
const bool[] |
Functions#
void |
Wavy(bool style_in) |
void |
Zap(bool style_in) |
void |
Tint(int red, int green, int blue) |
void |
MonochromeHue(int red, int green, int blue, bool distributed = |
void |
|
int |
NumDraws() deprecated |
int |
MaxDraws() deprecated |
int |
GetPixel(untyped b, int x, int y) |
CreatePalData() deprecated |
|
CreatePalData(rgb color) deprecated |
|
rgb |
MixColor(rgb start, rgb end, int percent, int color_space = |
rgb |
CreateRGB(long hexcode) |
rgb |
CreateRGB(int r, int g, int b) |
void |
ConvertFromRGB(int arg1, rgb arg2, int arg3) |
rgb |
ConvertToRGB(int color_space, int[] arr) |
int |
GetTilePixel(int tile, int x, int y, int cset = |
void |
SetTilePixel(int tile, int x, int y, int color) |
Variable descriptions#
const int[] IsBlankTile π Source
True if the given tile is entirely blank (all color 0).
const int NumDraws π Source
Returns the number of script drawing commands that are currently waiting in the draw queue.
const int MaxDraws π Source
Returns the limit of the drawing queue. If NumDraws returns the same as this, no further drawing commands will work until the queue has been cleared (i.e. the next frame)
const bool[] Is8BitTile π Source
True if the given tile uses 8-bit color.
Function descriptions#
void Wavy(bool style_in) π Source
Creates a βwaveβ effect, as a βWavyβ warp type uses.
void Zap(bool style_in) π Source
Creates a βzapβ effect, as a βZapβ warp type uses.
void Tint(int red, int green, int blue) π Source
Tints the palette by adding red
, green
, and blue
to the respective
values of every palette swatch. Subsequent calls to these functions will
SUM the tint with all previous tints.
void MonochromeHue(int red, int green, int blue, bool distributed = true
) π Source
Tints the palette by adding red
, green
, and blue
to the respective
values of every palette swatch. Subsequent calls to these functions will
SUM the tint with all previous tints.
Clears all tint effects.
Returns the number of script drawing commands that are currently waiting in the draw queue.
Warning
Deprecated! Use NumDraws instead!
Returns the limit of the drawing queue. If NumDraws returns the same as this, no further drawing commands will work until the queue has been cleared (i.e. the next frame)
Warning
Deprecated! Use MaxDraws instead!
int GetPixel(untyped b, int x, int y) π Source
Same as bitmap::GetPixel()
paldata CreatePalData() π Source
Warning
Deprecated! Use new paldata()
instead!
paldata CreatePalData(rgb color) π Source
Warning
Deprecated! Use new paldata(color)
instead!
rgb MixColor(rgb start, rgb end, int percent, int color_space = 0
) π Source
Interpolates a color between start and end and then returns the resulting rgb.
rgb CreateRGB(long hexcode) π Source
Takes a long hexcode (0xRRGGBBL), with each rgb section 0 <= n <= 255.
rgb CreateRGB(int r, int g, int b) π Source
Takes an (r,g,b) ranging 0 <= n <= 255.
0 <= n <= 63 if compat QR βScripts use 6-bit color (0-63) instead of 8-bit (0-255)β is enabled.
void ConvertFromRGB(int arg1, rgb arg2, int arg3) π Source
rgb ConvertToRGB(int color_space, int[] arr) π Source
int GetTilePixel(int tile, int x, int y, int cset = 0
) π Source
Returns the color index at an x,y coordinate of a tile.
void SetTilePixel(int tile, int x, int y, int color) π Source
Sets the color index an an x,y coordinate of a tile.