コード例 #1
0
        public BevelEffect(PsdBinaryReader r, string key)
        {
            m_key = key;

            uint version = r.ReadUInt32();

            this.Angle    = r.ReadUInt32();
            this.Strength = r.ReadUInt32();
            this.Blur     = r.ReadUInt32();

            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();

            switch (version)
            {
            case 0:
                break;

            case 2:
                Color someColor  = r.ReadPSDColor(16, true);
                Color someColor2 = r.ReadPSDColor(16, true);
                break;
            }
        }
コード例 #2
0
        public GlowEffect(PsdBinaryReader r, string key)
        {
            m_key = key;
            uint version = r.ReadUInt32(); //two version

            this.Blur      = r.ReadUInt32();
            this.Intensity = r.ReadUInt32();
            Color golwColor = readColor(r);

            this.BlendModeKey = this.ReadBlendKey(r);
            this.Enabled      = r.ReadBoolean();
            this.Opacity      = r.ReadByte();
            this.Color        = Util.FromArgb(Opacity, golwColor);

            switch (version)
            {
            case 0:

                break;

            case 2:
                //TODO!
                if (this.Inner)
                {
                    this.Unknown = r.ReadByte();
                }
                this.UnknownColor = r.ReadPSDColor(16, true);     //unknown color
//                    byte[] Data = r.ReadBytes((int)r.BytesToEnd);
                break;
            }
        }
コード例 #3
0
        public ShadowEffect(PsdBinaryReader r, string key)
        {
            m_key = key;
            int version = r.ReadInt32();

            this.Blur      = r.ReadUInt32();
            this.Intensity = r.ReadUInt32();
            this.Angle     = r.ReadUInt32();
            this.Distance  = r.ReadUInt32();
            Color shadowColor = r.ReadPSDColor(16, true);

            this.BlendModeKey   = this.ReadBlendKey(r);
            this.Enabled        = r.ReadBoolean();
            this.UseGlobalAngle = r.ReadBoolean();
            this.Opacity        = r.ReadByte();
            NativeColor         = r.ReadPSDColor(16, true);

            this.Color = Util.FromArgb(Opacity, shadowColor);
        }
コード例 #4
0
            public Transparency(PsdBinaryReader reader)
            {
                uint localColorStop    = reader.ReadUInt32();
                uint midpointColorStop = reader.ReadUInt32();

                Opacity = reader.ReadUInt16();
                ushort expansionCount       = reader.ReadUInt16();
                ushort interpolation        = reader.ReadUInt16();
                ushort length               = reader.ReadUInt16();
                ushort gradientMode         = reader.ReadUInt16();
                uint   randomNumSeed        = reader.ReadUInt32();
                ushort showFlag             = reader.ReadUInt16();
                ushort usingVectorColorFlag = reader.ReadUInt16();
                uint   roughnessFactor      = reader.ReadUInt16();
                ushort colorModel           = reader.ReadUInt16();

                MinColor = reader.ReadPSDColor(16, true);
                MaxColor = reader.ReadPSDColor(16, true);

                ushort dummy = reader.ReadUInt16();
            }
コード例 #5
0
            public ColorStop(PsdBinaryReader reader)
            {
                uint   localColorStop    = reader.ReadUInt32();
                uint   midpointColorStop = reader.ReadUInt32();
                ushort followColorMode   = reader.ReadUInt16();

                ActualColor = reader.ReadPSDColor(16, true);

                ushort numTransparency = reader.ReadUInt16();

                Trsps = new List <Transparency>(numTransparency);
                for (int j = 0; j < numTransparency; j++)
                {
                    Trsps.Add(new Transparency(reader));
                }
            }