* 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>
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,
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);