Class: HexaPDF::Content::Operator::SetStrokingColorSpace

Inherits:
BaseOperator
  • Object
show all
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

#name

Instance Method Summary collapse

Constructor Details

#initializeSetStrokingColorSpace

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