Squeak Class Documentation category index | class index  
 
MorphicTransform
  category: Graphics-Transformations
  superclass: DisplayTransform
  subclasses:

This class implements simple translation, scaling and rotation for points, as well as inverse transformations. These transformations are used in TransformMorphs (clipping scrollers) and TransformationMorphs (general flex-morph wrappers) to map, eg, global mouse coords into local coords, and to invert, eg, local damage rectangles into global damage rectangles.

instance methods
  accessing
  angle
inverseTransformation
offset
scale
withAngle:
withOffset:
withScale:

  composing
  composedWithLocal:

  converting
  asMatrixTransform2x3
asMorphicTransform

  encoding
  encodeForRemoteCanvas

  initialize
  setIdentiy

  printing
  printOn:

  private
  setAngle:
setOffset:
setOffset:angle:scale:
setScale:

  testing
  isIdentity
isMorphicTransform
isPureTranslation

  transformations
  composedWith:
invert:
invertBoundsRect:
invertRect:
transform:
transformBoundsRect:

  transforming points
  globalPointToLocal:
localPointToGlobal:

class methods
  instance creation
  fromRemoteCanvasEncoding:
identity
new
offset:
offset:angle:scale:

instance methods
  accessing top  
 

angle


 

inverseTransformation

Return the inverse transformation of the receiver


 

offset


 

scale


 

withAngle:

Return a copy of me with a different Angle


 

withOffset:

Return a copy of me with a different Offset


 

withScale:

Return a copy of me with a different Scale


  composing top  
 

composedWithLocal:

Return the composition of the receiver and the local transformation passed in.
A 'local' transformation is defined as a transformation that takes place
between the receiver (the 'global') transformation and any 'local' point
computations, e.g., for the methods

globalPointToLocal: globalPoint
globalPoint -> globalTransform -> localTransform -> locaPoint

localPointToGlobal: localPoint
localPoint -> localTransform -> globalTransform -> globalPoint


  converting top  
 

asMatrixTransform2x3

Represent the receiver as a 2x3 matrix transformation


 

asMorphicTransform


  encoding top  
 

encodeForRemoteCanvas

encode this transform into a string for use by a RemoteCanvas


  initialize top  
 

setIdentiy


  printing top  
 

printOn:

Append to the argument, aStream, a sequence of characters that
identifies the receiver.


  private top  
 

setAngle:


 

setOffset:


 

setOffset:angle:scale:


 

setScale:


  testing top  
 

isIdentity

Return true if the receiver is the identity transform; that is, if applying to a point returns the point itself.


 

isMorphicTransform

Return true if the receiver is a MorphicTransform, that is specifies the transformation values explicitly.


 

isPureTranslation

Return true if the receiver specifies no rotation or scaling.


  transformations top  
 

composedWith:

Return a new transform that has the effect of transforming points first by the receiver and then by the argument.


 

invert:

Transform the given point from local to global coordinates.


 

invertBoundsRect:

Return a rectangle whose coordinates have been transformed
from local back to global coordinates. NOTE: if the transformation
is not just a translation, then it will compute the bounding box
in global coordinates.


 

invertRect:


 

transform:

Transform the given point from global to local coordinates.


 

transformBoundsRect:

Return a rectangle whose coordinates have been transformed
from global to local coordinates. NOTE: if the transformation
is not just a translation, then it will compute the bounding box
in global coordinates.


  transforming points top  
 

globalPointToLocal:

Transform aPoint from global coordinates into local coordinates


 

localPointToGlobal:

Transform aPoint from global coordinates into local coordinates


class methods
  instance creation top  
 

fromRemoteCanvasEncoding:

DisplayTransform fromRemoteCanvasEncoding: 'Morphic,-88,-128,1.345165663873898,0.1352584843149221'


 

identity


 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


 

offset:


 

offset:angle:scale: