Class: HexaPDF::Content::Operator::SetStrokingColorSpace
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::SetStrokingColorSpace
- Defined in:
- lib/hexapdf/content/operator.rb
Overview
Implementation of the ‘CS’ operator.
See: PDF2.0 s8.6.8
Instance Attribute Summary
Attributes inherited from BaseOperator
Instance Method Summary collapse
-
#initialize ⇒ SetStrokingColorSpace
constructor
Creates the operator.
-
#invoke(processor, name) ⇒ Object
:nodoc:.
-
#serialize(serializer, name) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ SetStrokingColorSpace
Creates the operator.
357 358 359 |
# File 'lib/hexapdf/content/operator.rb', line 357 def initialize super('CS') end |
Instance Method Details
#invoke(processor, name) ⇒ Object
:nodoc:
361 362 363 |
# File 'lib/hexapdf/content/operator.rb', line 361 def invoke(processor, name) #:nodoc: processor.graphics_state.stroke_color_space = processor.resources.color_space(name) end |
#serialize(serializer, name) ⇒ Object
:nodoc:
365 366 367 |
# File 'lib/hexapdf/content/operator.rb', line 365 def serialize(serializer, name) #:nodoc: "#{serializer.serialize_symbol(name)} CS\n" end |