ftp.nice.ch/pub/next/developer/resources/classes/misckit/MiscKit.1.10.0.s.gnutar.gz#/MiscKit/Palettes/MiscTilingButton/MiscTilingButtonPalette.subproj/MiscTButtonCell.m

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

//Mon Oct 21 17:35:44 MET 1996

#import "MiscTilingButtonCell.h"

@implementation MiscTilingButtonCell

- drawInside: (const NXRect *)cellFrame inView:controlView
{	NXRect clipRect;
	NXSize imgSiz={0,0};
	NXCoord		x,y;
	NXImage		*image=[self image];
	if(!image) return self;
	[controlView getFrame:&clipRect];
	//[self getDrawRect:&clipRect];
	[image getSize:&imgSiz];
	//[controlView lockFocus];
	//NXRectClip(&clipRect);
	if(!imgSiz.width || !imgSiz.height) return self;

	for(y=imgSiz.height ;y-imgSiz.height< NX_HEIGHT(&clipRect);y+=imgSiz.height)
	{	for(x=0;x< NX_WIDTH(&clipRect);x+=imgSiz.width)
		{	NXPoint currPoint={x,y};
			[image composite:NX_COPY toPoint:&currPoint];
		}
	}
	//[controlView unlockFocus];
	return self;
}

@end

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