Module: SvgDocument::HasBounds

Included in:
Rectangle
Defined in:
lib/gamebox/core/svg_document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#boundsObject

Returns the value of attribute bounds.



19
20
21
# File 'lib/gamebox/core/svg_document.rb', line 19

def bounds
  @bounds
end

Instance Method Details

#centerObject



25
26
27
# File 'lib/gamebox/core/svg_document.rb', line 25

def center
  @bounds.center if @bounds
end

#translate(vec) ⇒ Object



21
22
23
# File 'lib/gamebox/core/svg_document.rb', line 21

def translate(vec)
  @bounds.translate(vec) if @bounds
end