class Phantom::SVG::Frame::ViewBox
ViewBox
helper.
Attributes
height[RW]
width[RW]
x[RW]
y[RW]
Public Class Methods
new(x = 0, y = 0, width = 64, height = 64)
click to toggle source
# File lib/phantom/frame.rb, line 20 def initialize(x = 0, y = 0, width = 64, height = 64) @x = x @y = y @width = width @height = height end
Public Instance Methods
set_from_text(text)
click to toggle source
# File lib/phantom/frame.rb, line 27 def set_from_text(text) values = text.split(' ', 4) initialize(values[0].to_i, values[1].to_i, values[2].to_i, values[3].to_i) self end
to_s()
click to toggle source
# File lib/phantom/frame.rb, line 33 def to_s "#{@x.to_i} #{@y.to_i} #{@width.to_i} #{@height.to_i}" end