Sha256: 16414715539533c002a87018b00fac9efc46d1ddbbfca1d4046d42f5c195f842

Contents?: true

Size: 339 Bytes

Versions: 4

Compression:

Stored size: 339 Bytes

Contents

require 'psd/layer_info'

class PSD
  class Knockout < LayerInfo
    def self.should_parse?(key)
      key == 'knko'
    end

    MODES = [:shallow, :deep]

    attr_reader :enabled, :mode

    def parse
      val = @file.read_byte

      @enabled = val > 0
      @mode = MODES[val - 1]

      @file.seek 3, IO::SEEK_CUR
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
psd-3.9.0 lib/psd/layer/info/knockout.rb
psd-3.8.0 lib/psd/layer/info/knockout.rb
psd-3.7.0 lib/psd/layer/info/knockout.rb
psd-3.6.0 lib/psd/layer/info/knockout.rb