Beispiel #1
0
        protected override void ReadValue(PsdReader reader, object userData, out LayerAndMaskInformationSection value)
        {
            PsdDocument document = userData as PsdDocument;

            LayerInfoReader layerInfo = new LayerInfoReader(reader, document);

            if (reader.Position + 4 >= this.EndPosition)
            {
                value = new LayerAndMaskInformationSection(layerInfo, null, new Properties());
            }
            else
            {
                GlobalLayerMaskInfoReader globalLayerMask  = new GlobalLayerMaskInfoReader(reader);
                DocumentResourceReader    documentResource = new DocumentResourceReader(reader, this.EndPosition - reader.Position);

                value = new LayerAndMaskInformationSection(layerInfo, globalLayerMask, documentResource);
            }
        }
Beispiel #2
0
 public LayerAndMaskInformationSection(LayerInfoReader layerInfo, GlobalLayerMaskInfoReader globalLayerMask, IProperties documentResources)
 {
     this.layerInfo         = layerInfo;
     this.globalLayerMask   = globalLayerMask;
     this.documentResources = documentResources;
 }