Class: HexaPDF::Content::Operator::SetNonStrokingColorSpace
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::SetNonStrokingColorSpace
- 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 ⇒ SetNonStrokingColorSpace
constructor
Creates the operator.
-
#invoke(processor, name) ⇒ Object
:nodoc:.
-
#serialize(serializer, name) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ SetNonStrokingColorSpace
Creates the operator.
377 378 379 |
# File 'lib/hexapdf/content/operator.rb', line 377 def initialize super('cs') end |
Instance Method Details
#invoke(processor, name) ⇒ Object
:nodoc:
381 382 383 |
# File 'lib/hexapdf/content/operator.rb', line 381 def invoke(processor, name) #:nodoc: processor.graphics_state.fill_color_space = processor.resources.color_space(name) end |
#serialize(serializer, name) ⇒ Object
:nodoc:
385 386 387 |
# File 'lib/hexapdf/content/operator.rb', line 385 def serialize(serializer, name) #:nodoc: "#{serializer.serialize_symbol(name)} cs\n" end |