Class: HexaPDF::Content::Operator::MoveTextAndSetLeading
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::MoveTextAndSetLeading
- 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
Instance Method Summary collapse
-
#initialize ⇒ MoveTextAndSetLeading
constructor
Creates the operator.
-
#invoke(processor, tx, ty) ⇒ Object
:nodoc:.
-
#serialize(serializer, tx, ty) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ MoveTextAndSetLeading
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 |