This is PICTFile.h in view mode; [Download] [Up]
/***********************************************************************\ PICT file class for Convert PICT which converts graphics from PICT to eps formats. Copyright (C) 1993 David John Burrowes This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author, David John Burrowes, can be reached at: davidjohn@kira.net.netcom.com David John Burrowes 1926 Ivy #10 San Mateo, CA 94403-1367 \***********************************************************************/ /* ==================================================================== This is the interface file for the PICTFile class. Full documentation for this class can be found in the PICTFile.rtf file. I will not duplicate all that fine information here. This is $Revision: 1.10 $ of this file It was last modified by $Author: death $ on $Date: 93/04/04 23:29:42 $ Note that this file was created while using the New Century Schoolbook Roman typeface. You may find that some things line up strangely if you don't use that family. $Log: PICTFile.h,v $ * Revision 1.10 93/04/04 23:29:42 death * Sun Apr 4 23:29:42 PDT 1993 * * Revision 1.9 93/01/09 21:07:02 death * Sat Jan 9 21:07:02 PST 1993 * * Revision 1.8 93/01/01 11:51:11 death * Fri Jan 1 11:51:11 PST 1993 * * Revision 1.7 92/12/31 15:34:00 death * Thu Dec 31 15:34:00 PST 1992 * * Revision 1.6 92/12/05 23:06:51 death * Sat Dec 5 23:06:51 PST 1992 * * Revision 1.5 92/12/03 18:01:08 death * Thu Dec 3 18:01:07 PST 1992 * * Revision 1.4 92/11/27 19:37:22 death * Fri Nov 27 19:37:22 PST 1992 * * Revision 1.3 92/11/08 09:26:13 death * Sun Nov 8 09:26:13 PST 1992 * * Revision 1.2 92/08/09 19:46:17 death * Sun Aug 9 19:46:17 PDT 1992 * * Revision 1.1 92/08/09 08:52:58 death * Sun Aug 9 08:52:58 PDT 1992 * ==================================================================== */ #import "File.h" // Parent class #import "common.h" // my standard data types etc. ///// // Define some data types used and returned by this class. All correspond to various // Mac PICT data types. ///// // // 93.08.16 djb added INTEGER and LONGINT type... // typedef Signed16Bits INTEGER; typedef Signed32Bits LONGINT; typedef Signed32Bits FIXED; // This is not an accurate remapping of the Mac FIXED type. // // Define the standard Pict rectangle // typedef struct { INTEGER top, left, bottom, right; } PICTRect; // // Define the standard Pict point // typedef struct { INTEGER y, x; } PICTPoint; // // Opcodes just get returned as one type, regardless of what source version // typedef bits16 PICTOpcode; // // PicComment related structures. // // // WARNING: TPolyVerbRec may have its bitfields entirely reversed. // typedef struct TPolyVerbRec { #ifdef __BIG_ENDIAN__ Byte f7:1, // reserved f6:1, f5:1, f4:1, f3:1, fPolyClose:1, // TRUE = smoothing across endpoint. fPolyFill:1, // TRUE = Polygon should be filled. fPolyFrame:1; // TRUE = Polygon should be framed. #elif __LITTLE_ENDIAN__ Byte fPolyFrame:1, // TRUE = Polygon should be framed. fPolyFill:1, // TRUE = Polygon should be filled. fPolyClose:1, // TRUE = smoothing across endpoint. f3:1, // reserved f4:1, f5:1, f6:1, f7:1; #else WARNING: this TPolyVerbRec isn't defined properly for your machine! #endif } TPolyVerbRec; // // Constants for the TTxtPicRec struct for a piccomment // I'm not wanting an enum because then I'll want to use it in the struct, and so I'll // have to figure out how to force it to be 8 bits long exactly. (foolish) // // values for the tJus field of the record TTxtPicRec #define tJusNone 0 #define tJusLeft 1 #define tJusCenter 2 #define tJusRight 3 #define tJusFull 4 // values for the tFlip field of the TTxtPicRec record #define tFlipNone 0 #define tFlipHorizontal 1 #define tFlipVertical 2 @interface PICTFile:File { ByteString PICTHeader; PICTRect* BoundingRect; Integer PICTVersion; Boolean FoundEnd; } -free; - initAndUse:(ConstCString) pathname; - initAndUseTemporary; - OpenWithAccess: (Integer) operation; - (Integer) GetVersion; - (ConstByteString) GetHeader; - (PICTRect*) GetBounds; - (PICTOpcode) GetOpcode; - (PICTRect*) GetRect; - (PICTPoint*) GetPoint; - (Byte) GetByte; - (SignedByte) GetSignedByte; - (CString) GetPString; - (Integer) GetINTEGER; - (PositiveInteger) GetPositiveINTEGER; - (Integer) GetLONGINT; - (PositiveInteger) GetPositiveLONGINT; - (Real) GetFixedNumber; - (TPolyVerbRec) GetPolyVerbs; @end // // Error codes (using -400 to -300) // #define ERR_MAYNOTWRITE -420 #define ERR_UNKNOWNVERSION -421
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.