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: PDF1.7 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.
356 357 358 |
# File 'lib/hexapdf/content/operator.rb', line 356 def initialize super('CS') end |
Instance Method Details
#invoke(processor, name) ⇒ Object
:nodoc:
360 361 362 |
# File 'lib/hexapdf/content/operator.rb', line 360 def invoke(processor, name) #:nodoc: processor.graphics_state.stroke_color_space = processor.resources.color_space(name) end |
#serialize(serializer, name) ⇒ Object
:nodoc:
364 365 366 |
# File 'lib/hexapdf/content/operator.rb', line 364 def serialize(serializer, name) #:nodoc: "#{serializer.serialize_symbol(name)} CS\n".freeze end |