Hello,
I really like the BallonMorph of Squeak (aka tooltip) and would like to port it
to another programming language. But I’m a newbie in Smalltalk and Squeak so
I’m having a hard time understanding e.g. the getVertices method. As far as I
understand this method creates the vertices of the polygon that is the speech
bubble?
It would really help me if someone could post this method in e.g. Java (my goal
is to port BalloonMorph to Processing - see http://www.processing.org/) or give
me some hints on how to read it.
Here is the method:
getVertices: bounds
"Construct vertices for a balloon up and to left of anchor"
| corners |
corners := bounds corners atAll: #(1 4 3 2).
^ (Array
with: corners first + (0 - bounds width // 2 @ 0)
with: corners first + (0 - bounds width // 4 @ (bounds height
// 2))) , corners
Thanks for helping,
Werner Gaisbauer_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners