Palette manipulation. More...
Public Member Functions | |
| void | EnablePaletteUsage (boolean usePalettes) |
| Enables or disables palette usage for the application. | |
| void | LoadFromResource (integer paletteIndex, string filename, bitfield activeRows) |
| Loads palette from an .act, .col, .gif, .png, or .hpal resource. | |
| void | LoadFromImage (integer paletteIndex, integer image) |
| Loads palette from an image resource. | |
| integer | GetColor (integer paletteIndex, integer colorIndex) |
| Gets a color from the specified palette. | |
| void | SetColor (integer paletteIndex, integer colorIndex, integer hex) |
| Sets a color on the specified palette, format 0xRRGGBB. | |
| boolean | GetColorTransparent (integer paletteIndex, integer colorIndex) |
| Gets if the color on the specified palette is transparent. | |
| void | SetColorTransparent (integer paletteIndex, integer colorIndex, boolean isTransparent) |
| Sets a color on the specified palette transparent. | |
| void | MixPalettes (integer destinationPaletteIndex, integer paletteIndexA, integer paletteIndexB, number mixRatio, integer colorIndexStart, integer colorCount) |
| Mixes colors between two palettes and outputs to another palette. | |
| void | RotateColorsLeft (integer paletteIndex, integer colorIndexStart, integer colorCount) |
| Shifts the colors on the palette to the left. | |
| void | RotateColorsRight (integer paletteIndex, integer colorIndexStart, integer colorCount) |
| Shifts the colors on the palette to the right. | |
| void | CopyColors (integer paletteIndexA, integer colorIndexStartA, integer paletteIndexB, integer colorIndexStartB, integer colorCount) |
| Copies colors from Palette A to Palette B. | |
| void | UsePaletteIndexLines (boolean usePaletteIndexLines) |
| Enables or disables the global palette index table. | |
| void | SetPaletteIndexLines (integer paletteIndex, number lineStart, number lineEnd) |
| Sets the palette to be used for drawing on certain Y-positions on the screen (between the start and end lines). | |
Palette manipulation.
Use Palette.EnablePaletteUsage to enable palettes.
| void Palette.CopyColors | ( | integer | paletteIndexA, |
| integer | colorIndexStartA, | ||
| integer | paletteIndexB, | ||
| integer | colorIndexStartB, | ||
| integer | colorCount ) |
Copies colors from Palette A to Palette B.
| paletteIndexA | Index of palette to get colors from. |
| colorIndexStartA | First index of colors to copy. |
| paletteIndexB | Index of palette to put colors to. |
| colorIndexStartB | First index of colors to be placed. |
| colorCount | Amount of colors to be copied. |
| void Palette.EnablePaletteUsage | ( | boolean | usePalettes | ) |
Enables or disables palette usage for the application.
| usePalettes | Whether to use palettes. |
| integer Palette.GetColor | ( | integer | paletteIndex, |
| integer | colorIndex ) |
Gets a color from the specified palette.
| paletteIndex | Index of palette. |
| colorIndex | Index of color. |
| boolean Palette.GetColorTransparent | ( | integer | paletteIndex, |
| integer | colorIndex ) |
Gets if the color on the specified palette is transparent.
| paletteIndex | Index of palette. |
| colorIndex | Index of color. |
| void Palette.LoadFromImage | ( | integer | paletteIndex, |
| integer | image ) |
Loads palette from an image resource.
| paletteIndex | Index of palette to load to. |
| image | Index of the loaded image. |
| void Palette.LoadFromResource | ( | integer | paletteIndex, |
| string | filename, | ||
| bitfield | activeRows ) |
Loads palette from an .act, .col, .gif, .png, or .hpal resource.
| paletteIndex | Index of palette to load to. |
| filename | Filepath of resource. |
| activeRows | Which rows of 16 colors will not be loaded for .act, .col, and .gif files, from bottom to top. |
| void Palette.MixPalettes | ( | integer | destinationPaletteIndex, |
| integer | paletteIndexA, | ||
| integer | paletteIndexB, | ||
| number | mixRatio, | ||
| integer | colorIndexStart, | ||
| integer | colorCount ) |
Mixes colors between two palettes and outputs to another palette.
| destinationPaletteIndex | Index of palette to put colors to. |
| paletteIndexA | First index of palette. |
| paletteIndexB | Second index of palette. |
| mixRatio | Percentage to mix the colors between 0.0 - 1.0. |
| colorIndexStart | First index of colors to mix. |
| colorCount | Amount of colors to mix. |
| void Palette.RotateColorsLeft | ( | integer | paletteIndex, |
| integer | colorIndexStart, | ||
| integer | colorCount ) |
Shifts the colors on the palette to the left.
| paletteIndex | Index of palette. |
| colorIndexStart | First index of colors to shift. |
| colorCount | Amount of colors to shift. |
| void Palette.RotateColorsRight | ( | integer | paletteIndex, |
| integer | colorIndexStart, | ||
| integer | colorCount ) |
Shifts the colors on the palette to the right.
| paletteIndex | Index of palette. |
| colorIndexStart | First index of colors to shift. |
| colorCount | Amount of colors to shift. |
| void Palette.SetColor | ( | integer | paletteIndex, |
| integer | colorIndex, | ||
| integer | hex ) |
Sets a color on the specified palette, format 0xRRGGBB.
| paletteIndex | Index of palette. |
| colorIndex | Index of color. |
| hex | Hexadecimal color value to set the color to. (format: 0xRRGGBB) |
| void Palette.SetColorTransparent | ( | integer | paletteIndex, |
| integer | colorIndex, | ||
| boolean | isTransparent ) |
Sets a color on the specified palette transparent.
| paletteIndex | Index of palette. |
| colorIndex | Index of color. |
| isTransparent | Whether to make the color transparent. |
| void Palette.SetPaletteIndexLines | ( | integer | paletteIndex, |
| number | lineStart, | ||
| number | lineEnd ) |
Sets the palette to be used for drawing on certain Y-positions on the screen (between the start and end lines).
| paletteIndex | Index of palette. |
| lineStart | Start line to set to the palette. |
| lineEnd | Line where to stop setting the palette. |
| void Palette.UsePaletteIndexLines | ( | boolean | usePaletteIndexLines | ) |
Enables or disables the global palette index table.
| usePaletteIndexLines | Whether to use the global palette index table. |