Class: HexaPDF::Content::ColorSpace::DeviceCMYK::Color
- Inherits:
-
Object
- Object
- HexaPDF::Content::ColorSpace::DeviceCMYK::Color
- Includes:
- ColorUtils
- Defined in:
- lib/hexapdf/content/color_space.rb
Overview
A color in the DeviceCMYK color space.
See: PDF2.0 s8.6.4.4
Instance Method Summary collapse
-
#color_space ⇒ Object
Returns the DeviceCMYK color space module.
-
#components ⇒ Object
Returns the CMYK color as an array of normalized color values.
-
#initialize(c, m, y, k) ⇒ Color
constructor
Initializes the color with the
c
(cyan),m
(magenta),y
(yellow) andk
(black) components.
Methods included from ColorUtils
Constructor Details
#initialize(c, m, y, k) ⇒ Color
Initializes the color with the c
(cyan), m
(magenta), y
(yellow) and k
(black) components.
Each argument has to be a float between 0.0 and 1.0.
599 600 601 602 603 604 |
# File 'lib/hexapdf/content/color_space.rb', line 599 def initialize(c, m, y, k) @c = c @m = m @y = y @k = k end |
Instance Method Details
#color_space ⇒ Object
Returns the DeviceCMYK color space module.
607 608 609 |
# File 'lib/hexapdf/content/color_space.rb', line 607 def color_space DeviceCMYK::DEFAULT end |
#components ⇒ Object
Returns the CMYK color as an array of normalized color values.
612 613 614 |
# File 'lib/hexapdf/content/color_space.rb', line 612 def components [@c, @m, @y, @k] end |