blob: 92f7bb4591f62ccb5f04176541c0a197f722e049 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
//
// MuAnnotation.m
// MuPDF
//
// Created by Paul Gardiner on 20/11/2013.
// Copyright (c) 2013 Artifex Software, Inc. All rights reserved.
//
#import "MuAnnotation.h"
@implementation MuAnnotation
@synthesize type, rect;
-(id) initFromAnnot:(fz_annot *)annot forDoc:(fz_document *)doc
{
self = [super init];
if (self)
{
fz_rect frect;
type = pdf_annot_type((pdf_annot *)annot);
fz_bound_annot(doc, annot, &frect);
rect.origin.x = frect.x0;
rect.origin.y = frect.y0;
rect.size.width = frect.x1 - frect.x0;
rect.size.height = frect.y1 - frect.y0;
}
return self;
}
+(MuAnnotation *) annotFromAnnot:(fz_annot *)annot forDoc:(fz_document *)doc
{
return [[[MuAnnotation alloc] initFromAnnot:annot forDoc:doc] autorelease];
}
@end
|