Class: Mahoujin::Graphics::Layout

Inherits:
Object
  • Object
show all
Defined in:
lib/mahoujin/graphics/layout.rb

Instance Method Summary collapse

Instance Method Details

#layout(atom, style) ⇒ Object


4
5
6
7
8
9
10
11
12
# File 'lib/mahoujin/graphics/layout.rb', line 4

def layout(atom, style)
  Cairo::SVGSurface.new(StringIO.new, 200, 200) do |surface|
    @ctx = Cairo::Context.new(surface)
    @style = style

    initialize_graphics_environment
    layout_atom(atom)
  end
end