Class: PSD::PhotoFilter
- Defined in:
- lib/psd/layer/info/photo_filter.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#density ⇒ Object
readonly
Returns the value of attribute density.
-
#preserve_luminosity ⇒ Object
readonly
Returns the value of attribute preserve_luminosity.
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/photo_filter.rb', line 9 def color @color end |
#density ⇒ Object (readonly)
Returns the value of attribute density.
9 10 11 |
# File 'lib/psd/layer/info/photo_filter.rb', line 9 def density @density end |
#preserve_luminosity ⇒ Object (readonly)
Returns the value of attribute preserve_luminosity.
9 10 11 |
# File 'lib/psd/layer/info/photo_filter.rb', line 9 def preserve_luminosity @preserve_luminosity end |
Class Method Details
.should_parse?(key) ⇒ Boolean
5 6 7 |
# File 'lib/psd/layer/info/photo_filter.rb', line 5 def self.should_parse?(key) key == 'phfl' end |
Instance Method Details
#parse ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/psd/layer/info/photo_filter.rb', line 11 def parse version = @file.read_short case version when 2 then parse_version_2 when 3 then parse_version_3 else return end @density = @file.read_int @preserve_luminosity = @file.read_boolean end |