class

GSDL::Line

Inherits GSDL::Shape < GSDL::Centerable < GSDL::Tweenable < Reference < Object

Constructors

new(x1 : Num = 0, y1 : Num = 0, x2 : Num = 0, y2 : Num = 0, color : Color = Color::White, z_index = 0)
Source
new(p1 : Tuple(Num, Num), p2 : Tuple(Num, Num), color : Color = Color::White, z_index = 0)
Source
new(points : Tuple(Num, Num, Num, Num), color : Color = Color::White, z_index = 0)
Source

Instance methods

center(x : Num = 0, y : Num = 0, width : Num = 1, height : Num = 1)
Source
distance
Source
height
Source
perform_draw(draw : Draw)
Source
render_x
Source
render_y
Source
update_geometry

needs to be called at the end of initialization, and in every #draw method (only if #changed?)

Source
width
Source
x1=(x1 : Num)
Source
x2=(x2 : Num)
Source
x=(x : Num)

requires

Source
y1=(y1 : Num)
Source
y2=(y2 : Num)
Source
y=(y : Num)
Source