[Cuis-dev] Correct superclass for PBE CrossMorph demo?
H. Hirzel
hannes.hirzel at gmail.com
Tue May 13 12:10:13 PDT 2025
Hi
What would be the correct superclass in Cuis with the new Morph class
hierarchy for an old Pharo by example demo morph?
ColoredBoxMorph?
--Hannes
!classDefinition: #CrossMorph category: 'MorphSubclassDemo'!
ColoredBoxMorph subclass: #CrossMorph
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'MorphSubclassDemo'!
!CrossMorph methodsFor: 'as yet unclassified' stamp: 'hjh 5/13/2025
20:30:00'!
drawOn: aCanvas
| crossHeight crossWidth horizontalBar verticalBar |
crossHeight := self morphHeight / 3.0 .
crossWidth := self morphWidth / 3.0 .
horizontalBar := self localBounds insetBy: 0 @ crossHeight.
verticalBar := self localBounds insetBy: crossWidth @ 0.
aCanvas fillRectangle: horizontalBar color: self color.
aCanvas fillRectangle: verticalBar color: self color! !
Ref: https://wiki.squeak.org/squeak/1145
More information about the Cuis-dev
mailing list