Class: PSD::VectorMask
- Defined in:
- lib/psd/layer_info/vector_mask.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#disable ⇒ Object
readonly
Returns the value of attribute disable.
-
#invert ⇒ Object
readonly
Returns the value of attribute invert.
-
#not_link ⇒ Object
readonly
Returns the value of attribute not_link.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Attributes inherited from LayerInfo
Instance Method Summary collapse
Methods inherited from LayerInfo
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Instance Attribute Details
#disable ⇒ Object (readonly)
Returns the value of attribute disable.
7 8 9 |
# File 'lib/psd/layer_info/vector_mask.rb', line 7 def disable @disable end |
#invert ⇒ Object (readonly)
Returns the value of attribute invert.
7 8 9 |
# File 'lib/psd/layer_info/vector_mask.rb', line 7 def invert @invert end |
#not_link ⇒ Object (readonly)
Returns the value of attribute not_link.
7 8 9 |
# File 'lib/psd/layer_info/vector_mask.rb', line 7 def not_link @not_link end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
7 8 9 |
# File 'lib/psd/layer_info/vector_mask.rb', line 7 def paths @paths end |
Instance Method Details
#parse ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/psd/layer_info/vector_mask.rb', line 9 def parse version = @file.read_int tag = @file.read_int @invert = tag & 0x01 @not_link = (tag & (0x01 << 1)) > 0 @disable = (tag & (0x01 << 2)) > 0 num_records = (@length - 8) / 26 @paths = [] num_records.times do @paths << PathRecord.new(@file) end end |