Class: RatatuiRuby::Widgets::Shape::Line
- Inherits:
-
Object
- Object
- RatatuiRuby::Widgets::Shape::Line
- Defined in:
- lib/ratatui_ruby/widgets/canvas.rb
Overview
A line shape on a canvas.
- x1
-
The starting x-coordinate.
- y1
-
The starting y-coordinate.
- x2
-
The ending x-coordinate.
- y2
-
The ending y-coordinate.
- color
-
The color of the line.
Instance Method Summary collapse
-
#initialize(x1:, y1:, x2:, y2:, color:) ⇒ Line
constructor
Creates a new Line.
Constructor Details
#initialize(x1:, y1:, x2:, y2:, color:) ⇒ Line
Creates a new Line.
- x1
-
Start X (Numeric).
- y1
-
Start Y (Numeric).
- x2
-
End X (Numeric).
- y2
-
End Y (Numeric).
- color
-
Line color (Symbol).
70 71 72 |
# File 'lib/ratatui_ruby/widgets/canvas.rb', line 70 def initialize(x1:, y1:, x2:, y2:, color:) super(x1: Float(x1), y1: Float(y1), x2: Float(x2), y2: Float(y2), color:) end |