/*
 * 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
