示例#1
0
        public Shadow(PhotoshopFile.Layer.AdjustmentLayerInfo info)
        {
            this.m_data  = info.Data;
            this.m_key   = info.Key;
            this.m_layer = info.Layer;

            BinaryReverseReader r = this.DataReader;

            //string blendModeSignature = null;

            int version = r.ReadInt32();

            switch (version)
            {
            case 0:
                this.Blur      = r.ReadUInt32();
                this.Intensity = r.ReadUInt32();

                this.Angle    = r.ReadUInt32();
                this.Distance = r.ReadUInt32();

                this.Color = r.ReadPSDColor(16, true);

                this.BlendModeKey = this.ReadBlendKey(r);
                //this.BlendModeSignature = r.ReadUInt32();
                //this.BlendModeKey = r.ReadUInt32();
                this.Enabled        = r.ReadBoolean();
                this.UseGlobalAngle = r.ReadBoolean();
                this.Opacity        = r.ReadByte();
                break;

            case 2:
                this.Blur      = (uint)r.ReadUInt16();
                this.Intensity = r.ReadUInt32();

                this.Angle    = r.ReadUInt32();
                this.Distance = r.ReadUInt32();

                ushort something = r.ReadUInt16();    //TODO:?

                this.Color = r.ReadPSDColor(16, true);

                this.BlendModeKey   = this.ReadBlendKey(r);
                this.Enabled        = r.ReadBoolean();
                this.UseGlobalAngle = r.ReadBoolean();
                this.Opacity        = r.ReadByte();
                //TODO: 10 unknown bytes!
                break;
            }

            this.Data = null;
        }
示例#2
0
        public Bevel(PhotoshopFile.Layer.AdjustmentLayerInfo info)
        {
            this.m_data  = info.Data;
            this.m_key   = info.Key;
            this.m_layer = info.Layer;

            BinaryReverseReader r = this.DataReader;

            //string blendModeSignature = null;

            uint version = r.ReadUInt32();

            switch (version)
            {
            case 0:
                this.Blur = r.ReadUInt32();
                this.Data = null;
                break;

            case 2:
                this.Angle    = (uint)r.ReadUInt16();
                this.Strength = (uint)r.ReadUInt16();
                this.Blur     = (uint)r.ReadUInt16();

                this.Unknown1 = r.ReadByte();
                this.Unknown2 = r.ReadByte();
                this.Unknown3 = r.ReadUInt16();
                this.Unknown4 = r.ReadUInt16();

                this.BlendModeKey       = this.ReadBlendKey(r);
                this.ShadowBlendModeKey = this.ReadBlendKey(r);

                this.Color       = r.ReadPSDColor(16, true);
                this.ShadowColor = r.ReadPSDColor(16, true);

                this.BevelStyle    = r.ReadByte();
                this.Opacity       = r.ReadByte();
                this.ShadowOpacity = r.ReadByte();

                this.Enabled        = r.ReadBoolean();
                this.UseGlobalAngle = r.ReadBoolean();
                this.Inverted       = r.ReadBoolean();

                System.Drawing.Color someColor  = r.ReadPSDColor(16, true);
                System.Drawing.Color someColor2 = r.ReadPSDColor(16, true);
                break;
            }
            this.Data = null;
        }
示例#3
0
        public Glow(PhotoshopFile.Layer.AdjustmentLayerInfo info)
        {
            this.m_data  = info.Data;
            this.m_key   = info.Key;
            this.m_layer = info.Layer;

            BinaryReverseReader r = this.DataReader;

            //string blendModeSignature = null;
            uint version = r.ReadUInt32(); //two version specifications?!?

            switch (version)
            {
            case 0:
                this.Blur = r.ReadUInt32();
                this.Data = null;
                break;

            case 2:
                this.Blur      = (uint)r.ReadUInt16();
                this.Intensity = r.ReadUInt32();
                ushort something = r.ReadUInt16();
                this.Color = r.ReadPSDColor(16, false);     //Inner color (no alpha)

                this.BlendModeKey = this.ReadBlendKey(r);
                this.Enabled      = r.ReadBoolean();
                this.Opacity      = r.ReadByte();
                //TODO!
                if (this.Inner)
                {
                    this.Unknown = r.ReadByte();
                }
                this.UnknownColor = r.ReadPSDColor(16, false);     //unknown color(no alpha)
                this.Data         = r.ReadBytes((int)r.BytesToEnd);
                break;
            }
        }