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: PDF1.7 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.
552 553 554 555 556 557 |
# File 'lib/hexapdf/content/color_space.rb', line 552 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.
560 561 562 |
# File 'lib/hexapdf/content/color_space.rb', line 560 def color_space DeviceCMYK::DEFAULT end |
#components ⇒ Object
Returns the CMYK color as an array of normalized color values.
565 566 567 |
# File 'lib/hexapdf/content/color_space.rb', line 565 def components [@c, @m, @y, @k] end |