Commit e973f54f authored by José Aliste's avatar José Aliste Committed by Germán Poo-Caamaño

pdf: Correctly process rectangles whose points are not in the right order

https://bugzilla.gnome.org/show_bug.cgi?id=736688
parent d203432a
Pipeline #24208 passed with stage
in 8 minutes and 6 seconds
......@@ -2404,6 +2404,16 @@ create_region_from_poppler_region (GList *region, gdouble xscale, gdouble yscale
cairo_rectangle_int_t rect;
rectangle = (PopplerRectangle *)l->data;
if (rectangle->x2 < rectangle->x1) {
double tmp = rectangle->x2;
rectangle->x2 = rectangle->x1;
rectangle->x1 = tmp;
}
if (rectangle->y2 < rectangle->y1) {
double tmp = rectangle->y2;
rectangle->y2 = rectangle->y1;
rectangle->y1 = tmp;
}
rect.x = (gint) ((rectangle->x1 * xscale) + 0.5);
rect.y = (gint) ((rectangle->y1 * yscale) + 0.5);
......
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