Module: Maze::Formatter::Png
- Included in:
- Orthogonal, Sigma
- Defined in:
- lib/maze/formatters/png.rb,
lib/maze/formatters/png/sigma.rb,
lib/maze/formatters/png/orthogonal.rb
Defined Under Namespace
Classes: Orthogonal, Sigma
Constant Summary collapse
- PADDING =
10
- LENGTH =
30
Instance Method Summary collapse
Instance Method Details
#draw(output_file = nil) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/maze/formatters/png.rb', line 8 def draw(output_file = nil) lines.each do |end_points| image.line(*end_points, ChunkyPNG::Color::BLACK) end image.save(output_file, :fast_rgb) if output_file end |