aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkGeometry.h
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-11-18 16:09:51 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-11-18 16:09:51 +0000
commit909994fbae0ffb532f42feac8859f8d86bbf64de (patch)
tree8fa0989863618109ed9f17c25b949d68f63bf541 /include/core/SkGeometry.h
parentbb13586591bd412a0372aeb85d44159d2fa3f947 (diff)
new scanconversion technique
This technique geometrically clips all segments against the clip bounds, ensuring that we never send a value to the edgelist that might overflow in fixedpoint. Current disabled in SkScan_Path.cpp by a #define. There are a few minor pixel differences between this and the old technique, as found by the gm tool, so at the moment this new code is off by default. git-svn-id: http://skia.googlecode.com/svn/trunk@432 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkGeometry.h')
-rw-r--r--include/core/SkGeometry.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/core/SkGeometry.h b/include/core/SkGeometry.h
index 920afb0a87..853a7c34a5 100644
--- a/include/core/SkGeometry.h
+++ b/include/core/SkGeometry.h
@@ -57,8 +57,8 @@ int SkFindQuadExtrema(SkScalar a, SkScalar b, SkScalar c, SkScalar tValues[1]);
/** Given 3 points on a quadratic bezier, chop it into 1, 2 beziers such that
the resulting beziers are monotonic in Y. This is called by the scan converter.
Depending on what is returned, dst[] is treated as follows
- 1 dst[0..2] is the original quad
- 2 dst[0..2] and dst[2..4] are the two new quads
+ 0 dst[0..2] is the original quad
+ 1 dst[0..2] and dst[2..4] are the two new quads
*/
int SkChopQuadAtYExtrema(const SkPoint src[3], SkPoint dst[5]);
int SkChopQuadAtXExtrema(const SkPoint src[3], SkPoint dst[5]);
@@ -110,12 +110,13 @@ int SkFindCubicExtrema(SkScalar a, SkScalar b, SkScalar c, SkScalar d, SkScalar
/** Given 4 points on a cubic bezier, chop it into 1, 2, 3 beziers such that
the resulting beziers are monotonic in Y. This is called by the scan converter.
Depending on what is returned, dst[] is treated as follows
- 1 dst[0..3] is the original cubic
- 2 dst[0..3] and dst[3..6] are the two new cubics
- 3 dst[0..3], dst[3..6], dst[6..9] are the three new cubics
+ 0 dst[0..3] is the original cubic
+ 1 dst[0..3] and dst[3..6] are the two new cubics
+ 2 dst[0..3], dst[3..6], dst[6..9] are the three new cubics
If dst == null, it is ignored and only the count is returned.
*/
int SkChopCubicAtYExtrema(const SkPoint src[4], SkPoint dst[10]);
+int SkChopCubicAtXExtrema(const SkPoint src[4], SkPoint dst[10]);
/** Given a cubic bezier, return 0, 1, or 2 t-values that represent the
inflection points.