This is RotImage.h in view mode; [Download] [Up]
/* * * MyImage.h -- How to rotate an NXImage * * You may freely copy, distribute, and reuse the code in this example. * NeXT disclaims any warranty of any kind, expressed or implied, as to its * fitness for any particular use. * * Written by Henry Krempel -- NeXT Developer Support * * Wed Apr 10 17:39:50 1991 * * Modified by Brian Glaeske -- glaeske@plains.NoDak.edu * * Sat Mar 14 21:06:04 1992 * * I put in more functionality so the range of rotations can be from 0 to 360. * The flip: method will flip vertically or horizontally. Only handles square images nicely. * */ #import <appkit/NXImage.h> #define HORIZONTAL 0 #define VERTICAL 1 @interface RotImage:NXImage { int rotation, flipped, flippedHor, flippedVer; NXSize origSize, rotSize, *currentSize; } - initFromFile:(const char *)fileName; - setRotation:(int)anInt; - (BOOL)drawRepresentation:(NXImageRep *)imageRep inRect:(const NXRect *)rect; - flip:(int)whichWay; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.