]> www.fi.muni.cz Git - evince.git/blobdiff - backend/ps/ev-spectre.c
Added. Returns whether the animation has everything necessary to run. Do
[evince.git] / backend / ps / ev-spectre.c
index a16c0a063c4daebf9d58ffafc3ed63c68c6c5a86..1252b8d2faa18c07b7dc9c51b747d4ad4d0d44f5 100644 (file)
@@ -17,6 +17,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include <config.h>
+
+#include <config.h>
 #include <glib/gi18n.h>
 #include <stdlib.h>
 #include <libspectre/spectre.h>
@@ -42,10 +45,8 @@ static void ps_document_document_iface_init            (EvDocumentIface
 static void ps_document_file_exporter_iface_init       (EvFileExporterIface       *iface);
 static void ps_document_document_thumbnails_iface_init (EvDocumentThumbnailsIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (PSDocument, ps_document, G_TYPE_OBJECT,
+EV_BACKEND_REGISTER_WITH_CODE (PSDocument, ps_document,
                          {
-                                G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT,
-                                                       ps_document_document_iface_init);
                                 G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
                                                        ps_document_document_thumbnails_iface_init);
                                 G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
@@ -288,7 +289,9 @@ ps_document_render (EvDocument      *document,
        rotation = (rc->rotation + get_page_rotation (ps_page)) % 360;
 
        src = spectre_render_context_new ();
-       spectre_render_context_set_page_size (src, width, height);
+       spectre_render_context_set_scale (src,
+                                         (gdouble)width / width_points,
+                                         (gdouble)height / height_points);
        spectre_render_context_set_rotation (src, rotation);
        spectre_page_render (ps_page, src, &data, &stride);
        spectre_render_context_free (src);