Class: PSD::Locked
Instance Attribute Summary collapse
-
#all_locked ⇒ Object
readonly
Returns the value of attribute all_locked.
-
#composite_locked ⇒ Object
readonly
Returns the value of attribute composite_locked.
-
#position_locked ⇒ Object
readonly
Returns the value of attribute position_locked.
-
#transparency_locked ⇒ Object
readonly
Returns the value of attribute transparency_locked.
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
#all_locked ⇒ Object (readonly)
Returns the value of attribute all_locked.
7 8 9 |
# File 'lib/psd/layer_info/locked.rb', line 7 def all_locked @all_locked end |
#composite_locked ⇒ Object (readonly)
Returns the value of attribute composite_locked.
7 8 9 |
# File 'lib/psd/layer_info/locked.rb', line 7 def composite_locked @composite_locked end |
#position_locked ⇒ Object (readonly)
Returns the value of attribute position_locked.
7 8 9 |
# File 'lib/psd/layer_info/locked.rb', line 7 def position_locked @position_locked end |
#transparency_locked ⇒ Object (readonly)
Returns the value of attribute transparency_locked.
7 8 9 |
# File 'lib/psd/layer_info/locked.rb', line 7 def transparency_locked @transparency_locked end |
Instance Method Details
#parse ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/psd/layer_info/locked.rb', line 9 def parse locked = @file.read_int @transparency_locked = (locked & (0x01 << 0)) > 0 || locked == -2147483648 @composite_locked = (locked & (0x01 << 1)) > 0 || locked == -2147483648 @position_locked = (locked & (0x01 << 2)) > 0 || locked == -2147483648 @all_locked = @transparency_locked && @composite_locked && @position_locked end |