Sha256: fcd2eaa943d6ae81104fa83bf8e107f01a4daf9f4e1524baefdeca6b2559314d

Contents?: true

Size: 490 Bytes

Versions: 28

Compression:

Stored size: 490 Bytes

Contents

require_relative '../layer_info'

class PSD
  class VectorMask < LayerInfo
    @key = 'vmsk'

    attr_reader :invert, :not_link, :disable, :paths

    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
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
bench9000-0.1 vendor/psd.rb/lib/psd/layer_info/vector_mask.rb
psd-2.1.2 lib/psd/layer_info/vector_mask.rb
psd-2.1.1 lib/psd/layer_info/vector_mask.rb
psd-2.1.0 lib/psd/layer_info/vector_mask.rb
psd-2.0.0 lib/psd/layer_info/vector_mask.rb
psd-1.5.0 lib/psd/layer_info/vector_mask.rb
psd-1.4.5 lib/psd/layer_info/vector_mask.rb
psd-1.4.4 lib/psd/layer_info/vector_mask.rb
psd-1.4.3 lib/psd/layer_info/vector_mask.rb
psd-1.4.2 lib/psd/layer_info/vector_mask.rb
psd-1.4.1 lib/psd/layer_info/vector_mask.rb
psd-1.4.0 lib/psd/layer_info/vector_mask.rb
psd-1.3.3 lib/psd/layer_info/vector_mask.rb
psd-1.3.2 lib/psd/layer_info/vector_mask.rb
psd-1.3.0 lib/psd/layer_info/vector_mask.rb
psd-1.2.2 lib/psd/layer_info/vector_mask.rb
psd-1.2.1 lib/psd/layer_info/vector_mask.rb
psd-1.2.0 lib/psd/layer_info/vector_mask.rb
psd-1.1.1 lib/psd/layer_info/vector_mask.rb
psd-1.1.0 lib/psd/layer_info/vector_mask.rb