GradientRenderer.cpp
/**
 *	Draws a gradient filling the rectangle specified by r
 *	in direction of nAngle (which is specified in tenth of degrees)
 *	using a linear shading from color crStart to crEnd
 */
Draws a gradient filling the rectangle specified by r
in direction of nAngle (which is specified in tenth of degrees)
using a linear shading from color crStart to crEnd
Draws a gradient filling the rectangle specified by r in direction of nAngle ( which is specified in tenth of degrees ) using a linear shading from color crStart to crEnd
void CGradientRenderer::DrawGradient(CDC* pDC, HANDLE hndPrinter, CRect r, int nAngle, COLORREF crStart, COLORREF crEnd, CPreviewDC* pDCPreview)
{
	Graphics graphics (pDC->GetSafeHdc (), hndPrinter);
	graphics.SetPageUnit (UnitPixel);
	graphics.SetSmoothingMode (SmoothingModeHighQuality);
	graphics.SetInterpolationMode (InterpolationModeHighQualityBicubic);
	graphics.SetPixelOffsetMode (PixelOffsetModeHighQuality);
	Brush* pBrush = CGradient::CreateLinearGradientBrush (r, deg2rad (nAngle), crStart, crEnd);
	graphics.FillRectangle (pBrush, r.left, r.top, r.Width (), r.Height ());
}
void CGradientRenderer :: DrawGradient ( CDC * pDC , HANDLE hndPrinter , CRect r , int nAngle , COLORREF crStart , COLORREF crEnd , CPreviewDC * pDCPreview ) { Graphics graphics ( pDC -> GetSafeHdc ( ) , hndPrinter ) ; graphics . SetPageUnit ( UnitPixel ) ; graphics . SetSmoothingMode ( SmoothingModeHighQuality ) ; graphics . SetInterpolationMode ( InterpolationModeHighQualityBicubic ) ; graphics . SetPixelOffsetMode ( PixelOffsetModeHighQuality ) ; Brush * pBrush = CGradient :: CreateLinearGradientBrush ( r , deg2rad ( nAngle ) , crStart , crEnd ) ; graphics . FillRectangle ( pBrush , r . left , r . top , r . Width ( ) , r . Height ( ) ) ; }
Draws a gradient filling the rectangle specified by r
      in direction of nAngle (which is specified in tenth of degrees)
      using a linear shading from color crStart to crEnd
Draws a gradient filling the rectangle specified by r in direction of nAngle ( which is specified in tenth of degrees ) using a linear shading from color crStart to crEnd