Browse CVS Repository
Contents of /enbanfukusyaya/EnbanKensa/macosx/GraphView.m
Parent Directory
| Revision Log
| Revision Graph
Revision 1.1 -
( show annotations)
( download)
Sun May 29 17:12:23 2005 UTC
(18 years, 10 months ago)
by bananajinn
Branch: MAIN
CVS Tags: HEAD
*** empty log message ***
| 1 |
/* 円盤複写屋 - EnbanKensa |
| 2 |
* Copyright (c) 2005 Kagetani Hideto |
| 3 |
* GraphView.m - ビュークラス |
| 4 |
* $Date: 2005/05/17 15:42:28 $ |
| 5 |
* $Revision: 1.1 $ |
| 6 |
*/ |
| 7 |
#import "GraphView.h" |
| 8 |
|
| 9 |
@implementation GraphView |
| 10 |
|
| 11 |
static NSImage *g_image=NULL; |
| 12 |
|
| 13 |
- (id)initWithFrame:(NSRect)frameRect |
| 14 |
{ |
| 15 |
if ((self = [super initWithFrame:frameRect]) != nil) { |
| 16 |
// Add initialization code here |
| 17 |
} |
| 18 |
return self; |
| 19 |
} |
| 20 |
|
| 21 |
- (void)drawRect:(NSRect)rect |
| 22 |
{ |
| 23 |
if(g_image==NULL){ |
| 24 |
return; |
| 25 |
} |
| 26 |
|
| 27 |
const NSRect *rects; |
| 28 |
int count, i; |
| 29 |
|
| 30 |
[self getRectsBeingDrawn:&rects count:&count]; |
| 31 |
for(i=0; i<count; i++){ |
| 32 |
[g_image compositeToPoint:rects[i].origin |
| 33 |
fromRect:rects[i] |
| 34 |
operation:NSCompositeSourceOver]; |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
- (void)setImage:(NSImage *)image |
| 39 |
{ |
| 40 |
g_image = image; |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
@end |
|