🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.sys.next
Article #23

Re: How to use NXImage?

#23
From: tohjo
Date: Tue, 04 Aug 1992 01:57
134 lines
3891 bytes
$BEl[j!w#N#T#T$H?=$7$^$9!#(J

In article <1992Jul31.140208.5940@kei.is.s.u-tokyo.ac.jp> takahasi@is.s.u-tokyo.ac.jp (TAKAHASHI Shin) writes:
> $B<ALd$G$9!#(J
> TIFF$B%U%!%$%k$N%S%C%H%^%C%W$r!"(JNXImage$B$r;H$C$FI=<($9$k$K$O(J
> $B$I$&$7$?$iNI$$$N$G$7$g$&$+!)(J
> $B4JC1$J%5%s%W%k%W%m%0%i%`$r65$($F2<$5$k$H4r$7$$$G(J 
$B$9!#(J

$B#I#B$r;H$C$?4JC1$J%5%s%W%k%W%m%0%i%`$r7G:\$7$^$9!#(J
$B$3$l$O!"2?$+$N%\%?%s$,2!$5$l$?$H$-$K!"#T#I#F#F%$%a!<%8$rI=<($9$k$b$N$G$9!#(J

--- $B$3$3$+$i(J ---
/* Generated by Hiroshi Tohjo */
/*                sample.m    */
/*          1992.8.4          */

#import <appkit/View.h>

@interface MyNXimage:View
{
	id  myImage;
}
- initFrame:(const NXRect *)aRect;
- displayImage:sender;
@end

/* Generated by Hiroshi Tohjo */
/*                sample.h    */
/*          1992.8.4          */

#import <appkit/appkit.h>
#import "MyNXimage.h"

@implementation MyNXimage

- initFrame:(const NXRect *)aRect
{
	[super	initFrame: aRect];
	myImage = [[NXImage alloc] initFromSection:"myImage.tiff"];
	return	self;
}
- displayImage:sender
{
	NXPoint	aPoint;
	[self	lockFocus];
	[myImage  composite:NX_COPY toPoint:&aPoint];
	[self	unlockFocus];
	[window	flushWindow];
	return	self;
}
@end
--- $B$3$3$^$G(J ---

$B@bL@(J

View$B$N2<$N%/%i%9$H$7$F!"(JMyNXimage$B$r:n$j$^$9!#(J
CustomView$B$r(JMyWindow$B%I%i%C%0$7$F$-$F!"(JMyNXimage$B%/%i%9$K$7$^$9!#(J

$B8e$O!"(JdisplayImage$B%a%=%C%I$r%\%?%s$J$I$N%?!<%2%C%H%"%/%7%g%s$K(J
$B@\B3$9$k$@$1$G$9!#(J($B$G$$$$$H;W$&(J)
$B%\%?%s$J$I$r2!$9$H%$%a!<%8$,I=<($5$l$^$9!#(J
$B$"$H!"0LCV$J$I$N:Y$+$$A`:n$O!"%^%K%e%"%k$r;2>H$/$@$5$$!#(J

$BITL@$JE@$,$"$l$P!"$4O"Mm2<$5$$!#(J

$B!t$3$s$J$b$N$G$h$1$l$P$*;n$72<$5$$!#(J

$B!y!!#R#T#F$GEj9F=PMh$l$P!"$b$C$H$o$+$j$d$9$$$@$m$&$J!#!#!#(J

--

 $B!z(J          $BEl[j!wEALV#G!%EA=hIt!%EAAw8&!%#N#T#T(J            $B!y(J
$B!y(J          $B#t#o#h#j#o!w#n#t#t#t#s#d!%#n#t#t!%#j#p(J            $B!z(J
$B!z(J     Y-807C 1-2356 Take Yokosuka Kanagawa 238-03 Japan      $B!y(J
 $B!y(J                                       NeXT mail OK!      $B!z(J
--/

#import <appkit/View.h>

@interface MyNXimage:View
{
	id  myImage;
}
- initFrame:(const NXRect *)aRect;
- displayImage:sender;
@end

/* Generated by Hiroshi Tohjo */
/*                sample.h    */
/*          1992.8.4          */

#import <appkit/appkit.h>
#import "MyNXimage.h"

@implementation MyNXimage

- initFrame:(const NXRect *)aRect
{
	[super	initFrame: aRect];
	myImage = [[NXImage alloc] initFromSection:"myImage.tiff"];
	return	self;
}
- displayImage:sender
{
	NXPoint	aPoint;
	[self	lockFocus];
	[myImage  composite:NX_COPY toPoint:&aPoint];
	[self	unlockFocus];
	[window	flushWindow];
	return	self;
}
@end
--- $B$3$3$^$G(J ---

$B@bL@(J

View$B$N2<$N%/%i%9$H$7$F!"(JMyNXimage$B$r:n$j$^$9!#(J
CustomView$B$r(JMyWindow$B%I%i%C%0$7$F$-$F!"(JMyNXimage$B%/%i%9$K$7$^$9!#(J

$B8e$O!"(JdisplayImage$B%a%=%C%I$r%\%?%s$J$I$N%?!<%2%C%H%"%/%7%g%s$K(J
$B@\B3$9$k$@$1$G$9!#(J($B$G$$$$$H;W$&(J)
$B%\%?%s$J$I$r2!$9$H%$%a!<%8$,I=<($5$l$^$9!#(J
$B$"$H!"0LCV$J$I$N:Y$+$$A`:n$O!"%^%K%e%"%k$r;2>H$/$@$5$$!#(J

$BITL@$JE@$,$"$l$P!"$4O"Mm2<$5$$!#(J

$B!t$3$s$J$b$N$G$h$1$l$P$*;n$72<$5$$!#(J

$B!y!!#R#T#F$GEj9F=PMh$l$P!"$b$C$H$o$+$j$d$9$$$@$m$&$J!#!#!#(J

--

 $B!z(J          
Technical Details
Message-ID: <45776@ntttsd.ntt.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!wnoc-tyo-news!dclsic!yilnws!hamamatsu-pc.ac.jp!tutgw!lab!yecl-news!ntttsd!tohjo
References: <1992Jul31.140208.5940@kei.is.s.u-tokyo.ac.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!wnoc-tyo-news!dclsic!yilnws!hamamatsu-pc.ac.jp!tutgw!lab!yecl-news!ntttsd!tohjo
From: tohjo@ntttsd.ntt.jp
Newsgroups: fj.sys.next
Subject: Re: How to use NXImage?
Keywords: NXImage
Message-ID: <45776@ntttsd.ntt.jp>
Date: 4 Aug 92 01:57:24 GMT
References: <1992Jul31.140208.5940@kei.is.s.u-tokyo.ac.jp>
Sender: news@ntttsd.ntt.jp
Reply-To: tohjo@ntttsd.NTT.jp (Hiroshi Tohjo)
Distribution: fj
Lines: 134