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