Squeak Class Documentation category index | class index  
 
ImageMorphWithSpotlight
  category: Morphic-Demo
  superclass: ImageMorph
  subclasses:

This class implements an image that appears one way or another depending upon whether it lies within a spotlight shape that moves with the cursor. As delivered, the shape is a simple circle, the spotlighted appearance is that of a ColorForm, and the non-highlighted apperarance is a derived gray-scale form.

The implementation will space-efficient if supplied with a ColorForm, because the gray-scale derived form will share the same bitmap.

In general, any two images can be used -- one could be blurred, the other sharp -- and the masking form can be any shape.

At some point this class should be merged somehow with ScreeningMorph.

instance methods
  all
  backgroundImage:spotImage:spotShape:
drawOn:
image:
spotChanged
step
stepTime

class methods
  no messages
 

instance methods
  all top  
 

backgroundImage:spotImage:spotShape:

See class comment.


 

drawOn:


 

image:

The spotlight will reveal the original form supplied
while the background form will be derived grayscale.


 

spotChanged


 

step

Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.


 

stepTime

Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.


class methods
  no messages top