module CooCoo::Drawing::Sixel

Public Class Methods

from_array(a, width, height = nil) click to toggle source
# File lib/coo-coo/drawing/sixel.rb, line 6
def self.from_array(a, width, height = nil)
  s = Stringer.new
  s.begin_sixel + s.from_array(a, width, height) + s.newline + s.finish_sixel
end
to_string(&block) click to toggle source
# File lib/coo-coo/drawing/sixel.rb, line 17
def self.to_string(&block)
  stream = StringIO.new
  Streamer.new(stream, &block)
  stream.string
end
with_sixel(io = $stdout, &block) click to toggle source
# File lib/coo-coo/drawing/sixel.rb, line 11
def self.with_sixel(io = $stdout, &block)
  Streamer.new(io) do |s|
    block.call(s)
  end
end