Class: Pdfrb::Color::Lab
- Inherits:
-
CIEBasedColorSpace
- Object
- ColorSpace
- CIEBasedColorSpace
- Pdfrb::Color::Lab
- Defined in:
- lib/pdfrb/color/color_space.rb
Instance Attribute Summary collapse
-
#black_point ⇒ Object
readonly
Returns the value of attribute black_point.
-
#range ⇒ Object
readonly
Returns the value of attribute range.
-
#white_point ⇒ Object
readonly
Returns the value of attribute white_point.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(white_point:, black_point: nil, range: nil) ⇒ Lab
constructor
A new instance of Lab.
- #parameters_array ⇒ Object
Methods inherited from CIEBasedColorSpace
Methods inherited from ColorSpace
[], names, register, register_as, registry
Constructor Details
#initialize(white_point:, black_point: nil, range: nil) ⇒ Lab
Returns a new instance of Lab.
136 137 138 139 140 |
# File 'lib/pdfrb/color/color_space.rb', line 136 def initialize(white_point:, black_point: nil, range: nil) @white_point = white_point @black_point = black_point @range = range end |
Instance Attribute Details
#black_point ⇒ Object (readonly)
Returns the value of attribute black_point.
134 135 136 |
# File 'lib/pdfrb/color/color_space.rb', line 134 def black_point @black_point end |
#range ⇒ Object (readonly)
Returns the value of attribute range.
134 135 136 |
# File 'lib/pdfrb/color/color_space.rb', line 134 def range @range end |
#white_point ⇒ Object (readonly)
Returns the value of attribute white_point.
134 135 136 |
# File 'lib/pdfrb/color/color_space.rb', line 134 def white_point @white_point end |
Class Method Details
.pdf_name ⇒ Object
143 |
# File 'lib/pdfrb/color/color_space.rb', line 143 def pdf_name; :Lab; end |
Instance Method Details
#parameters_array ⇒ Object
146 147 148 149 150 151 |
# File 'lib/pdfrb/color/color_space.rb', line 146 def parameters_array dict = { WhitePoint: Pdfrb::Model::PdfArray.new(@white_point) } dict[:BlackPoint] = Pdfrb::Model::PdfArray.new(@black_point) if @black_point dict[:Range] = Pdfrb::Model::PdfArray.new(@range) if @range dict end |