Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
LineMorph
Last updated at 9:38 pm UTC on 25 September 2005
The LineMorph is a special case of PolygonMorph. To create a line the following LineMorph Class constructor method is used:
startPoint to: endPoint color: lineColor width: lineWidth
	^ PolygonMorph vertices: {startPoint. endPoint}
			color: Color black borderWidth: lineWidth borderColor: lineColor
Example:
 (LineMorph from: 100@100 to: 200@200 color: (Color red) width: 3) openInWorld 

This mail enlightens why LineMorph is implemented with a new method as class method instead of having an initialize method .http://lists.squeakfoundation.org/pipermail/squeak-dev/2003-March/054537.html