8 #import <streams/streams.h>
10 #import <appkit/nextstd.h>
11 #import <appkit/NXBitmapImageRep.h>
12 #import <appkit/Window.h>
13 #import <appkit/Panel.h>
14 #import <appkit/graphics.h>
15 #import <appkit/tiff.h>
31 newZone = NXCreateZone(vm_page_size,vm_page_size,NO);
39 unsigned char *planes[4];
41 NXSetRect(&temprect, 150.0, (800.0 - (
double)ysize),(
double)xsize, (
double)ysize);
43 thiswindow = [[Window allocFromZone:newZone]
47 buttonMask:NX_CLOSEBUTTONMASK | NX_MINIATURIZEBUTTONMASK | NX_RESIZEBUTTONMASK
51 [thiswindow setFreeWhenClosed:YES];
57 [thiswindow makeKeyAndOrderFront:nil];
70 tiffimage = [[NXBitmapImageRep allocFromZone:newZone]
71 initDataPlanes: planes
75 samplesPerPixel: numColors
76 hasAlpha: (numColors == 4 ? YES: NO )
77 isPlanar: (numColors == 1 ? NO : YES)
78 colorSpace: (numColors >= 3 ? NX_RGBColorSpace : NX_OneIsWhiteColorSpace)
89 [self getFrame:&temprect];
90 temprect.origin.x = 0.0;
91 temprect.origin.y = 0.0;
94 [tiffimage drawIn:&temprect];
114 if ( (fd = open(filename,(O_RDWR|O_CREAT),0600)) < 0){
117 stream = NXOpenFile(fd,NX_READWRITE);
118 [tiffimage writeTIFF:stream usingCompression:compression];
129 if ( (fd = open(filename,(O_RDWR|O_CREAT),0600)) < 0){
132 stream = NXOpenFile(fd,NX_READWRITE);
133 [self copyPSCodeInside:&temprect to:stream];
id saveAsEPS:(const char *filename)
id drawSelf::(const NXRect *rects,[] int rectCount)
id windowWillClose:(id sender)
id saveAsTiff:usingCompression:(const char *filename,[usingCompression] int compression)
char windowIconName[1024]