Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 575258
Collapse All | Expand All

(-)a/rsvg-convert.c (-1 / +5 lines)
Lines 137-143 Link Here
137
    cairo_surface_t *surface = NULL;
137
    cairo_surface_t *surface = NULL;
138
    cairo_t *cr = NULL;
138
    cairo_t *cr = NULL;
139
    RsvgHandleFlags flags = RSVG_HANDLE_FLAGS_NONE;
139
    RsvgHandleFlags flags = RSVG_HANDLE_FLAGS_NONE;
140
    RsvgDimensionData dimensions;
140
    RsvgDimensionData dimensions, dimensions_orig;
141
    FILE *output_file = stdout;
141
    FILE *output_file = stdout;
142
    char *export_lookup_id;
142
    char *export_lookup_id;
143
143
Lines 318-323 Link Here
318
318
319
            if (!rsvg_handle_get_dimensions_sub (rsvg, &dimensions, export_lookup_id))
319
            if (!rsvg_handle_get_dimensions_sub (rsvg, &dimensions, export_lookup_id))
320
                g_printerr ("Could not get dimensions for file %s\n", args[i]);
320
                g_printerr ("Could not get dimensions for file %s\n", args[i]);
321
            rsvg_handle_get_dimensions_sub (rsvg, &dimensions_orig, export_lookup_id);
321
322
322
            /* if both are unspecified, assume user wants to zoom the image in at least 1 dimension */
323
            /* if both are unspecified, assume user wants to zoom the image in at least 1 dimension */
323
            if (width == -1 && height == -1) {
324
            if (width == -1 && height == -1) {
Lines 416-421 Link Here
416
            cairo_translate (cr, -pos.x, -pos.y);
417
            cairo_translate (cr, -pos.x, -pos.y);
417
        }
418
        }
418
419
420
        cairo_scale(cr, (double) dimensions.width / dimensions_orig.width,
421
                (double) dimensions.height /dimensions_orig.height);
422
419
        rsvg_handle_render_cairo_sub (rsvg, cr, export_lookup_id);
423
        rsvg_handle_render_cairo_sub (rsvg, cr, export_lookup_id);
420
424
421
        g_free (export_lookup_id);
425
        g_free (export_lookup_id);

Return to bug 575258