public override void Draw(Graphics e, Ball b) { int alpha; float dist = (float)MiscUtilities.Distance(Center, b.Center); if (dist > 192) { alpha = 0; } else { alpha = (int)((1.0f - (dist / 192.0f)) * 120.0f); } if (b.IsStateAlso(BallState.ViewMore)) { alpha = 125; } using (Pen p = colBorder(Color.FromArgb(alpha, 255, 255, 255))) { float bw = Constants.BlockWidth; e.FillRectangle(new SolidBrush(Color.FromArgb(alpha, 200, 200, 200)), currentX, currentY, bw, bw); e.DrawRectangle(p, currentX, currentY, bw, bw); } }