public boolean draw(Canvas canvas){
  update();
  final int glowHeight=mGlow.getIntrinsicHeight();
  final float distScale=(float)mHeight / mWidth;
  mGlow.setAlpha((int)(Math.max(0,Math.min(mGlowAlpha,1)) * 255));
  mGlow.setBounds(0,0,mWidth,(int)Math.min(glowHeight * mGlowScaleY * distScale* 0.6f,mHeight * MAX_GLOW_HEIGHT));
  mGlow.draw(canvas);
  if (mEdge != null) {
    final int edgeHeight=mEdge.getIntrinsicHeight();
    mEdge.setAlpha((int)(Math.max(0,Math.min(mEdgeAlpha,1)) * 255));
    mEdge.setBounds(0,0,mWidth,(int)(edgeHeight * mEdgeScaleY));
    mEdge.draw(canvas);
  }
  return mState != STATE_IDLE;
}

public boolean draw ( Canvas canvas ) { update ( ) ; final int glowHeight = mGlow . getIntrinsicHeight ( ) ; final float distScale = ( float ) mHeight / mWidth ; mGlow . setAlpha ( ( int ) ( Math . max ( 0 , Math . min ( mGlowAlpha , 1 ) ) * 255 ) ) ; mGlow . setBounds ( 0 , 0 , mWidth , ( int ) Math . min ( glowHeight * mGlowScaleY * distScale * 0.6f , mHeight * MAX_GLOW_HEIGHT ) ) ; mGlow . draw ( canvas ) ; if ( mEdge != null ) { final int edgeHeight = mEdge . getIntrinsicHeight ( ) ; mEdge . setAlpha ( ( int ) ( Math . max ( 0 , Math . min ( mEdgeAlpha , 1 ) ) * 255 ) ) ; mEdge . setBounds ( 0 , 0 , mWidth , ( int ) ( edgeHeight * mEdgeScaleY ) ) ; mEdge . draw ( canvas ) ; } return mState != STATE_IDLE ; }
draw into the provided canvas . assumes that the canvas has been rotated accordingly and the size has been set . the effect will be drawn the full width of x = 0 to x = width , emitting from y = 0 and extending to some factor < 1 . f of height .
