Class: HexaPDF::Content::Operator::MoveTo

Inherits:
BaseOperator show all
Defined in:
lib/hexapdf/content/operator.rb

Overview

Implementation of the ‘m’ operator.

See: PDF1.7 s8.5.2.1

Instance Attribute Summary

Attributes inherited from BaseOperator

#name

Instance Method Summary collapse

Constructor Details

#initializeMoveTo

Creates the operator.



541
542
543
# File 'lib/hexapdf/content/operator.rb', line 541

def initialize
  super('m')
end

Instance Method Details

#invoke(processor, _x, _y) ⇒ Object

:nodoc:



545
546
547
# File 'lib/hexapdf/content/operator.rb', line 545

def invoke(processor, _x, _y) #:nodoc:
  processor.graphics_object = :path
end

#serialize(serializer, x, y) ⇒ Object

:nodoc:



549
550
551
# File 'lib/hexapdf/content/operator.rb', line 549

def serialize(serializer, x, y) #:nodoc:
  "#{serializer.serialize_numeric(x)} #{serializer.serialize_numeric(y)} m\n"
end