Class: RatatuiRuby::Widgets::Shape::Rectangle

Inherits:
Object
  • Object
show all
Defined in:
lib/ratatui_ruby/widgets/canvas.rb

Overview

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.

Instance Method Summary collapse

Constructor Details

#initialize(x:, y:, width:, height:, color:) ⇒ Rectangle

Creates a new Rectangle.

x

Bottom-left X (Numeric).

y

Bottom-left Y (Numeric).

width

Width (Numeric).

height

Height (Numeric).

color

Color (Symbol).



110
111
112
# 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