title: Drawing a simple linear gradient inside a rect that is inside a view
body: <p>I'm reading the documentation about gradients and I'm a little bit lost.
  I have a view, and inside that view, I just want to draw a simple black to gray linear gradient inside a rect (smaller than the view), from bottom to top.
  How may I do that without subclassing anything (I've read many things that need to subclass the view)?</p>
  
  <p>I'm searching a way to do this as simple as I've ever done on various platforms. Something like (language free :-) ) :</p>
  
  <pre><code>blackcolor = MakeBlack();
  whiteColor = MakeWhite();
  
  startPoint = MakeStartPoint();
  endPoint = MakeEndPoint();
  
  onthisgraphicport = SetGraphicPort(self.view);
  clippingRect = MakeClipRect();
  
  DrawGradient(from:whiteColor, to:blackcolor, from:startPoint, to:endPoint, onthisgraphicport, intoThisRect:clippingRect);
  </code></pre>
  
  <p>Thank you for your help.</p>