Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
PolygonMorph method shapeFromPen:
Last updated at 9:12 pm UTC on 3 December 2017
Draw an empty regular polygon. This example uses the shapeFromPen method. Pen graphics are based on the concepts known from LOGO:

 (PolygonMorph
    shapeFromPen: [:p | 12 timesRepeat: [p go:50. p turn:30.]]
       color: Color transparent borderWidth: 4 borderColor: Color blue)
   openInHand

PolygonMorph_shapeFromPen_2017-03-08.png

see also
Methods forward: and turn: for Morph objects