Class: HexaPDF::Content::Operator::MoveText

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

Overview

Implementation of the ‘Td’ operator.

See: PDF1.7 s9.4.2

Instance Attribute Summary

Attributes inherited from BaseOperator

#name

Instance Method Summary collapse

Constructor Details

#initializeMoveText

Creates the operator.



852
853
854
# File 'lib/hexapdf/content/operator.rb', line 852

def initialize
  super('Td')
end

Instance Method Details

#invoke(processor, tx, ty) ⇒ Object

:nodoc:



856
857
858
859
# File 'lib/hexapdf/content/operator.rb', line 856

def invoke(processor, tx, ty) #:nodoc:
  processor.graphics_state.tlm.translate(tx, ty)
  processor.graphics_state.tm = processor.graphics_state.tlm.dup
end

#serialize(serializer, tx, ty) ⇒ Object

:nodoc:



861
862
863
# File 'lib/hexapdf/content/operator.rb', line 861

def serialize(serializer, tx, ty) #:nodoc:
  "#{serializer.serialize_numeric(tx)} #{serializer.serialize_numeric(ty)} Td\n"
end