Sha256: 5ab6d25e0f55f4df90592f585448cae83c196859daefb3cf094295f514b8d759
Contents?: true
Size: 1.43 KB
Versions: 7
Compression:
Stored size: 1.43 KB
Contents
=begin = File graphics/render.rb = Info This file is part of Origami, PDF manipulation framework for Ruby Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org> All right reserved. Origami is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Origami is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Origami. If not, see <http://www.gnu.org/licenses/>. =end module Origami module Graphics module Canvas attr_reader :gs def initialize @gs = Graphics::State.new end def clear @gs.reset end def write_text(s); end def stroke_path; end def fill_path; end end class DummyCanvas include Canvas end class TextCanvas include Canvas def initialize(output = STDOUT, columns = 80, lines = 25) super() @output = output @columns, @lines = columns, lines end def write_text(s) @output.print(s) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems