Class: HexaPDF::Content::Operator::SetDeviceCMYKNonStrokingColor
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::SetDeviceCMYKNonStrokingColor
- Defined in:
- lib/hexapdf/content/operator.rb
Overview
Implementation of the âkâ operator.
See: PDF2.0 s8.6.8
Instance Attribute Summary
Attributes inherited from BaseOperator
Instance Method Summary collapse
-
#initialize ⇒ SetDeviceCMYKNonStrokingColor
constructor
Creates the operator.
-
#invoke(processor, c, m, y, k) ⇒ Object
:nodoc:.
-
#serialize(serializer, c, m, y, k) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ SetDeviceCMYKNonStrokingColor
Creates the operator.
520 521 522 |
# File 'lib/hexapdf/content/operator.rb', line 520 def initialize super('k') end |
Instance Method Details
#invoke(processor, c, m, y, k) ⇒ Object
:nodoc:
524 525 526 527 |
# File 'lib/hexapdf/content/operator.rb', line 524 def invoke(processor, c, m, y, k) #:nodoc: processor.graphics_state.fill_color = processor.resources.color_space(:DeviceCMYK).prenormalized_color(c, m, y, k) end |
#serialize(serializer, c, m, y, k) ⇒ Object
:nodoc:
529 530 531 532 |
# File 'lib/hexapdf/content/operator.rb', line 529 def serialize(serializer, c, m, y, k) #:nodoc: "#{serializer.serialize_numeric(c)} #{serializer.serialize_numeric(m)} " \ "#{serializer.serialize_numeric(y)} #{serializer.serialize_numeric(k)} k\n" end |