class

Game::Line

Inherits Game::Shape < Reference < Object

Constants

DEFAULT_THICKNESS = 1

Constructors

new(end_x : Float32 | Int32, end_y : Float32 | Int32, start_x : Float32 | Int32 = 0, start_y : Float32 | Int32 = 0, color = nil, thickness : Float32 | Int32 = DEFAULT_THICKNESS, filled = Shape::FILLED)
Source

Instance methods

color=(value : Int32 | Float32)
Source
draw_filled(parent_x = 0, parent_y = 0)
Source
draw_line(parent_x = 0, parent_y = 0, color = @color)
Source
draw_outlined(parent_x = 0, parent_y = 0)
Source
end_x
Source
end_x=(value : Int32 | Float32)
Source
end_y
Source
end_y=(value : Int32 | Float32)
Source
height
Source
height=(height)
Source
rectangle
Source
start_x
Source
start_x=(value : Int32 | Float32)
Source
start_y
Source
start_y=(value : Int32 | Float32)
Source
thickness
Source
thickness=(value : Int32 | Float32)
Source
width
Source
width=(width)
Source
x

TODO: needs to be reworked since start x,y isn't always top left

Source
x=(x : Float32 | Int32)
Source
y

TODO: needs to be reworked since start x,y isn't always top left

Source
y=(y : Float32 | Int32)
Source