summaryrefslogtreecommitdiff
path: root/libraries/agg/patches/0004-Make-rasterizer_outline_aa-ignore-close_polygon-when.patch
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2018-09-07 19:19:51 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-09-08 08:37:49 +0700
commitcaebb2ada57d6228c0f07ee6979e1b03d2cfaa3a (patch)
treee30d12feb991f31a2431a5bf13f47f8818bf11b6 /libraries/agg/patches/0004-Make-rasterizer_outline_aa-ignore-close_polygon-when.patch
parentea33859fffa663424b0295da4a222d8b8f79d663 (diff)
downloadslackbuilds-caebb2ada57d6228c0f07ee6979e1b03d2cfaa3a.tar.gz
libraries/agg: Switch back to version 2.5.
The debian one doesn't work with stuff on SBo Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/agg/patches/0004-Make-rasterizer_outline_aa-ignore-close_polygon-when.patch')
-rw-r--r--libraries/agg/patches/0004-Make-rasterizer_outline_aa-ignore-close_polygon-when.patch138
1 files changed, 138 insertions, 0 deletions
diff --git a/libraries/agg/patches/0004-Make-rasterizer_outline_aa-ignore-close_polygon-when.patch b/libraries/agg/patches/0004-Make-rasterizer_outline_aa-ignore-close_polygon-when.patch
new file mode 100644
index 0000000000..0cecaf7948
--- /dev/null
+++ b/libraries/agg/patches/0004-Make-rasterizer_outline_aa-ignore-close_polygon-when.patch
@@ -0,0 +1,138 @@
+From b9c4b1c72b4ad6b24c37f402d3eec39ef393b0eb Mon Sep 17 00:00:00 2001
+From: Tom Hughes <tom@compton.nu>
+Date: Sun, 19 May 2013 14:17:43 +0100
+Subject: [PATCH 04/15] Make rasterizer_outline_aa ignore close_polygon when
+ vertex count < 3
+
+---
+ include/agg_rasterizer_outline_aa.h | 107 ++++++++++++++++++------------------
+ 1 file changed, 52 insertions(+), 55 deletions(-)
+
+diff --git a/include/agg_rasterizer_outline_aa.h b/include/agg_rasterizer_outline_aa.h
+index 4d6dd57..24301d5 100644
+--- a/include/agg_rasterizer_outline_aa.h
++++ b/include/agg_rasterizer_outline_aa.h
+@@ -333,68 +333,65 @@ namespace agg
+ int y2;
+ int lprev;
+
+- if(close_polygon)
++ if(close_polygon && (m_src_vertices.size() >= 3))
+ {
+- if(m_src_vertices.size() >= 3)
++ dv.idx = 2;
++
++ v = &m_src_vertices[m_src_vertices.size() - 1];
++ x1 = v->x;
++ y1 = v->y;
++ lprev = v->len;
++
++ v = &m_src_vertices[0];
++ x2 = v->x;
++ y2 = v->y;
++ dv.lcurr = v->len;
++ line_parameters prev(x1, y1, x2, y2, lprev);
++
++ v = &m_src_vertices[1];
++ dv.x1 = v->x;
++ dv.y1 = v->y;
++ dv.lnext = v->len;
++ dv.curr = line_parameters(x2, y2, dv.x1, dv.y1, dv.lcurr);
++
++ v = &m_src_vertices[dv.idx];
++ dv.x2 = v->x;
++ dv.y2 = v->y;
++ dv.next = line_parameters(dv.x1, dv.y1, dv.x2, dv.y2, dv.lnext);
++
++ dv.xb1 = 0;
++ dv.yb1 = 0;
++ dv.xb2 = 0;
++ dv.yb2 = 0;
++
++ switch(m_line_join)
+ {
+- dv.idx = 2;
+-
+- v = &m_src_vertices[m_src_vertices.size() - 1];
+- x1 = v->x;
+- y1 = v->y;
+- lprev = v->len;
+-
+- v = &m_src_vertices[0];
+- x2 = v->x;
+- y2 = v->y;
+- dv.lcurr = v->len;
+- line_parameters prev(x1, y1, x2, y2, lprev);
+-
+- v = &m_src_vertices[1];
+- dv.x1 = v->x;
+- dv.y1 = v->y;
+- dv.lnext = v->len;
+- dv.curr = line_parameters(x2, y2, dv.x1, dv.y1, dv.lcurr);
+-
+- v = &m_src_vertices[dv.idx];
+- dv.x2 = v->x;
+- dv.y2 = v->y;
+- dv.next = line_parameters(dv.x1, dv.y1, dv.x2, dv.y2, dv.lnext);
+-
+- dv.xb1 = 0;
+- dv.yb1 = 0;
+- dv.xb2 = 0;
+- dv.yb2 = 0;
+-
+- switch(m_line_join)
+- {
+- case outline_no_join:
+- dv.flags = 3;
+- break;
++ case outline_no_join:
++ dv.flags = 3;
++ break;
+
+- case outline_miter_join:
+- case outline_round_join:
+- dv.flags =
+- (prev.diagonal_quadrant() == dv.curr.diagonal_quadrant()) |
+- ((dv.curr.diagonal_quadrant() == dv.next.diagonal_quadrant()) << 1);
+- break;
++ case outline_miter_join:
++ case outline_round_join:
++ dv.flags =
++ (prev.diagonal_quadrant() == dv.curr.diagonal_quadrant()) |
++ ((dv.curr.diagonal_quadrant() == dv.next.diagonal_quadrant()) << 1);
++ break;
+
+- case outline_miter_accurate_join:
+- dv.flags = 0;
+- break;
+- }
++ case outline_miter_accurate_join:
++ dv.flags = 0;
++ break;
++ }
+
+- if((dv.flags & 1) == 0 && m_line_join != outline_round_join)
+- {
+- bisectrix(prev, dv.curr, &dv.xb1, &dv.yb1);
+- }
++ if((dv.flags & 1) == 0 && m_line_join != outline_round_join)
++ {
++ bisectrix(prev, dv.curr, &dv.xb1, &dv.yb1);
++ }
+
+- if((dv.flags & 2) == 0 && m_line_join != outline_round_join)
+- {
+- bisectrix(dv.curr, dv.next, &dv.xb2, &dv.yb2);
+- }
+- draw(dv, 0, m_src_vertices.size());
++ if((dv.flags & 2) == 0 && m_line_join != outline_round_join)
++ {
++ bisectrix(dv.curr, dv.next, &dv.xb2, &dv.yb2);
+ }
++ draw(dv, 0, m_src_vertices.size());
+ }
+ else
+ {
+--
+1.8.1.4
+