Class: Hokusai::Commands::SVG

Inherits:
Base
  • Object
show all
Defined in:
ui/src/hokusai/commands/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#after_draw, draw, #draw, on_draw

Constructor Details

#initialize(source, x, y, width, height) ⇒ SVG

Returns a new instance of SVG.



25
26
27
28
29
30
31
32
# File 'ui/src/hokusai/commands/image.rb', line 25

def initialize(source, x, y, width, height)
  @source = source
  @x = x
  @y = y
  @width = width
  @height = height
  @color = Color.new(255, 255, 255, 255)
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



23
24
25
# File 'ui/src/hokusai/commands/image.rb', line 23

def color
  @color
end

#heightObject (readonly)

Returns the value of attribute height.



23
24
25
# File 'ui/src/hokusai/commands/image.rb', line 23

def height
  @height
end

#sourceObject (readonly)

Returns the value of attribute source.



23
24
25
# File 'ui/src/hokusai/commands/image.rb', line 23

def source
  @source
end

#widthObject (readonly)

Returns the value of attribute width.



23
24
25
# File 'ui/src/hokusai/commands/image.rb', line 23

def width
  @width
end

#xObject (readonly)

Returns the value of attribute x.



23
24
25
# File 'ui/src/hokusai/commands/image.rb', line 23

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



23
24
25
# File 'ui/src/hokusai/commands/image.rb', line 23

def y
  @y
end