Class: HexaPDF::Content::ColorSpace::DeviceCMYK

Inherits:
Object
  • Object
show all
Defined in:
lib/hexapdf/content/color_space.rb

Overview

The DeviceCMYK color space.

Defined Under Namespace

Classes: Color

Constant Summary collapse

DEFAULT =

The one (and only) DeviceCMYK color space.

new

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(_definition = nil) ⇒ Object

Returns the DeviceCMYK color space object.



241
242
243
# File 'lib/hexapdf/content/color_space.rb', line 241

def self.new(_definition = nil)
  DEFAULT
end

Instance Method Details

#color(c, m, y, k) ⇒ Object

Returns the color object for the given cyan, magenta, yellow and black components.



251
252
253
# File 'lib/hexapdf/content/color_space.rb', line 251

def color(c, m, y, k)
  Color.new(c, m, y, k)
end

#default_colorObject

Returns the default color for the DeviceCMYK color space.



246
247
248
# File 'lib/hexapdf/content/color_space.rb', line 246

def default_color
  Color.new(0.0, 0.0, 0.0, 1.0)
end

#familyObject

Returns :DeviceCMYK.



256
257
258
# File 'lib/hexapdf/content/color_space.rb', line 256

def family
  :DeviceCMYK
end