Squeak Class Documentation category index | class index  
 
ImageMorph
  category: Morphic-Basic
  superclass: Morph
  subclasses: PaintBoxColorPicker ThreePhaseButtonMorph MovieFrameSyncMorph PaintInvokingMorph PinMorph SoundMorph ImageMorphWithSpotlight InterpolatingImageMorph Sonogram WonderlandCameraControls PlayingCardMorph PaintBoxMorph ProjectViewMorph ChessPieceMorph

No comment. Sorry.

instance methods
  accessing
  color:
form
image
image:
isOpaque
isOpaque:
setNewImageFrom:

  card & stack
  basicType
couldHoldSeparateDataForEachInstance
currentDataValue
variableDocks

  drawing
  drawOn:
drawPostscriptOn:
wantsRoundedCorners

  initialization
  initialize

  menu
  addCustomMenuItems:hand:
changeOpacity
opacityString

  menu commands
  grabFromScreen
readFromFile

  other
  extent:
newForm:
releaseCachedState
wearCostume:

  parts bin
  initializeToStandAlone

class methods
  accessing
  defaultForm

  class initialization
  authoringPrototype
initialize

  instance creation
  fromString:
fromString:font:

  parts bin
  descriptionForPartsBin

instance methods
  accessing top  
 

color:

Set the receiver's color. Directly set the color if appropriate, else go by way of fillStyle


 

form

For compatability with SketchMorph.


 

image


 

image:


 

isOpaque

Return true if the receiver is marked as being completely opaque


 

isOpaque:

Mark the receiver as being completely opaque or not


 

setNewImageFrom:

Change the receiver's image to be one derived from the supplied form. If nil is supplied, clobber any existing image in the receiver, and in its place put a default graphic, either the one known to the receiver as its default value, else a squeaky mouse


  card & stack top  
 

basicType

Answer a symbol representing the inherent type I hold


 

couldHoldSeparateDataForEachInstance

Answer whether the receiver can potentially hold separate data for each instance


 

currentDataValue

Answer the current data value of the receiver, to be stored in each card instance if appropriate


 

variableDocks

Answer a list of VariableDock objects for docking up my data with an instance held in my containing playfield


  drawing top  
 

drawOn:


 

drawPostscriptOn:


 

wantsRoundedCorners

Default response is simple, fast, and false.
May be overridden to allow almost any morph to be rounded.


  initialization top  
 

initialize


  menu top  
 

addCustomMenuItems:hand:

Add morph-specific items to the given menu which was invoked by the given hand. This method provides is invoked both from the halo-menu and from the control-menu regimes.


 

changeOpacity


 

opacityString


  menu commands top  
 

grabFromScreen


 

readFromFile


  other top  
 

extent:

Do nothing; my extent is determined by my image Form.


 

newForm:


 

releaseCachedState

Release any state that can be recomputed on demand, such as the pixel values for a color gradient or the editor state for a TextMorph. This method may be called to save space when a morph becomes inaccessible. Implementations of this method should do 'super releaseCachedState'.


 

wearCostume:


  parts bin top  
 

initializeToStandAlone

Set up the receiver, created by a #basicNew and now ready to be initialized, as a fully-formed morph suitable for providing a graphic for a parts bin surrogate, and, when such a parts-bin surrogate is clicked on, for attaching to the hand as a viable stand-alone morph. Because of historical precedent, #initialize has been expected to handle this burden, though a great number of morphs actually cannot stand alone. In any case, by default we call the historical #initialize, though unhappily, so that all existing morphs will work no worse than before when using this protocol.


class methods
  accessing top  
 

defaultForm


  class initialization top  
 

authoringPrototype

Answer an instance of the receiver suitable for placing in a parts bin for authors


 

initialize

ImageMorph initialize


  instance creation top  
 

fromString:

Create a new ImageMorph which displays the input string in the standard button font


 

fromString:font:

Create a new ImageMorph showing the given string in the given font


  parts bin top  
 

descriptionForPartsBin

If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help. When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result. The parameters used in the implementation below are for documentation purposes only!