Class: LiteRGSS::Rect
Overview
Class that defines a rectangular surface of a Graphical element
Direct Known Subclasses
Instance Attribute Summary collapse
-
#height ⇒ Integer
Height of the surface.
-
#width ⇒ Integer
Width of the surface.
-
#x ⇒ Integer
X position of the surface.
-
#y ⇒ Integer
Y position of the surface.
Class Method Summary collapse
-
.new(x, y, width, height)
Create a new surface.
Instance Method Summary collapse
-
#empty ⇒ self
Set all the rect coordinates to 0.
-
#inspect ⇒ String
Convert the rect to a string that can be shown to the user.
-
#set(x, y = nil, width = nil, height = nil) ⇒ self
Set the parameters of the surface.
-
#to_s ⇒ String
Convert the rect to a string that can be shown to the user.
Instance Attribute Details
#height ⇒ Integer
Returns height of the surface.
16 17 18 |
# File 'LiteRGSS.rb.yard.rb', line 16 def height @height end |
#width ⇒ Integer
Returns width of the surface.
14 15 16 |
# File 'LiteRGSS.rb.yard.rb', line 14 def width @width end |
#x ⇒ Integer
Returns x position of the surface.
10 11 12 |
# File 'LiteRGSS.rb.yard.rb', line 10 def x @x end |
#y ⇒ Integer
Returns y position of the surface.
12 13 14 |
# File 'LiteRGSS.rb.yard.rb', line 12 def y @y end |
Class Method Details
.new(x, y, width, height)
Create a new surface
22 23 24 |
# File 'LiteRGSS.rb.yard.rb', line 22 def self.new(x, y, width, height) end |
Instance Method Details
#empty ⇒ self
Set all the rect coordinates to 0
46 47 48 |
# File 'LiteRGSS.rb.yard.rb', line 46 def empty end |
#inspect ⇒ String
Convert the rect to a string that can be shown to the user
41 42 43 |
# File 'LiteRGSS.rb.yard.rb', line 41 def inspect end |
#set(x, y = nil, width = nil, height = nil) ⇒ self
Set the parameters of the surface
31 32 33 |
# File 'LiteRGSS.rb.yard.rb', line 31 def set(x, y = nil, width = nil, height = nil) end |
#to_s ⇒ String
Convert the rect to a string that can be shown to the user
36 37 38 |
# File 'LiteRGSS.rb.yard.rb', line 36 def to_s end |