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.
Point
Defines a two dimensional point
Operations
GetX #
Get x
method : public : GetX() ~ Int
Return
| Type | Description |
|---|
| Int | x position |
GetY #
Get y
method : public : GetY() ~ Int
Return
| Type | Description |
|---|
| Int | y position |
New # constructor
Constructor
New(x:Int, y:Int)
Parameters
| Name | Type | Description |
|---|
| x | Int | x position |
| y | Int | y position |
New # constructor
Constructor set x and y to 0
New()
SetX #
Set x
method : public : SetX(x:Int) ~ Nil
Parameters
| Name | Type | Description |
|---|
| x | Int | x position |
SetY #
Set y
method : public : SetY(y:Int) ~ Nil
Parameters
| Name | Type | Description |
|---|
| y | Int | y position |
ToString #
String representation of point
method : public : ToString() ~ String
Return
| Type | Description |
|---|
| String | string representation |