summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-12-28 15:18:21 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-01-05 14:47:37 +0100
commitd5394cbcf3a98dcabc49264172d4ce6618535d91 (patch)
tree9cf89de9fa95ddc14ffdb78d2dd8ff25d7d480cd /platform
parentcc4bd1b4f82a67f70c7ccad4da874d6e7451eeae (diff)
downloadmupdf-d5394cbcf3a98dcabc49264172d4ce6618535d91.tar.xz
Remove fz_page argument from fz_annot function calls.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/jni/mupdf.c20
-rw-r--r--platform/gl/gl-main.c4
-rw-r--r--platform/ios/Classes/MuAnnotation.h4
-rw-r--r--platform/ios/Classes/MuAnnotation.m8
-rw-r--r--platform/ios/Classes/MuPageViewNormal.m12
-rw-r--r--platform/x11/pdfapp.c14
6 files changed, 31 insertions, 31 deletions
diff --git a/platform/android/jni/mupdf.c b/platform/android/jni/mupdf.c
index e91eea70..aaade4e0 100644
--- a/platform/android/jni/mupdf.c
+++ b/platform/android/jni/mupdf.c
@@ -675,12 +675,12 @@ static void update_changed_rects(globals *glo, page_cache *pc, pdf_document *ido
{
/* FIXME: We bound the annot twice here */
rect_node *node = fz_malloc_struct(glo->ctx, rect_node);
- fz_bound_annot(ctx, pc->page, annot, &node->rect);
+ fz_bound_annot(ctx, annot, &node->rect);
node->next = pc->changed_rects;
pc->changed_rects = node;
node = fz_malloc_struct(glo->ctx, rect_node);
- fz_bound_annot(ctx, pc->page, annot, &node->rect);
+ fz_bound_annot(ctx, annot, &node->rect);
node->next = pc->hq_changed_rects;
pc->hq_changed_rects = node;
}
@@ -771,8 +771,8 @@ JNI_FN(MuPDFCore_drawPage)(JNIEnv *env, jobject thiz, jobject bitmap,
fz_annot *annot;
pc->annot_list = fz_new_display_list(ctx);
dev = fz_new_list_device(ctx, pc->annot_list);
- for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, pc->page, annot))
- fz_run_annot(ctx, pc->page, annot, dev, &fz_identity, cookie);
+ for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, annot))
+ fz_run_annot(ctx, annot, dev, &fz_identity, cookie);
fz_drop_device(ctx, dev);
dev = NULL;
if (cookie != NULL && cookie->abort)
@@ -969,8 +969,8 @@ JNI_FN(MuPDFCore_updatePageInternal)(JNIEnv *env, jobject thiz, jobject bitmap,
if (pc->annot_list == NULL) {
pc->annot_list = fz_new_display_list(ctx);
dev = fz_new_list_device(ctx, pc->annot_list);
- for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, pc->page, annot))
- fz_run_annot(ctx, pc->page, annot, dev, &fz_identity, cookie);
+ for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, annot))
+ fz_run_annot(ctx, annot, dev, &fz_identity, cookie);
fz_drop_device(ctx, dev);
dev = NULL;
if (cookie != NULL && cookie->abort)
@@ -1722,7 +1722,7 @@ JNI_FN(MuPDFCore_deleteAnnotationInternal)(JNIEnv * env, jobject thiz, int annot
{
annot = fz_first_annot(ctx, pc->page);
for (i = 0; i < annot_index && annot; i++)
- annot = fz_next_annot(ctx, pc->page, annot);
+ annot = fz_next_annot(ctx, annot);
if (annot)
{
@@ -1991,18 +1991,18 @@ JNI_FN(MuPDFCore_getAnnotationsInternal)(JNIEnv * env, jobject thiz, int pageNum
fz_scale(&ctm, zoom, zoom);
count = 0;
- for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, pc->page, annot))
+ for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, annot))
count ++;
arr = (*env)->NewObjectArray(env, count, annotClass, NULL);
if (arr == NULL) return NULL;
count = 0;
- for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, pc->page, annot))
+ for (annot = fz_first_annot(ctx, pc->page); annot; annot = fz_next_annot(ctx, annot))
{
fz_rect rect;
fz_annot_type type = pdf_annot_type(ctx, (pdf_annot *)annot);
- fz_bound_annot(ctx, pc->page, annot, &rect);
+ fz_bound_annot(ctx, annot, &rect);
fz_transform_rect(&rect, &ctm);
jannot = (*env)->NewObject(env, annotClass, ctor,
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
index 80efbeb4..ef95246d 100644
--- a/platform/gl/gl-main.c
+++ b/platform/gl/gl-main.c
@@ -266,9 +266,9 @@ void render_page(void)
fz_drop_pixmap(ctx, pix);
annot_count = 0;
- for (annot = fz_first_annot(ctx, page); annot; annot = fz_next_annot(ctx, page, annot))
+ for (annot = fz_first_annot(ctx, page); annot; annot = fz_next_annot(ctx, annot))
{
- pix = fz_new_pixmap_from_annot(ctx, page, annot, &page_ctm, fz_device_rgb(ctx));
+ pix = fz_new_pixmap_from_annot(ctx, annot, &page_ctm, fz_device_rgb(ctx));
texture_from_pixmap(&annot_tex[annot_count++], pix);
fz_drop_pixmap(ctx, pix);
}
diff --git a/platform/ios/Classes/MuAnnotation.h b/platform/ios/Classes/MuAnnotation.h
index 32192dc4..a113b93f 100644
--- a/platform/ios/Classes/MuAnnotation.h
+++ b/platform/ios/Classes/MuAnnotation.h
@@ -3,8 +3,8 @@
#import <Foundation/Foundation.h>
@interface MuAnnotation : NSObject
--(id) initFromAnnot:(fz_annot *)annot forPage:(fz_page *)page;
+-(id) initFromAnnot:(fz_annot *)annot;
@property(readonly) int type;
@property(readonly) CGRect rect;
-+(MuAnnotation *) annotFromAnnot:(fz_annot *)annot forPage:(fz_page *)page;
++(MuAnnotation *) annotFromAnnot:(fz_annot *)annot;
@end
diff --git a/platform/ios/Classes/MuAnnotation.m b/platform/ios/Classes/MuAnnotation.m
index 89cc9d48..f13dedd7 100644
--- a/platform/ios/Classes/MuAnnotation.m
+++ b/platform/ios/Classes/MuAnnotation.m
@@ -8,14 +8,14 @@
@synthesize type, rect;
--(id) initFromAnnot:(fz_annot *)annot forPage:(fz_page *)page;
+-(id) initFromAnnot:(fz_annot *)annot;
{
self = [super init];
if (self)
{
fz_rect frect;
type = pdf_annot_type(ctx, (pdf_annot *)annot);
- fz_bound_annot(ctx, page, annot, &frect);
+ fz_bound_annot(ctx, annot, &frect);
rect.origin.x = frect.x0;
rect.origin.y = frect.y0;
rect.size.width = frect.x1 - frect.x0;
@@ -24,8 +24,8 @@
return self;
}
-+(MuAnnotation *) annotFromAnnot:(fz_annot *)annot forPage:(fz_page *)page;
++(MuAnnotation *) annotFromAnnot:(fz_annot *)annot;
{
- return [[[MuAnnotation alloc] initFromAnnot:annot forPage:page] autorelease];
+ return [[[MuAnnotation alloc] initFromAnnot:annot] autorelease];
}
@end
diff --git a/platform/ios/Classes/MuPageViewNormal.m b/platform/ios/Classes/MuPageViewNormal.m
index f82c3413..e84d1767 100644
--- a/platform/ios/Classes/MuPageViewNormal.m
+++ b/platform/ios/Classes/MuPageViewNormal.m
@@ -48,8 +48,8 @@ static NSArray *enumerateAnnotations(fz_document *doc, fz_page *page)
fz_annot *annot;
NSMutableArray *arr = [NSMutableArray arrayWithCapacity:10];
- for (annot = fz_first_annot(ctx, page); annot; annot = fz_next_annot(ctx, page, annot))
- [arr addObject:[MuAnnotation annotFromAnnot:annot forPage:page]];
+ for (annot = fz_first_annot(ctx, page); annot; annot = fz_next_annot(ctx, annot))
+ [arr addObject:[MuAnnotation annotFromAnnot:annot]];
return [arr retain];
}
@@ -305,7 +305,7 @@ static void deleteAnnotation(fz_document *doc, fz_page *page, int index)
int i;
fz_annot *annot = fz_first_annot(ctx, page);
for (i = 0; i < index && annot; i++)
- annot = fz_next_annot(ctx, page, annot);
+ annot = fz_next_annot(ctx, annot);
if (annot)
pdf_delete_annot(ctx, idoc, (pdf_page *)page, (pdf_annot *)annot);
@@ -408,8 +408,8 @@ static fz_display_list *create_annot_list(fz_document *doc, fz_page *page)
pdf_update_page(ctx, idoc, (pdf_page *)page);
list = fz_new_display_list(ctx);
dev = fz_new_list_device(ctx, list);
- for (annot = fz_first_annot(ctx, page); annot; annot = fz_next_annot(ctx, page, annot))
- fz_run_annot(ctx, page, annot, dev, &fz_identity, NULL);
+ for (annot = fz_first_annot(ctx, page); annot; annot = fz_next_annot(ctx, annot))
+ fz_run_annot(ctx, annot, dev, &fz_identity, NULL);
}
fz_always(ctx)
{
@@ -508,7 +508,7 @@ static rect_list *updatePage(fz_document *doc, fz_page *page)
{
rect_list *node = fz_malloc_struct(ctx, rect_list);
- fz_bound_annot(ctx, page, annot, &node->rect);
+ fz_bound_annot(ctx, annot, &node->rect);
node->next = list;
list = node;
}
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c
index 491167b2..6b227ab3 100644
--- a/platform/x11/pdfapp.c
+++ b/platform/x11/pdfapp.c
@@ -711,8 +711,8 @@ static void pdfapp_loadpage(pdfapp_t *app, int no_cache)
mdev = NULL;
app->annotations_list = fz_new_display_list(app->ctx);
mdev = fz_new_list_device(app->ctx, app->annotations_list);
- for (annot = fz_first_annot(app->ctx, app->page); annot; annot = fz_next_annot(app->ctx, app->page, annot))
- fz_run_annot(app->ctx, app->page, annot, mdev, &fz_identity, &cookie);
+ for (annot = fz_first_annot(app->ctx, app->page); annot; annot = fz_next_annot(app->ctx, annot))
+ fz_run_annot(app->ctx, annot, mdev, &fz_identity, &cookie);
if (cookie.incomplete)
{
app->incomplete = 1;
@@ -771,8 +771,8 @@ static void pdfapp_recreate_annotationslist(pdfapp_t *app)
/* Create display list */
app->annotations_list = fz_new_display_list(app->ctx);
mdev = fz_new_list_device(app->ctx, app->annotations_list);
- for (annot = fz_first_annot(app->ctx, app->page); annot; annot = fz_next_annot(app->ctx, app->page, annot))
- fz_run_annot(app->ctx, app->page, annot, mdev, &fz_identity, &cookie);
+ for (annot = fz_first_annot(app->ctx, app->page); annot; annot = fz_next_annot(app->ctx, annot))
+ fz_run_annot(app->ctx, annot, mdev, &fz_identity, &cookie);
if (cookie.incomplete)
{
app->incomplete = 1;
@@ -824,7 +824,7 @@ static void pdfapp_updatepage(pdfapp_t *app)
{
fz_rect bounds;
fz_irect ibounds;
- fz_transform_rect(fz_bound_annot(app->ctx, app->page, annot, &bounds), &ctm);
+ fz_transform_rect(fz_bound_annot(app->ctx, annot, &bounds), &ctm);
fz_rect_from_irect(&bounds, fz_round_rect(&ibounds, &bounds));
fz_clear_pixmap_rect_with_value(app->ctx, app->image, 255, &ibounds);
idev = fz_new_draw_device_with_bbox(app->ctx, app->image, &ibounds);
@@ -1743,10 +1743,10 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta
else
{
fz_annot *annot;
- for (annot = fz_first_annot(app->ctx, app->page); annot; annot = fz_next_annot(app->ctx, app->page, annot))
+ for (annot = fz_first_annot(app->ctx, app->page); annot; annot = fz_next_annot(app->ctx, annot))
{
fz_rect rect;
- fz_bound_annot(app->ctx, app->page, annot, &rect);
+ fz_bound_annot(app->ctx, annot, &rect);
if (x >= rect.x0 && x < rect.x1)
if (y >= rect.y0 && y < rect.y1)
break;