class Game::Line
- Game::Line
- Game::Shape
- Reference
- Object
Defined in:
game/shapes/line.crConstant Summary
-
DEFAULT_THICKNESS =
1
Constructors
Instance Method Summary
- #color=(value : Int32 | Float32)
- #draw_filled(parent_x = 0, parent_y = 0)
- #draw_line(parent_x = 0, parent_y = 0, color = @color)
- #draw_outlined(parent_x = 0, parent_y = 0)
- #end_x : Int32 | Float32
- #end_x=(value : Int32 | Float32)
- #end_y : Int32 | Float32
- #end_y=(value : Int32 | Float32)
- #height
- #height=(height)
- #rectangle
- #start_x : Int32 | Float32
- #start_x=(value : Int32 | Float32)
- #start_y : Int32 | Float32
- #start_y=(value : Int32 | Float32)
- #thickness : Int32 | Float32
- #thickness=(value : Int32 | Float32)
- #width
- #width=(width)
-
#x
TODO needs to be reworked since start x,y isn't always top left
- #x=(x : Float32 | Int32)
-
#y
TODO needs to be reworked since start x,y isn't always top left
- #y=(y : Float32 | Int32)
Instance methods inherited from class Game::Shape
color : Color
color,
color=(color : Color)
color=,
draw(image : Image, parent_x = 0, parent_y = 0)draw(parent_x = 0, parent_y = 0) draw, draw_filled(image : Image, parent_x = 0, parent_y = 0)
draw_filled(parent_x = 0, parent_y = 0) draw_filled, draw_outlined(image : Image, parent_x = 0, parent_y = 0)
draw_outlined(parent_x = 0, parent_y = 0) draw_outlined, filled=(filled : Bool) filled=, filled? : Bool filled?, height height, height=(_height) height=, update(_frame_time) update, width width, width=(_width) width=, x x, x=(_x) x=, y y, y=(_y) y=
Constructor methods inherited from class Game::Shape
new(color, filled : Bool = FILLED)
new
Constructor Detail
def self.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)
#