Class: HexaPDF::Content::Operator::MoveText
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::MoveText
- 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 ⇒ MoveText
constructor
Creates the operator.
-
#invoke(processor, tx, ty) ⇒ Object
:nodoc:.
-
#serialize(serializer, tx, ty) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ MoveText
Creates the operator.
850 851 852 |
# File 'lib/hexapdf/content/operator.rb', line 850 def initialize super('Td') end |
Instance Method Details
#invoke(processor, tx, ty) ⇒ Object
:nodoc:
854 855 856 857 |
# File 'lib/hexapdf/content/operator.rb', line 854 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:
859 860 861 |
# File 'lib/hexapdf/content/operator.rb', line 859 def serialize(serializer, tx, ty) #:nodoc: "#{serializer.serialize_numeric(tx)} #{serializer.serialize_numeric(ty)} Td\n" end |