diff options
author | Don Lewis <truckman@FreeBSD.org> | 2016-06-07 04:14:37 +0000 |
---|---|---|
committer | Don Lewis <truckman@FreeBSD.org> | 2016-06-07 04:14:37 +0000 |
commit | f241bab0fe2c302cd5cb20226e82f1c8a1911c44 (patch) | |
tree | 3d8b31a54efc7856d649989787d615f45078ea6e /graphics/inkscape | |
parent | b047c1bd09fb83deef611e05aa6fb4fcd8fce72f (diff) | |
download | ports-f241bab0fe2c302cd5cb20226e82f1c8a1911c44.tar.gz ports-f241bab0fe2c302cd5cb20226e82f1c8a1911c44.zip |
Notes
Diffstat (limited to 'graphics/inkscape')
-rw-r--r-- | graphics/inkscape/files/patch-src_libavoid_connector.cpp | 11 | ||||
-rw-r--r-- | graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp | 33 |
2 files changed, 44 insertions, 0 deletions
diff --git a/graphics/inkscape/files/patch-src_libavoid_connector.cpp b/graphics/inkscape/files/patch-src_libavoid_connector.cpp new file mode 100644 index 000000000000..402e4575051c --- /dev/null +++ b/graphics/inkscape/files/patch-src_libavoid_connector.cpp @@ -0,0 +1,11 @@ +--- src/libavoid/connector.cpp.orig 2014-11-30 18:45:32 UTC ++++ src/libavoid/connector.cpp +@@ -885,7 +885,7 @@ bool ConnRef::generatePath(void) + { + // Check for consecutive points on opposite + // corners of two touching shapes. +- COLA_ASSERT(abs(i->pathNext->id.objID - i->id.objID) != 2); ++ COLA_ASSERT(abs((int)(i->pathNext->id.objID - i->id.objID)) != 2); + } + } + } diff --git a/graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp b/graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp new file mode 100644 index 000000000000..ea146ee29637 --- /dev/null +++ b/graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp @@ -0,0 +1,33 @@ +--- src/ui/tools/flood-tool.cpp.orig 2014-11-30 18:45:32 UTC ++++ src/ui/tools/flood-tool.cpp +@@ -252,13 +252,13 @@ static bool compare_pixels(guint32 check + + switch (method) { + case FLOOD_CHANNELS_ALPHA: +- return abs(static_cast<int>(ac) - ao) <= threshold; ++ return abs(static_cast<int>(ac) - static_cast<int>(ao)) <= threshold; + case FLOOD_CHANNELS_R: +- return abs(static_cast<int>(ac ? unpremul_alpha(rc, ac) : 0) - (ao ? unpremul_alpha(ro, ao) : 0)) <= threshold; ++ return abs(static_cast<int>(ac ? unpremul_alpha(rc, ac) : 0) - static_cast<int>(ao ? unpremul_alpha(ro, ao) : 0)) <= threshold; + case FLOOD_CHANNELS_G: +- return abs(static_cast<int>(ac ? unpremul_alpha(gc, ac) : 0) - (ao ? unpremul_alpha(go, ao) : 0)) <= threshold; ++ return abs(static_cast<int>(ac ? unpremul_alpha(gc, ac) : 0) - static_cast<int>(ao ? unpremul_alpha(go, ao) : 0)) <= threshold; + case FLOOD_CHANNELS_B: +- return abs(static_cast<int>(ac ? unpremul_alpha(bc, ac) : 0) - (ao ? unpremul_alpha(bo, ao) : 0)) <= threshold; ++ return abs(static_cast<int>(ac ? unpremul_alpha(bc, ac) : 0) - static_cast<int>(ao ? unpremul_alpha(bo, ao) : 0)) <= threshold; + case FLOOD_CHANNELS_RGB: + guint32 amc, rmc, bmc, gmc; + //amc = 255*255 - (255-ac)*(255-ad); amc = (amc + 127) / 255; +@@ -268,9 +268,9 @@ static bool compare_pixels(guint32 check + gmc = (255-ac)*gd + 255*gc; gmc = (gmc + 127) / 255; + bmc = (255-ac)*bd + 255*bc; bmc = (bmc + 127) / 255; + +- diff += abs(static_cast<int>(amc ? unpremul_alpha(rmc, amc) : 0) - (amop ? unpremul_alpha(rmop, amop) : 0)); +- diff += abs(static_cast<int>(amc ? unpremul_alpha(gmc, amc) : 0) - (amop ? unpremul_alpha(gmop, amop) : 0)); +- diff += abs(static_cast<int>(amc ? unpremul_alpha(bmc, amc) : 0) - (amop ? unpremul_alpha(bmop, amop) : 0)); ++ diff += abs(static_cast<int>(amc ? unpremul_alpha(rmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(rmop, amop) : 0)); ++ diff += abs(static_cast<int>(amc ? unpremul_alpha(gmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(gmop, amop) : 0)); ++ diff += abs(static_cast<int>(amc ? unpremul_alpha(bmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(bmop, amop) : 0)); + return ((diff / 3) <= ((threshold * 3) / 4)); + + case FLOOD_CHANNELS_H: |