-
Notifications
You must be signed in to change notification settings - Fork 0
Home
hilaire edited this page May 15, 2025
·
42 revisions
Welcome to the Technical wiki!
This is a scratchpad area to develop articles and documents which will later be moved to the repository. The documentation written here is Work-In-Progress - drafts.
- How_do_I_read_a_file_dragged_and_dropped_on_to_the_desktop
- How_to_use_sound
- How_to_install_StyledText
from: https://wiki.squeak.org/squeak/1145
About creating a subclass of ColoredBoxMorph and overriding the method #drawOn:
!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! !