Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7640 views
1
#import "MuAnnotation.h"
2
3
@implementation MuAnnotation
4
{
5
int type;
6
CGRect rect;
7
}
8
9
@synthesize type, rect;
10
11
-(id) initFromAnnot:(fz_annot *)annot forPage:(fz_page *)page;
12
{
13
self = [super init];
14
if (self)
15
{
16
fz_rect frect;
17
type = pdf_annot_type(ctx, (pdf_annot *)annot);
18
fz_bound_annot(ctx, page, annot, &frect);
19
rect.origin.x = frect.x0;
20
rect.origin.y = frect.y0;
21
rect.size.width = frect.x1 - frect.x0;
22
rect.size.height = frect.y1 - frect.y0;
23
}
24
return self;
25
}
26
27
+(MuAnnotation *) annotFromAnnot:(fz_annot *)annot forPage:(fz_page *)page;
28
{
29
return [[[MuAnnotation alloc] initFromAnnot:annot forPage:page] autorelease];
30
}
31
@end
32
33