Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
CrossMorph
Last updated at 11:13 pm UTC on 6 June 2018
Copied from http://pharo.gforge.inria.fr/PBE1/PBE1ch12.html (PBE = Pharo by Example)


 Morph subclass: #CrossMorph 
    instanceVariableNames: ’’ 
    classVariableNames: ’’ 
    poolDictionaries: ’’ 
    category: ’PBE-Morphic’



 drawOn: aCanvas

    | crossHeight crossWidth horizontalBar verticalBar | 

    crossHeight := self height / 3.0 . 
    crossWidth := self width / 3.0 . 

    horizontalBar := self bounds insetBy: 0 @ crossHeight. 
    verticalBar := self bounds insetBy: crossWidth @ 0. 

    aCanvas fillRectangle: horizontalBar color: self color. 

    aCanvas fillRectangle: verticalBar color: self color

tagBeginner