Commit a9bbb465 authored by Kristian Høgsberg's avatar Kristian Høgsberg

2005-03-23 Kristian Høgsberg <krh@redhat.com>

        * glib/poppler-page.cc:
        * glib/poppler-page.h: Add poppler_page_get_index() and rename
        popper_page_get_dimension() to popper_page_get_size()
parent 178bff27
2005-03-23 Kristian Høgsberg <krh@redhat.com>
* glib/poppler-page.cc:
* glib/poppler-page.h: Add poppler_page_get_index() and rename
popper_page_get_dimension() to popper_page_get_size()
2005-03-22 Kristian Høgsberg <krh@redhat.com>
* glib/poppler-document.cc: Implement poppler_document_save().
......
......@@ -62,9 +62,9 @@ poppler_page_finalize (GObject *object)
}
void
poppler_page_get_dimensions (PopplerPage *page,
double *width,
double *height)
poppler_page_get_size (PopplerPage *page,
double *width,
double *height)
{
if (width != NULL)
*width = page->page->getWidth ();
......@@ -72,6 +72,12 @@ poppler_page_get_dimensions (PopplerPage *page,
*height = page->page->getHeight ();
}
int
poppler_page_get_index (PopplerPage *page)
{
return page->index;
}
/**
* poppler_page_render_to_pixbuf:
* @page: the page to render from
......
......@@ -29,21 +29,23 @@ G_BEGIN_DECLS
#define POPPLER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_PAGE, PopplerPage))
#define POPPLER_IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_PAGE))
GType poppler_page_get_type (void) G_GNUC_CONST;
void poppler_page_render_to_pixbuf (PopplerPage *page,
int src_x,
int src_y,
int src_width,
int src_height,
double scale,
GdkPixbuf *pixbuf,
int dest_x,
int dest_y);
void poppler_page_get_dimensions (PopplerPage *page,
double *widht,
double *height);
GType poppler_page_get_type (void) G_GNUC_CONST;
void poppler_page_render_to_pixbuf (PopplerPage *page,
int src_x,
int src_y,
int src_width,
int src_height,
double scale,
GdkPixbuf *pixbuf,
int dest_x,
int dest_y);
void poppler_page_get_size (PopplerPage *page,
double *width,
double *height);
int poppler_page_get_index (PopplerPage *page);
G_END_DECLS
......
......@@ -33,9 +33,8 @@ int main (int argc, char *argv[])
gdk_pixbuf_fill (pixbuf, 0x00106000);
page = poppler_document_get_page_by_label (document, "vi");
poppler_page_get_dimensions (page, &width, &height);
printf ("page dimensions: %f inches by %f inches\n",
width / 72, height / 72);
poppler_page_get_size (page, &width, &height);
printf ("page size: %f inches by %f inches\n", width / 72, height / 72);
g_object_get (page, "label", &label, NULL);
printf ("page label: %s\n", label);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment