developer/check: configure: WARNING: filterdiff not installed; build will not be...
[oi-userland.git] / components / image / inkscape / patches / 06-inkscape-math.patch
blob84bde0b0bc76ec017467741e24a839a6ac02c7f4
1 --- inkscape-0.91/src/extension/internal/wmf-print.cpp.orig 2016-08-16 11:04:13.093104602 +0200
2 +++ inkscape-0.91/src/extension/internal/wmf-print.cpp 2016-08-16 11:04:28.479477371 +0200
3 @@ -558,7 +558,7 @@
4 Geom::Point p1(one * transform);
5 Geom::Point p(p1 - p0);
7 - double scale = sqrt((p[X] * p[X]) + (p[Y] * p[Y])) / sqrt(2);
8 + double scale = sqrt((p[X] * p[X]) + (p[Y] * p[Y])) / sqrt(2.);
10 if (!style->stroke_width.computed) {
11 return 0; //if width is 0 do not (reset) the pen, it should already be NULL_PEN
12 --- inkscape-0.91/src/extension/internal/emf-inout.cpp.orig 2016-08-16 11:03:29.860875081 +0200
13 +++ inkscape-0.91/src/extension/internal/emf-inout.cpp 2016-08-16 11:03:45.931064786 +0200
14 @@ -2594,7 +2594,7 @@
15 PU_EMRROUNDRECT pEmr = (PU_EMRROUNDRECT) lpEMFR;
16 U_RECTL rc = pEmr->rclBox;
17 U_SIZEL corner = pEmr->szlCorner;
18 - double f = 4.*(sqrt(2) - 1)/3;
19 + double f = 4.*(sqrt(2.) - 1)/3;
20 double f1 = 1.0 - f;
21 double cnx = corner.cx/2;
22 double cny = corner.cy/2;
23 --- inkscape-0.91/src/extension/internal/wmf-inout.cpp.orig 2016-08-16 11:02:45.530096102 +0200
24 +++ inkscape-0.91/src/extension/internal/wmf-inout.cpp 2016-08-16 11:02:57.465244612 +0200
25 @@ -2132,7 +2132,7 @@
26 int16_t Height,Width;
27 nSize = U_WMRROUNDRECT_get(contents, &Width, &Height, &rc);
28 U_sanerect16(rc, &left, &top, &right, &bottom);
29 - double f = 4.*(sqrt(2) - 1)/3;
30 + double f = 4.*(sqrt(2.) - 1)/3;
31 double f1 = 1.0 - f;
32 double cnx = Width/2;
33 double cny = Height/2;
34 --- inkscape-0.91/src/extension/internal/emf-print.cpp.orig 2016-08-16 11:02:08.808717868 +0200
35 +++ inkscape-0.91/src/extension/internal/emf-print.cpp 2016-08-16 11:01:51.861965562 +0200
36 @@ -666,7 +666,7 @@
37 Geom::Point p1(one * transform);
38 Geom::Point p(p1 - p0);
40 - double scale = sqrt((p[X] * p[X]) + (p[Y] * p[Y])) / sqrt(2);
41 + double scale = sqrt((p[X] * p[X]) + (p[Y] * p[Y])) / sqrt(2.);
43 if (!style->stroke_width.computed) {
44 return 0; //if width is 0 do not (reset) the pen, it should already be NULL_PEN
45 --- inkscape-0.91/src/ui/dialog/grid-arrange-tab.cpp.orig 2016-08-16 11:07:19.712271085 +0200
46 +++ inkscape-0.91/src/ui/dialog/grid-arrange-tab.cpp 2016-08-16 11:09:58.255151367 +0200
47 @@ -555,8 +555,8 @@
48 prefs->setInt("/dialogs/gridtiler/NoOfCols", NoOfCols);
50 } else {
51 - double PerRow = ceil(sqrt(selcount));
52 - double PerCol = ceil(sqrt(selcount));
53 + double PerRow = ceil(sqrt(static_cast<double>(selcount)));
54 + double PerCol = ceil(sqrt(static_cast<double>(selcount)));
55 NoOfRowsSpinner.set_value(PerRow);
56 NoOfColsSpinner.set_value(PerCol);
57 prefs->setInt("/dialogs/gridtiler/NoOfCols", static_cast<int>(PerCol));
58 --- inkscape-INKSCAPE_1_0/src/extension/internal/metafile-print.cpp.~1~ 2020-05-01 06:29:13.000000000 +0000
59 +++ inkscape-INKSCAPE_1_0/src/extension/internal/metafile-print.cpp 2020-05-06 11:29:19.363050649 +0000
60 @@ -352,8 +352,8 @@
61 double x1, y1, x2, y2;
62 Geom::Path SVGep;
64 - x1 = ctr[X] + cos(F) * rx * cos(0) + sin(-F) * ry * sin(0);
65 - y1 = ctr[Y] + sin(F) * rx * cos(0) + cos(F) * ry * sin(0);
66 + x1 = ctr[X] + cos(F) * rx * cos(0.) + sin(-F) * ry * sin(0.);
67 + y1 = ctr[Y] + sin(F) * rx * cos(0.) + cos(F) * ry * sin(0.);
68 x2 = ctr[X] + cos(F) * rx * cos(M_PI) + sin(-F) * ry * sin(M_PI);
69 y2 = ctr[Y] + sin(F) * rx * cos(M_PI) + cos(F) * ry * sin(M_PI);
71 @@ -376,13 +376,13 @@
72 double x21, y21, x22, y22;
73 double degrot = F * 360. / (2.*M_PI);
75 - x11 = ctr[X] + cos(F) * rx1 * cos(0) + sin(-F) * ry1 * sin(0);
76 - y11 = ctr[Y] + sin(F) * rx1 * cos(0) + cos(F) * ry1 * sin(0);
77 + x11 = ctr[X] + cos(F) * rx1 * cos(0.) + sin(-F) * ry1 * sin(0.);
78 + y11 = ctr[Y] + sin(F) * rx1 * cos(0.) + cos(F) * ry1 * sin(0.);
79 x12 = ctr[X] + cos(F) * rx1 * cos(M_PI) + sin(-F) * ry1 * sin(M_PI);
80 y12 = ctr[Y] + sin(F) * rx1 * cos(M_PI) + cos(F) * ry1 * sin(M_PI);
82 - x21 = ctr[X] + cos(F) * rx2 * cos(0) + sin(-F) * ry2 * sin(0);
83 - y21 = ctr[Y] + sin(F) * rx2 * cos(0) + cos(F) * ry2 * sin(0);
84 + x21 = ctr[X] + cos(F) * rx2 * cos(0.) + sin(-F) * ry2 * sin(0.);
85 + y21 = ctr[Y] + sin(F) * rx2 * cos(0.) + cos(F) * ry2 * sin(0.);
86 x22 = ctr[X] + cos(F) * rx2 * cos(M_PI) + sin(-F) * ry2 * sin(M_PI);
87 y22 = ctr[Y] + sin(F) * rx2 * cos(M_PI) + cos(F) * ry2 * sin(M_PI);
89 @@ -403,8 +403,8 @@
90 double x1, y1, x2, y2;
91 Geom::Path SVGep;
93 - x1 = ctr[X] + cos(F) * rx * cos(0) + sin(-F) * ry * sin(0);
94 - y1 = ctr[Y] + sin(F) * rx * cos(0) + cos(F) * ry * sin(0);
95 + x1 = ctr[X] + cos(F) * rx * cos(0.) + sin(-F) * ry * sin(0.);
96 + y1 = ctr[Y] + sin(F) * rx * cos(0.) + cos(F) * ry * sin(0.);
97 x2 = ctr[X] + cos(F) * rx * cos(M_PI) + sin(-F) * ry * sin(M_PI);
98 y2 = ctr[Y] + sin(F) * rx * cos(M_PI) + cos(F) * ry * sin(M_PI);