Class: HexaPDF::Content::ColorSpace::DeviceRGB

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

Overview

The DeviceRGB color space.

Defined Under Namespace

Classes: Color

Constant Summary collapse

DEFAULT =

The one (and only) DeviceRGB color space.

new

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.newObject

Returns the DeviceRGB color space object.



183
184
185
# File 'lib/hexapdf/content/color_space.rb', line 183

def self.new
  DEFAULT
end

Instance Method Details

#color(r, g, b) ⇒ Object

Returns the color object for the given red, green and blue components.



193
194
195
# File 'lib/hexapdf/content/color_space.rb', line 193

def color(r, g, b)
  Color.new(r, g, b)
end

#default_colorObject

Returns the default color for the DeviceRGB color space.



188
189
190
# File 'lib/hexapdf/content/color_space.rb', line 188

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

#familyObject

Returns :DeviceRGB.



198
199
200
# File 'lib/hexapdf/content/color_space.rb', line 198

def family
  :DeviceRGB
end