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