Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Morph drawOn: aCanvas
Last updated at 9:36 pm UTC on 15 November 2017
the default method to draw a morph, override in subclasses if needed.


 drawOn: aCanvas

	self wantsRoundedCorners
		ifTrue: [aCanvas frameAndFillRoundRect: self bounds 
                                 radius: self cornerRadius 
                                 fillStyle: self fillStyle 
                                 borderWidth: self borderStyle width 
                                 borderColor: self borderStyle color
                        ]
		ifFalse: [aCanvas fillRectangle: self bounds  
                                  fillStyle: self fillStyle 
                                  borderStyle: self borderStyle
                         ].

For more see Fun with Morphic