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.



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

def initialize
  super('m')
end

Instance Method Details

#invoke(processor, _x, _y) ⇒ Object

:nodoc:



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

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

#serialize(serializer, x, y) ⇒ Object

:nodoc:



552
553
554
# File 'lib/hexapdf/content/operator.rb', line 552

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