Class: LiteRGSS::Rect

Inherits:
Object show all
Defined in:
LiteRGSS.rb.yard.rb

Overview

Class that defines a rectangular surface of a Graphical element

Direct Known Subclasses

Rect

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#heightInteger

Returns height of the surface.

Returns:

  • (Integer)

    height of the surface



16
17
18
# File 'LiteRGSS.rb.yard.rb', line 16

def height
  @height
end

#widthInteger

Returns width of the surface.

Returns:

  • (Integer)

    width of the surface



14
15
16
# File 'LiteRGSS.rb.yard.rb', line 14

def width
  @width
end

#xInteger

Returns x position of the surface.

Returns:

  • (Integer)

    x position of the surface



10
11
12
# File 'LiteRGSS.rb.yard.rb', line 10

def x
  @x
end

#yInteger

Returns y position of the surface.

Returns:

  • (Integer)

    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

Parameters:

  • x (Integer)

    x position of the surface

  • y (Integer)

    y position of the surface

  • width (Integer)

    width of the surface

  • height (Integer)

    height of the surface



22
23
24
# File 'LiteRGSS.rb.yard.rb', line 22

def self.new(x, y, width, height)

end

Instance Method Details

#emptyself

Set all the rect coordinates to 0

Returns:

  • (self)


46
47
48
# File 'LiteRGSS.rb.yard.rb', line 46

def empty

end

#inspectString

Convert the rect to a string that can be shown to the user

Returns:

  • (String)

    (x, y, width, height)



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

Parameters:

  • x (Integer, nil)

    x position of the surface

  • y (Integer, nil) (defaults to: nil)

    y position of the surface

  • width (Integer, nil) (defaults to: nil)

    width of the surface

  • height (Integer, nil) (defaults to: nil)

    height of the surface

Returns:

  • (self)


31
32
33
# File 'LiteRGSS.rb.yard.rb', line 31

def set(x, y = nil, width = nil, height = nil)

end

#to_sString

Convert the rect to a string that can be shown to the user

Returns:

  • (String)

    (x, y, width, height)



36
37
38
# File 'LiteRGSS.rb.yard.rb', line 36

def to_s

end