public ReferencePoint(BinaryPSDReader reader) : base(reader) { BinaryPSDReader r = this.GetDataReader(); this.Point = new EPointF(); this.Point.X = (float)r.ReadPSDDouble(); this.Point.Y = (float)r.ReadPSDDouble(); this.Data = null; }
public Matrix2D(BinaryPSDReader r) { this.M11 = r.ReadPSDDouble(); this.M12 = r.ReadPSDDouble(); this.M13 = r.ReadPSDDouble(); this.M21 = r.ReadPSDDouble(); this.M22 = r.ReadPSDDouble(); this.M23 = r.ReadPSDDouble(); }
public TypeTool(BinaryPSDReader areader) : base(areader) { BinaryPSDReader reader = this.GetDataReader(); ushort Version = reader.ReadUInt16(); //1= Photoshop 5.0 for (int i = 0; i < 6; i++) //2D transform matrix { reader.ReadPSDDouble(); } //Font info: ushort FontVersion = reader.ReadUInt16(); //6 = Photoshop 5.0 ushort FaceCount = reader.ReadUInt16(); this.FontInfos = new List <FontInfo>(); for (int i = 0; i < FaceCount; i++) { this.FontInfos.Add(new FontInfo(reader)); } //TODO: make classes of styles as well... ushort StyleCount = reader.ReadUInt16(); for (int i = 0; i < StyleCount; i++) { ushort Mark = reader.ReadUInt16(); ushort FaceMark = reader.ReadUInt16(); uint Size = reader.ReadUInt32(); uint Tracking = reader.ReadUInt32(); uint Kerning = reader.ReadUInt32(); uint Leading = reader.ReadUInt32(); uint BaseShift = reader.ReadUInt32(); byte AutoKern = reader.ReadByte(); byte Extra = 0; if (Version <= 5) { Extra = reader.ReadByte(); } byte Rotate = reader.ReadByte(); } //Text information ushort Type = reader.ReadUInt16(); uint ScalingFactor = reader.ReadUInt32(); uint CharacterCount = reader.ReadUInt32(); uint HorizontalPlacement = reader.ReadUInt32(); uint VerticalPlacement = reader.ReadUInt32(); uint SelectStart = reader.ReadUInt32(); uint SelectEnd = reader.ReadUInt32(); ushort LineCount = reader.ReadUInt16(); for (int i = 0; i < LineCount; i++) { uint CharacterCountLine = reader.ReadUInt32(); ushort Orientation = reader.ReadUInt16(); ushort Alignment = reader.ReadUInt16(); ushort DoubleByteChar = reader.ReadUInt16(); ushort Style = reader.ReadUInt16(); } ushort ColorSpace = reader.ReadUInt16(); for (int i = 0; i < 4; i++) { reader.ReadUInt16(); //Color compensation } byte AntiAlias = reader.ReadByte(); }