Created
October 12, 2017 17:01
-
-
Save grkvlt/83a5d03d0261f5d876b53fef27fe0d5a to your computer and use it in GitHub Desktop.
Exploring Iterated Function Systems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Corner getCorner(Transform t, Point point) { | |
for (Corner corner : Corner.values()) { | |
Point center = corner.getPoint(unit()); | |
t.getTransform().transform(center, center); | |
Rectangle handle = new Rectangle(center.x — 5, center.y — 5, 10, 10); | |
if (handle.contains(point)) { | |
return corner; | |
} | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment