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