Squeak Class Documentation category index | class index  
 
GradientFillMorph
  category: Morphic-Widgets
  superclass: RectangleMorph
  subclasses:

Class GradientFillMorph is obsolete. For getting gradient fills use a BorderedMorph with an appropriate fill style, e.g.,

| morph fs |
morph _ BorderedMorph new.
fs _ GradientFillStyle ramp: {0.0 -> Color red. 1.0 -> Color green}.
fs origin: morph bounds center.
fs direction: (morph bounds width // 2) @ 0.
fs radial: true.
morph fillStyle: fs.
World primaryHand attachMorph: morph.

Here's the old (obsolete) comment:
GradientFills cache an array of bitpatterns for the colors across their rectangle. It costs a bit of space, but makes display fast enough to eschew the use of a bitmap. The array must be recomputed whenever the colors, dimensions or display depth change.

instance methods
  as yet unclassified
  gradientFillColor:
hasTranslucentColor
setGradientColor:

  drawing
  drawOn:

  initialize
  changed
initialize

  menu
  addCustomMenuItems:hand:
beHorizontal
beVertical
gradientDirection

  private
 

class methods
  no messages
 

instance methods
  as yet unclassified top  
 

gradientFillColor:


 

hasTranslucentColor

Answer true if this any of this morph is translucent but not transparent.


 

setGradientColor:


  drawing top  
 

drawOn:

Note that this could run about 4 times faster if we got hold of
the canvas's port and just sent it copyBits with new coords and color


  initialize top  
 

changed

Report that the area occupied by this morph should be redrawn.


 

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.


 

beHorizontal


 

beVertical


 

gradientDirection


  private top  

class methods
  no messages top