class SyncSign::Widget::Box
A box that contains x/y coordinates, width and height, and colour information. This can't be used on its own, only its superclasses can be added to templates. You may be looking for Rectangle
if you want to draw rectangles.
Attributes
bgcolour[RW]
@return [Symbol] the background colour of the box.
colour[RW]
@return [Symbol] the stroke or foreground colour of the box.
height[RW]
@return [Integer] the height of the box.
width[RW]
@return [Integer] the width of the box.
Public Class Methods
new(x: nil, y: nil, width: nil, height: nil, colour: :black, bgcolour: :white)
click to toggle source
Calls superclass method
SyncSign::Widget::Item::new
# File lib/syncsign/widget-core.rb, line 45 def initialize(x: nil, y: nil, width: nil, height: nil, colour: :black, bgcolour: :white) Widget::check_colours [colour, bgcolour] @colour = colour @bgcolour = bgcolour @width = width @height = height super(x: x, y: y) end