示例#1
0
        public TypeToolTyShPH6(BinaryReverseReader r)
        {
            ushort Version = r.ReadUInt16(); //1= Photoshop 5.0

            this.Transform = new Matrix2D(r);

            ushort TextDescriptorVersion = r.ReadUInt16(); //=50. For Photoshop 6.0.

            if (TextDescriptorVersion == 50)
            {
                uint XTextDescriptorVersion = r.ReadUInt32(); //=16. For Photoshop 6.0.

                this.TxtDescriptor = new PsdDescriptor(r);

                ushort WarpVersion           = r.ReadUInt16(); //2 bytes, =1. For Photoshop 6.0.
                uint   WarpDescriptorVersion = r.ReadUInt32(); //4 bytes, =16. For Photoshop 6.0.
                var    a = (PsdTextData)TxtDescriptor.getObjects()["EngineData"];
                engine           = (object)a.getProperties();
                engineData       = (Dictionary <string, object>)engine;
                StylesheetReader = new TdTaStylesheetReader(engineData);

                //string desc = this.TxtDescriptor.getString();

                this.WarpDescriptor = new PsdDescriptor(r);           //Warp descriptor
                this.Data           = r.ReadBytes((int)r.BytesToEnd); //17 bytes???? All zeroes?
                if (Data.Length != 17 || !(Array.TrueForAll(Data, b => b == 0)))
                {
                    string s = ReadableBinary.CreateHexEditorString(Data);
                }
            }
        }
示例#2
0
        public TypeToolObject(PhotoshopFile.Layer.AdjustmentLayerInfo info)
        {
            this.m_data  = info.Data;
            this.m_key   = info.Key;
            this.m_layer = info.Layer;

            BinaryReverseReader r = this.DataReader;

            ushort PhotshopVersion = r.ReadUInt16();   //2 bytes, =1 Photoshop 6 (not 5)

            this.Transform = new Matrix2D(r);          //six doubles (48 bytes)

            ushort TextVersion       = r.ReadUInt16(); //2 bytes, =50. For Photoshop 6.0.
            uint   DescriptorVersion = r.ReadUInt32(); //4 bytes,=16. For Photoshop 6.0.


            this.TxtDescriptor = DynVal.ReadDescriptor(r); //Text descriptor

            ushort WarpVersion           = r.ReadUInt16(); //2 bytes, =1. For Photoshop 6.0.
            uint   WarpDescriptorVersion = r.ReadUInt32(); //4 bytes, =16. For Photoshop 6.0.

            engineData       = (Dictionary <string, object>)TxtDescriptor.Children.Find(c => c.Name == "EngineData").Value;
            StylesheetReader = new TdTaStylesheetReader(engineData);

            //string desc = this.TxtDescriptor.getString();

            this.WarpDescriptor = DynVal.ReadDescriptor(r);       //Warp descriptor
            this.Data           = r.ReadBytes((int)r.BytesToEnd); //17 bytes???? All zeroes?
            if (Data.Length != 17 || !(Array.TrueForAll(Data, b => b == 0)))
            {
                string s = ReadableBinary.CreateHexEditorString(Data);
                Debug.Write(s);
            }

            //this.WarpRect = new RectangleF();
            //WarpRect.X = (float)r.ReadDouble();
            //WarpRect.Y = (float)r.ReadDouble();
            //this.Data.
            //WarpRect.Width = (float)r.ReadDouble() - WarpRect.X;
            //WarpRect.Height = (float)r.ReadDouble() - WarpRect.Y;

            //this.Data = r.ReadBytes((int)r.BytesToEnd);
        }