ftp.nice.ch/pub/next/games/network/Splat.1.0.s.tar.gz#/Splat-1.0/PieceView.m

This is PieceView.m in view mode; [Download] [Up]

/*
 * PieceView
 * description: display an image
 * history:
 *	5/20/93 [Erik Kay] - created
 */

#import "PieceView.h"

@implementation PieceView

// scale the image to fit our frame
- setImage:img
{
    if (image && (image != img))
	[image free];
    image = [img copy];
    [image setScalable:YES];
    [image setSize:&frame.size];
    return self;
}

- image
{
    return image;
}

- drawSelf:(const NXRect *)r :(int)count
{
    NXPoint pt = {0.0,0.0};
    [image composite:NX_SOVER toPoint:&pt];
    return self;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.