Class: HexaPDF::Content::Operator::SetTextMatrix
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::SetTextMatrix
- Defined in:
- lib/hexapdf/content/operator.rb
Overview
Implementation of the ‘Tm’ operator.
See: PDF2.0 s9.4.2
Instance Attribute Summary
Attributes inherited from BaseOperator
Instance Method Summary collapse
-
#initialize ⇒ SetTextMatrix
constructor
Creates the operator.
-
#invoke(processor, a, b, c, d, e, f) ⇒ Object
:nodoc:.
-
#serialize(serializer, a, b, c, d, e, f) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ SetTextMatrix
Creates the operator.
892 893 894 |
# File 'lib/hexapdf/content/operator.rb', line 892 def initialize super('Tm') end |
Instance Method Details
#invoke(processor, a, b, c, d, e, f) ⇒ Object
:nodoc:
896 897 898 899 |
# File 'lib/hexapdf/content/operator.rb', line 896 def invoke(processor, a, b, c, d, e, f) #:nodoc: processor.graphics_state.tm = TransformationMatrix.new(a, b, c, d, e, f) processor.graphics_state.tlm = processor.graphics_state.tm.dup end |
#serialize(serializer, a, b, c, d, e, f) ⇒ Object
:nodoc:
901 902 903 904 905 |
# File 'lib/hexapdf/content/operator.rb', line 901 def serialize(serializer, a, b, c, d, e, f) #:nodoc: "#{serializer.serialize_numeric(a)} #{serializer.serialize_numeric(b)} " \ "#{serializer.serialize_numeric(c)} #{serializer.serialize_numeric(d)} " \ "#{serializer.serialize_numeric(e)} #{serializer.serialize_numeric(f)} Tm\n" end |