Class: HexaPDF::Content::ColorSpace::DeviceGray::Color
- Inherits:
-
Object
- Object
- HexaPDF::Content::ColorSpace::DeviceGray::Color
- Includes:
- ColorUtils
- Defined in:
- lib/hexapdf/content/color_space.rb
Overview
A color in the DeviceGray color space.
See: PDF2.0 s8.6.4.2
Instance Method Summary collapse
-
#color_space ⇒ Object
Returns the DeviceGray color space module.
-
#components ⇒ Object
Returns the normalized gray value as an array.
-
#initialize(gray) ⇒ Color
constructor
Initializes the color with the
gray
component.
Methods included from ColorUtils
Constructor Details
#initialize(gray) ⇒ Color
Initializes the color with the gray
component.
The argument gray
has to be a float between 0.0 and 1.0.
668 669 670 |
# File 'lib/hexapdf/content/color_space.rb', line 668 def initialize(gray) @gray = gray end |
Instance Method Details
#color_space ⇒ Object
Returns the DeviceGray color space module.
673 674 675 |
# File 'lib/hexapdf/content/color_space.rb', line 673 def color_space DeviceGray::DEFAULT end |
#components ⇒ Object
Returns the normalized gray value as an array.
678 679 680 |
# File 'lib/hexapdf/content/color_space.rb', line 678 def components [@gray] end |