Class Origami::Graphics::Instruction::L
In: sources/parser/graphics/path.rb
Parent: Object

Methods

new   update_state  

Included Modules

PDF::Instruction

Public Class methods

[Source]

     # File sources/parser/graphics/path.rb, line 160
160:         def initialize(x,y); super('l', x, y) end

Public Instance methods

[Source]

     # File sources/parser/graphics/path.rb, line 162
162:         def update_state(gs)
163:           if gs.current_path.empty? 
164:             raise GraphicsStateError, "No current point is defined"
165:           end
166: 
167:           subpath = gs.current_path.last
168: 
169:           from = subpath.current_point
170:           to = @operands
171:           subpath.add_segment(Path::Line.new(from, to))
172:           self
173:         end

[Validate]