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: PDF2.0 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.
871 872 873 |
# File 'lib/hexapdf/content/operator.rb', line 871 def initialize super('TD') end |
Instance Method Details
#invoke(processor, tx, ty) ⇒ Object
:nodoc:
875 876 877 878 |
# File 'lib/hexapdf/content/operator.rb', line 875 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:
880 881 882 |
# File 'lib/hexapdf/content/operator.rb', line 880 def serialize(serializer, tx, ty) #:nodoc: "#{serializer.serialize_numeric(tx)} #{serializer.serialize_numeric(ty)} TD\n" end |