Module: PSD::Layer::BlendModes

Included in:
PSD::Layer
Defined in:
lib/psd/layer/blend_modes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blend_modeObject (readonly)

Returns the value of attribute blend_mode.



4
5
6
# File 'lib/psd/layer/blend_modes.rb', line 4

def blend_mode
  @blend_mode
end

#opacityObject (readonly)

Returns the value of attribute opacity.



4
5
6
# File 'lib/psd/layer/blend_modes.rb', line 4

def opacity
  @opacity
end

Instance Method Details

#blending_modeObject



6
7
8
9
10
11
12
# File 'lib/psd/layer/blend_modes.rb', line 6

def blending_mode
  if !info[:section_divider].nil? && info[:section_divider].blend_mode
    BlendMode::BLEND_MODES[info[:section_divider].blend_mode.strip.to_sym]
  else
    @blending_mode
  end
end

#clipped?Boolean

Is the layer below this one a clipping mask?

Returns:

  • (Boolean)


15
16
17
# File 'lib/psd/layer/blend_modes.rb', line 15

def clipped?
  @blend_mode.clipping == 1
end