FAQ: Difference between SketchMorph and ImageMorph
Last updated at 5:10 am UTC on 15 September 2016
Mark Guzdial asked: For displaying images, what's the difference between a SketchMorph and an ImageMorph? Both seem to have big hierarchies. Both seem to work fine for dumping a Form into them for display.
John Maloney answered in 2006:
SketchMorph used to be the way to get a Form to rotate and scale before we came up with TransformMorph. Now that we've found more general ways to do rotation/scaling of arbitrary Morphs, we should gradually move to ImageMorphs and eventually discard SketchMorph.
As of 2016 this has not (yet) happened.
A SketchMorph may be scaled whereas an ImageMorph cannot be scaled.
Morph subclass: #ImageMorph
Morph subclass: #SketchMorph
instanceVariableNames: 'originalForm rotationStyle scalePoint framesToDwell rotatedForm keepAspectRatio'