summaryrefslogtreecommitdiff
path: root/src/cairo-line-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-22 12:53:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-29 08:42:17 +0100
commit06b9f8fa2d179850cda8a0a103896bc011ce46d6 (patch)
treeba6166eb807ba768a75cb7f71b7d68256842ece4 /src/cairo-line-private.h
parent5c03b20732b84370950f0c7e5648da86ef45a571 (diff)
downloadcairo-06b9f8fa2d179850cda8a0a103896bc011ce46d6.tar.gz
stroke,traps: Emit join without loss of precision
As the target renderers operate at a different sample resolution then we use internally for coordinate representation, there is always a potential for discrepancies in the line gradients when passing around trapezoids. To overcome this, the protocol specification of trapezoids uses the full lines and vertical range as opposed to vertices and so long as we always use the same lines for conjoint trapezoids, they remain abutting in the rasteriser. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84115 Testcase: bug-84115 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-line-private.h')
-rw-r--r--src/cairo-line-private.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/cairo-line-private.h b/src/cairo-line-private.h
new file mode 100644
index 000000000..ad401ef81
--- /dev/null
+++ b/src/cairo-line-private.h
@@ -0,0 +1,50 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2014 Intel Corporation, Inc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ */
+
+#ifndef CAIRO_LINE_PRIVATE_H
+#define CAIRO_LINE_PRIVATE_H
+
+#include "cairo-compiler-private.h"
+#include "cairo-error-private.h"
+#include "cairo-types-private.h"
+
+CAIRO_BEGIN_DECLS
+
+int cairo_lines_compare_at_y(const cairo_line_t *a,
+ const cairo_line_t *b,
+ int y);
+
+CAIRO_END_DECLS
+
+#endif /* CAIRO_LINE_PRIVATE_H */