Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.
Color
Structure that represents a color
Operations
GetA #
Get alpha
method : public : GetA() ~ Int
Return
GetB #
Get blue
method : public : GetB() ~ Int
Return
GetG #
Get green
method : public : GetG() ~ Int
Return
GetR #
Get red
method : public : GetR() ~ Int
Return
New # constructor
Default black color
New()
New # constructor
RGB Color with alpha set to 255
New(r:Int, g:Int, b:Int)
Parameters
New # constructor
RGBA color
New(r:Int, g:Int, b:Int, a:Int)
Parameters
SetA #
Set alpha
method : public : SetA(a:Int) ~ Nil
Parameters
| Name | Type | Description |
|---|
| a | Int | alpha |
SetB #
Set blue
method : public : SetB(b:Int) ~ Nil
Parameters
| Name | Type | Description |
|---|
| b | Int | blue |
SetG #
Set green
method : public : SetG(g:Int) ~ Nil
Parameters
| Name | Type | Description |
|---|
| g | Int | green |
SetR #
Set red
method : public : SetR(r:Int) ~ Nil
Parameters
| Name | Type | Description |
|---|
| r | Int | red |
ToString #
String RGBA representation
method : public : ToString() ~ String
Return
| Type | Description |
|---|
| String | string representation |