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

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

Overview

Implementation of the ‘m’ operator.

See: PDF2.0 s8.5.2.1

Instance Attribute Summary

Attributes inherited from BaseOperator

#name

Instance Method Summary collapse

Constructor Details

#initializeMoveTo

Creates the operator.



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

def initialize
  super('m')
end

Instance Method Details

#invoke(processor, _x, _y) ⇒ Object

:nodoc:



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

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

#serialize(serializer, x, y) ⇒ Object

:nodoc:



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

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