Squeak Class Documentation category index | class index  
 
TransformMorph
  category: Morphic-Basic
  superclass: Morph
  subclasses: FlashSorterMorph ZoomMorph TransformationMorph

A TransformMorph introduces a 2-D transformation between its (global) coordinates and the (local) coordinates of its submorphs, while also clipping all display to its bounds. Specifically, with no offset, angle or scaling, a submorph with coordinates (0@0) will appear exactly at the topLeft of the windowMorph (its position). Rotation and scaling are relative to the local origin, (0@0).

TransformMorphs operate with two different display strategies, depending on whether the transformation is a pure translation or not. If so, then they simply use a clipping canvas and display their submorphs with the appropriate offset. If the transformation includes scaling or rotation, then a caching canvas is used, whose active area covers the fullBounds of the submorphs intersected with the source quadrilateral corresponding to the window bounds.

instance methods
  accessing
  angle
angle:
offset
offset:
scale
scale:
setOffset:angle:scale:
smoothing:
smoothingOff
smoothingOn
transform
transform:

  change reporting
  invalidRect:from:

  drawing
  colorForInsets
drawSubmorphsOn:

  events
  grabTransform
transformFrom:

  geometry
  containsPoint:
contentBounds
fullBounds
privateFullMoveBy:
submorphBounds
wantsHaloFromClick

  initialization
  initialize

  menu
  addCustomMenuItems:hand:

  submorphs-accessing
 

class methods
  no messages
 

instance methods
  accessing top  
 

angle


 

angle:


 

offset


 

offset:


 

scale


 

scale:


 

setOffset:angle:scale:


 

smoothing:


 

smoothingOff


 

smoothingOn


 

transform


 

transform:


  change reporting top  
 

invalidRect:from:

Translate damage reports from submorphs by the scrollOffset.


  drawing top  
 

colorForInsets

Return the color to be used for shading inset borders. The default is my own color, but it might want to be, eg, my owner's color. Whoever's color ends up prevailing, the color itself gets the last chance to determine, so that when, for example, an InfiniteForm serves as the color, callers won't choke on some non-Color object being returned


 

drawSubmorphsOn:

Display submorphs back to front


  events top  
 

grabTransform

Return the transform for the receiver which should be applied during grabbing


 

transformFrom:

Return a transform to map coorinates of uberMorph, a morph above me in my owner chain, into the coordinates of my submorphs.


  geometry top  
 

containsPoint:


 

contentBounds


 

fullBounds

Overridden to clip submorph hit detection to my bounds.


 

privateFullMoveBy:

Private! Relocate me, but not my subMorphs.


 

submorphBounds

Private. Compute the actual full bounds of the receiver


 

wantsHaloFromClick


  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.


  submorphs-accessing top  

class methods
  no messages top