Class Origami::Graphics::Instruction::RE
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 191
191:         def initialize(x,y,width,height); super('re', x,y,width,height) end

Public Instance methods

[Source]

     # File sources/parser/graphics/path.rb, line 193
193:         def update_state(gs)
194:           x,y,width,height = @operands
195:           tx = x + width
196:           ty = y + height
197:           gs.current_path << (subpath = Path.new)
198:           subpath.segments << Path::Line.new([x,y], [tx,y])
199:           subpath.segments << Path::Line.new([tx,y], [tx, ty])
200:           subpath.segments << Path::Line.new([tx, ty], [x, ty])
201:           subpath.close!
202:           self
203:         end

[Validate]