Class: PSD::ChannelMixer
- Defined in:
- lib/psd/layer/info/channel_mixer.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#monochrome ⇒ Object
readonly
Returns the value of attribute monochrome.
Attributes inherited from LayerInfo
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from LayerInfo
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
9 10 11 |
# File 'lib/psd/layer/info/channel_mixer.rb', line 9 def color @color end |
#monochrome ⇒ Object (readonly)
Returns the value of attribute monochrome.
9 10 11 |
# File 'lib/psd/layer/info/channel_mixer.rb', line 9 def monochrome @monochrome end |
Class Method Details
.should_parse?(key) ⇒ Boolean
5 6 7 |
# File 'lib/psd/layer/info/channel_mixer.rb', line 5 def self.should_parse?(key) key == 'mixr' end |
Instance Method Details
#parse ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/psd/layer/info/channel_mixer.rb', line 11 def parse @file.seek 2, IO::SEEK_CUR @monochrome = @file.read_short > 0 @color = 4.times.map do { red_cyan: @file.read_short, green_magenta: @file.read_short, blue_yellow: @file.read_short, black: @file.read_short, constant: @file.read_short } end end |