cairo-renderer.cpp revision 45d0b0d0dc24df8e321cbe8a085ab9b1f60b4a42
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu * Rendering with Cairo.
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin * Miklos Erdelyi <erdelyim@gmail.com>
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin * Copyright (C) 2006 Miklos Erdelyi
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin * Licensed under GNU GPL
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder#include <libnr/nr-matrix-translate-ops.h>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder#include "libnr/nr-matrix-translate-ops.h"
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder#include "libnr/nr-scale-translate-ops.h"
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin// include support for only the compiled-in surface types
ace3d0483eaadd85e5c7b59d2be8b316b4f897d2Georgel Calin//#define TRACE(_args) g_printf _args
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder// FIXME: expose these from sp-clippath/mask.cpp
c4ae37349f31bb57fba21eb842ea3f2e439abb1cGeorgel Calin unsigned int key;
namespace Inkscape {
namespace Extension {
namespace Internal {
return new_context;
delete ctx;
if (SP_IS_ITEM(o)) {
l = g_slist_remove (l, o);
bool translated = false;
translated = true;
if (translated) {
int w, h, rs;
ctx->addClippingRect(image->x.computed, image->y.computed, image->width.computed, image->height.computed);
ctx->addClippingRect(root->x.computed, root->y.computed, root->width.computed, root->height.computed);
double res;
//gchar const *filter = prefs_get_string_attribute ("options.createbitmap", "filter");
gchar const *param1 = prefs_get_string_attribute ("options.createbitmap", "filter_param1");
// Calculate the matrix that will be applied to the image so that it exactly overlaps the source objects
shift_y = -round (-shift_y); // this gets correct rounding despite coordinate inversion, remove the negations when the inversion is gone
if (pb) {
matrix = t;
NRRect d;
bool pageBoundingBox = true;
if (pageBoundingBox) {
NRMatrix t;
NRMatrix t;
ctx->addClippingRect(mask_bbox.x0, mask_bbox.y0, mask_bbox.x1 - mask_bbox.x0, mask_bbox.y1 - mask_bbox.y0);
calculatePreserveAspectRatio(unsigned int aspect_align, unsigned int aspect_clip, double vp_width, double vp_height,
switch (aspect_align) {
case SP_ASPECT_XMIN_YMIN:
case SP_ASPECT_XMID_YMIN:
case SP_ASPECT_XMAX_YMIN:
case SP_ASPECT_XMIN_YMID:
case SP_ASPECT_XMID_YMID:
case SP_ASPECT_XMAX_YMID:
case SP_ASPECT_XMIN_YMAX:
case SP_ASPECT_XMID_YMAX:
case SP_ASPECT_XMAX_YMAX:
#include "clear-n_.h"