This is DuoImage.m in view mode; [Download] [Up]
/* * * DuoImage.m -- tracks image and horizonatally flipped image * * Paul A. Griffin * 8/16/93 */ #import "DuoImage.h" #import "RotImage.h" @implementation DuoImage - duoInit { reversed = NO; originalImage = [RotImage allocFromZone:[self zone]]; flippedImage = [RotImage allocFromZone:[self zone]]; return self; } - initFromFile:(const char *)fileName { [self duoInit]; [originalImage initFromFile:fileName]; [flippedImage initFromFile:fileName]; [flippedImage flip:HORIZONTAL]; return self; } - (id)theImage { if(reversed) return flippedImage; else return originalImage; } - flip:(int)whichWay; { if(whichWay == HORIZONTAL) { if(reversed) reversed = NO; else reversed = YES; } if(whichWay == VERTICAL) { [[self theImage] flip:VERTICAL]; } return self; } - getSize:(NXSize *)imageSize { [[self theImage] getSize:imageSize]; return self; } - composite:(int)op toPoint:(const NXPoint *)point { return [[self theImage] composite:op toPoint:point]; } - dissolve:(float)delta toPoint:(const NXPoint *)point; { return [[self theImage] dissolve:delta toPoint:point]; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.