Class: HexaPDF::Content::Operator::SetFontAndSize
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::SetFontAndSize
- Defined in:
- lib/hexapdf/content/operator.rb
Overview
Implementation of the ‘Tf’ operator.
See: PDF2.0 s9.3.1
Instance Attribute Summary
Attributes inherited from BaseOperator
Instance Method Summary collapse
-
#initialize ⇒ SetFontAndSize
constructor
Creates the operator.
-
#invoke(processor, font, size) ⇒ Object
:nodoc:.
-
#serialize(serializer, font, size) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ SetFontAndSize
Creates the operator.
762 763 764 |
# File 'lib/hexapdf/content/operator.rb', line 762 def initialize super('Tf') end |
Instance Method Details
#invoke(processor, font, size) ⇒ Object
:nodoc:
766 767 768 769 |
# File 'lib/hexapdf/content/operator.rb', line 766 def invoke(processor, font, size) #:nodoc: processor.graphics_state.font = processor.resources.font(font) processor.graphics_state.font_size = size end |
#serialize(serializer, font, size) ⇒ Object
:nodoc:
771 772 773 |
# File 'lib/hexapdf/content/operator.rb', line 771 def serialize(serializer, font, size) #:nodoc: "#{serializer.serialize_symbol(font)} #{serializer.serialize_numeric(size)} Tf\n" end |