Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
BullsEyeMorph
Last updated at 1:28 pm UTC on 30 June 2018
"The BullsEyeMorph is a demo morph used in a tutorial LearnMorphic.st"

"A Morph that looks vaguely like a Bull's Eye!"


Morph subclass: #BullsEyeMorph
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'LearnMorphic'!
!BullsEyeMorph commentStamp: '<historical>' prior: 0!
A Morph that looks vaguely like a Bull's Eye.!





!BullsEyeMorph methodsFor: 'drawing' stamp: 'ls 6/12/2001 00:41'!
drawOn: aCanvas
	| dotBounds |
	aCanvas
		fillOval: self bounds
		color: self color.

	dotBounds :=
		(self bounds scaleBy: 1/2)
			center: self center.

	aCanvas
		fillOval: dotBounds
		color: Color red
		borderWidth: 1
		borderColor: Color black.! !





!BullsEyeMorph methodsFor: 'geometry' stamp: 'ls 6/12/2001 00:39'!

containsPoint: aPoint
	^(EllipseMorph new bounds: self bounds) containsPoint: aPoint! !