home *** CD-ROM | disk | FTP | other *** search
- #import "aGroup-inter.h"
- #import "aGroup.h"
- #import "p4m.h"
-
- @implementation p4m
- - clip: (float) x : (float) y
- {
- PSmoveto(x,y);
- PSrlineto(bounds.size.width,0);
- PSrlineto(0,bounds.size.height);
- PSclosepath();
- PSclip();
- return self;
- }
- - makeLatticeUnitAt: (NXPoint *) point fromImage: srcimg
- {
- id imgrep;
- NXPoint pt;
- int i;
-
- pt.x = - point->x ;
- pt.y = - point->y ;
-
- imgrep = [srcimg bestRepresentation];
- for(i=0;i<4;i++){
- PSgsave(); // lower left
- PSrotate(90*i);
- PSgsave();
- [self clip:0.0:0.0];[imgrep drawAt: &pt];
- PSgrestore();
- PSgsave();
- reflect(45);
- [self clip:0.0:0.0];[imgrep drawAt: &pt];
- PSgrestore();
- PSgrestore();
- }
- return self;
- }
- @end
-