protected override void ReadValue(PsdReader reader, object userData, out LayerRecords value) { LayerRecords records = userData as LayerRecords; LayerMask mask = LayerMaskReader.Read(reader); LayerBlendingRanges blendingRanges = LayerBlendingRangesReader.Read(reader); string name = reader.ReadPascalString(4); IProperties resources = new LayerResourceReader(reader, this.EndPosition - reader.Position); records.SetExtraRecords(mask, blendingRanges, resources, name); value = records; }
public LayerExtraRecords(LayerMaskReader layerMask, LayerBlendingRangesReader blendingRanges, LayerResourceReader resources, string name) { this.layerMask = layerMask; this.blendingRanges = blendingRanges; this.resources = resources; this.name = name; this.resources.TryGetValue <string>(ref this.name, "luni.Name"); this.resources.TryGetValue <SectionType>(ref this.sectionType, "lsct.SectionType"); if (this.resources.Contains("SoLd.Idnt") == true) { this.placedID = this.resources.ToGuid("SoLd.Idnt"); } else if (this.resources.Contains("SoLE.Idnt") == true) { this.placedID = this.resources.ToGuid("SoLE.Idnt"); } }