Class: HexaPDF::Content::Operator::SetNonStrokingColorSpace

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

#name

Instance Method Summary collapse

Constructor Details

#initializeSetNonStrokingColorSpace

Creates the operator.



376
377
378
# File 'lib/hexapdf/content/operator.rb', line 376

def initialize
  super('cs')
end

Instance Method Details

#invoke(processor, name) ⇒ Object

:nodoc:



380
381
382
# File 'lib/hexapdf/content/operator.rb', line 380

def invoke(processor, name) #:nodoc:
  processor.graphics_state.fill_color_space = processor.resources.color_space(name)
end

#serialize(serializer, name) ⇒ Object

:nodoc:



384
385
386
# File 'lib/hexapdf/content/operator.rb', line 384

def serialize(serializer, name) #:nodoc:
  "#{serializer.serialize_symbol(name)} cs\n".freeze
end