Class: HexaPDF::Content::ColorSpace::DeviceRGB
- Inherits:
-
Object
- Object
- HexaPDF::Content::ColorSpace::DeviceRGB
- 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
-
.new(_definition = nil) ⇒ Object
Returns the DeviceRGB color space object.
Instance Method Summary collapse
-
#color(r, g, b) ⇒ Object
Returns the color object for the given red, green and blue components.
-
#default_color ⇒ Object
Returns the default color for the DeviceRGB color space.
-
#family ⇒ Object
Returns
:DeviceRGB.
Class Method Details
.new(_definition = nil) ⇒ Object
Returns the DeviceRGB color space object.
180 181 182 |
# File 'lib/hexapdf/content/color_space.rb', line 180 def self.new(_definition = nil) DEFAULT end |
Instance Method Details
#color(r, g, b) ⇒ Object
Returns the color object for the given red, green and blue components.
190 191 192 |
# File 'lib/hexapdf/content/color_space.rb', line 190 def color(r, g, b) Color.new(r, g, b) end |
#default_color ⇒ Object
Returns the default color for the DeviceRGB color space.
185 186 187 |
# File 'lib/hexapdf/content/color_space.rb', line 185 def default_color Color.new(0.0, 0.0, 0.0) end |
#family ⇒ Object
Returns :DeviceRGB.
195 196 197 |
# File 'lib/hexapdf/content/color_space.rb', line 195 def family :DeviceRGB end |