links to this page:
Drawing a Hilbert Curve
Notes on specific classes
BorderedMorph
LineMorph
How to unload Etoys from Squeak 5.3
NumberLineMorph
Swiki Page List
PolygonMorph method shapeFromPen:
ListOfClassesInSqueak5dot1
PolygonMorph
Last updated at 6:41 pm UTC on 8 March 2017
The PolygonMorph is a subclass of
BorderedMorph
.
Subclasses are
BalloonMorph
CurveMorph
CurvierMorph
EnvelopeLineMorph
LineMorph
MixedCurveMorph
StarMorph
Examples:
Draw a filled triangle:
(PolygonMorph
vertices: (Array with: 0@0 with: 200@0 with: 100@100)
color: Color red borderWidth: 1 borderColor: Color black) openInWorld
Draw a regular polygon using the
shapeFromPen: method
Draw a smoothed polygon:
b _ (PolygonMorph
vertices: (Array with: 50@100 with: 200@300 with: 100@400)
color: Color red borderWidth: 1 borderColor: Color black).
World addMorph: b.
b beSmoothCurve.
see also
Drawing a Hilbert Curve