MCPcopy Create free account
hub / github.com/HumbleUI/Skija / convexity

Method convexity

tests/java/PathTest.java:82–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81
82 public void convexity() {
83 try (Path p = new PathBuilder().lineTo(40, 20).lineTo(0, 40).lineTo(0, 0).closePath().build()) {
84 assertEquals(true, p.isConvex());
85 }
86
87 try (Path p = new PathBuilder().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0).closePath().build()) {
88 assertEquals(false, p.isConvex());
89 }
90 }
91
92 public void isShape() {
93 for (var dir: PathDirection.values()) {

Callers

nothing calls this directly

Calls 5

closePathMethod · 0.80
lineToMethod · 0.80
assertEqualsMethod · 0.80
isConvexMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected