[Cuis-dev] Correct superclass for PBE CrossMorph demo?
Juan Vuletich
juan at cuis.st
Mon May 19 08:34:31 PDT 2025
I think that something in the style of Sample01Star is a much better
example of what Morphic can do in Cuis.
Cheers,
On 5/13/2025 4:10 PM, H. Hirzel via Cuis-dev wrote:
> 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
>
>
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
More information about the Cuis-dev
mailing list