2003-05-23 04:29:01 +00:00
|
|
|
#include "Frame.h"
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
@implementation Frame : Object
|
|
|
|
- (id) initWithFile: (string) file duration: (float) time
|
|
|
|
{
|
|
|
|
self = [super init];
|
|
|
|
picture = [[QPic alloc] initName: file];
|
|
|
|
duration = time;
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2003-07-29 19:55:41 +00:00
|
|
|
- (void) dealloc
|
2003-05-23 04:29:01 +00:00
|
|
|
{
|
2004-11-18 05:08:00 +00:00
|
|
|
[picture release];
|
2003-07-29 19:55:41 +00:00
|
|
|
[super dealloc];
|
2003-05-23 04:29:01 +00:00
|
|
|
}
|
|
|
|
|
2010-11-17 06:50:07 +00:00
|
|
|
- (Size) size
|
2003-05-23 04:29:01 +00:00
|
|
|
{
|
2010-11-17 06:50:07 +00:00
|
|
|
return makeSize ([picture width], [picture height]);
|
2003-05-23 04:29:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (float) duration
|
|
|
|
{
|
|
|
|
return duration;
|
|
|
|
}
|
|
|
|
|
2011-03-25 07:46:32 +00:00
|
|
|
- (void) draw: (int) x :(int) y
|
2003-05-23 04:29:01 +00:00
|
|
|
{
|
|
|
|
[picture draw :x :y];
|
|
|
|
}
|
|
|
|
@end
|