Class: HexaPDF::Content::Operator::SetDeviceCMYKStrokingColor
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::SetDeviceCMYKStrokingColor
- 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 ⇒ SetDeviceCMYKStrokingColor
constructor
Creates the operator.
-
#invoke(processor, c, m, y, k) ⇒ Object
:nodoc:.
-
#serialize(serializer, c, m, y, k) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ SetDeviceCMYKStrokingColor
Creates the operator.
498 499 500 |
# File 'lib/hexapdf/content/operator.rb', line 498 def initialize super('K') end |
Instance Method Details
#invoke(processor, c, m, y, k) ⇒ Object
:nodoc:
502 503 504 505 |
# File 'lib/hexapdf/content/operator.rb', line 502 def invoke(processor, c, m, y, k) #:nodoc: processor.graphics_state.stroke_color = processor.resources.color_space(:DeviceCMYK).prenormalized_color(c, m, y, k) end |
#serialize(serializer, c, m, y, k) ⇒ Object
:nodoc:
507 508 509 510 |
# File 'lib/hexapdf/content/operator.rb', line 507 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 |