Class: Color::DeviceN
- Inherits:
-
Base
- Object
- Base
- Color::DeviceN
show all
- Defined in:
- lib/quadtone/color/device_n.rb
Constant Summary
collapse
- Components =
(0..7).to_a
Instance Attribute Summary
Attributes inherited from Base
#components
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#<=>, average, colorspace_name, #eql?, from_cgats, #hash, #initialize, num_components, #to_cgats, #to_s, #to_str
Methods included from Math
#deg2rad, #rad2deg
Constructor Details
This class inherits a constructor from Color::Base
Class Method Details
.cgats_fields ⇒ Object
11
12
13
14
15
|
# File 'lib/quadtone/color/device_n.rb', line 11
def self.cgats_fields
Components.map do |i|
"DEVICE_#{i}"
end
end
|
.component_names ⇒ Object
7
8
9
|
# File 'lib/quadtone/color/device_n.rb', line 7
def self.component_names
Components
end
|
Instance Method Details
#to_gray ⇒ Object
17
18
19
|
# File 'lib/quadtone/color/device_n.rb', line 17
def to_gray
Color::Gray.new(@components.find { |c| c != 0 } || 0)
end
|