Commit Graph

4 Commits

Author SHA1 Message Date
Jim Van Verth
6784ffa78e Add some new PolyUtils tests.
Also:
* clean up PolyUtils checks to be correct and consistent.
* fix some bugs discovered by the unit tests.

Bug: skia:
Change-Id: I1a8e07d13cb44fecc67344154dc1002f3f910f5d
Reviewed-on: https://skia-review.googlesource.com/138592
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-07-03 23:10:27 +00:00
Jim Van Verth
8664a1d7d7 Add ear-clipping code to triangulate simple polygons.
Use this to fill concave shadows.

Bug: skia:7971
Change-Id: I63dc1ed845f9fa3fcd86f1ad13b03da23cae0313
Reviewed-on: https://skia-review.googlesource.com/135200
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-29 13:29:57 +00:00
Jim Van Verth
872da6b571 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>
2018-04-10 16:31:32 +00:00
Jim Van Verth
4db18edb95 Add SkOffsetSimplePolygon.
Performs inset and outset operations on simple polygons and returns
a simple polygon, if possible.

Bug: skia:
Change-Id: I6d468174ad70b5279b736c532e19cbb84ff9f955
Reviewed-on: https://skia-review.googlesource.com/116483
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-03 14:37:50 +00:00