Class: Conquer::Dzen::Graphics::Rectangle

Inherits:
Graphic
  • Object
show all
Defined in:
lib/conquer/dzen/graphics/rectangle.rb

Direct Known Subclasses

RectangleOutline

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Graphic

#move, #to_s

Methods included from Positioning

#ignore_bg, #lock_x, #shift, #unlock_x

Constructor Details

#initialize(width, height) ⇒ Rectangle

Returns a new instance of Rectangle.



9
10
11
12
13
14
15
# File 'lib/conquer/dzen/graphics/rectangle.rb', line 9

def initialize(width, height)
  super()
  @width = width
  @height = height
  @template = '^r(%dx%d)'
  @template_args = [width, height]
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



7
8
9
# File 'lib/conquer/dzen/graphics/rectangle.rb', line 7

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width.



7
8
9
# File 'lib/conquer/dzen/graphics/rectangle.rb', line 7

def width
  @width
end