class RatatuiRuby::Widgets::Shape::Rectangle
A rectangle shape on a canvas.
- x
-
The x-coordinate of the bottom-left corner.
- y
-
The y-coordinate of the bottom-left corner.
- width
-
The width of the rectangle.
- height
-
The height of the rectangle.
- color
-
The color of the rectangle.
Attributes
Color.
Height (Float, duck-typed via to_f).
Width (Float, duck-typed via to_f).
Bottom-left X (Float, duck-typed via to_f).
Bottom-left Y (Float, duck-typed via to_f).
Public Class Methods
Source
# File lib/ratatui_ruby/widgets/canvas.rb, line 110 def initialize(x:, y:, width:, height:, color:) super(x: Float(x), y: Float(y), width: Float(width), height: Float(height), color:) end
Creates a new Rectangle.
- x
-
Bottom-left X (Numeric).
- y
-
Bottom-left Y (Numeric).
- width
-
Width (Numeric).
- height
-
Height (Numeric).
- color
-
Color (Symbol).
Calls superclass method