aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkOffsetPolygon.h
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2018-04-10 11:24:11 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-10 16:31:32 +0000
commit872da6b5713b966f628c54fcc2ad115054da4212 (patch)
treeae466ee7c23eb0571a65a07f25baf048bd22a0eb /src/utils/SkOffsetPolygon.h
parent3cdd7e22dd540fe472f40b50f99ecd82679d4dec (diff)
Add initial support for simple concave shadows.
Adds support for spot shadow outlines. Since filling the penumbra still needs to be done, this code is disabled for now. Bug: skia: Change-Id: I3369eb13832b47ad16dd29ce7c7d6a1a10b39aeb Reviewed-on: https://skia-review.googlesource.com/22363 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/utils/SkOffsetPolygon.h')
-rwxr-xr-xsrc/utils/SkOffsetPolygon.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/SkOffsetPolygon.h b/src/utils/SkOffsetPolygon.h
index a0555ab51e..b6c3a222ad 100755
--- a/src/utils/SkOffsetPolygon.h
+++ b/src/utils/SkOffsetPolygon.h
@@ -44,10 +44,12 @@ inline bool SkInsetConvexPolygon(const SkPoint* inputPolygonVerts, int inputPoly
* @param offset How far we wish to offset the polygon.
* Positive value means inset, negative value means outset.
* @param offsetPolgon The resulting offset polygon, if any.
+ * @param polygonIndices The indices of the original polygon that map to the new one.
* @return true if an offset simple polygon exists, false otherwise.
*/
bool SkOffsetSimplePolygon(const SkPoint* inputPolygonVerts, int inputPolygonSize,
- SkScalar offset, SkTDArray<SkPoint>* offsetPolygon);
+ SkScalar offset, SkTDArray<SkPoint>* offsetPolygon,
+ SkTDArray<int>* polygonIndices = nullptr);
/**
* Offset a segment by the given distance at each point.