Class: HexaPDF::Content::Operator::SetSpacingMoveTextNextLineAndShowText

Inherits:
BaseOperator
  • Object
show all
Defined in:
lib/hexapdf/content/operator.rb

Overview

Implementation of the “ operator.

See: PDF1.7 s9.4.3

Instance Attribute Summary

Attributes inherited from BaseOperator

#name

Instance Method Summary collapse

Constructor Details

#initializeSetSpacingMoveTextNextLineAndShowText

Creates the operator.



970
971
972
# File 'lib/hexapdf/content/operator.rb', line 970

def initialize
  super('"')
end

Instance Method Details

#invoke(processor, word_space, char_space, text) ⇒ Object

:nodoc:



974
975
976
977
978
# File 'lib/hexapdf/content/operator.rb', line 974

def invoke(processor, word_space, char_space, text) #:nodoc:
  processor.operators[:Tw].invoke(processor, word_space)
  processor.operators[:Tc].invoke(processor, char_space)
  processor.operators[:"'"].invoke(processor, text)
end

#serialize(serializer, word_space, char_space, text) ⇒ Object

:nodoc:



980
981
982
983
984
# File 'lib/hexapdf/content/operator.rb', line 980

def serialize(serializer, word_space, char_space, text) #:nodoc:
  "#{serializer.serialize_numeric(word_space)} " \
    "#{serializer.serialize_numeric(char_space)} " \
    "#{serializer.serialize_string(text)}\"\n"
end