Class: HexaPDF::Content::Operator::MoveTextAndSetLeading

Inherits:
BaseOperator
  • Object
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

#initializeMoveTextAndSetLeading

Creates the operator.



873
874
875
# File 'lib/hexapdf/content/operator.rb', line 873

def initialize
  super('TD')
end

Instance Method Details

#invoke(processor, tx, ty) ⇒ Object

:nodoc:



877
878
879
880
# File 'lib/hexapdf/content/operator.rb', line 877

def invoke(processor, tx, ty) #:nodoc:
  processor.operators[:TL].invoke(processor, -ty)
  processor.operators[:Td].invoke(processor, tx, ty)
end

#serialize(serializer, tx, ty) ⇒ Object

:nodoc:



882
883
884
# File 'lib/hexapdf/content/operator.rb', line 882

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