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: PDF1.7 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.
500 501 502 |
# File 'lib/hexapdf/content/operator.rb', line 500 def initialize super('K') end |
Instance Method Details
#invoke(processor, c, m, y, k) ⇒ Object
:nodoc:
504 505 506 507 |
# File 'lib/hexapdf/content/operator.rb', line 504 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:
509 510 511 512 |
# File 'lib/hexapdf/content/operator.rb', line 509 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 |