Gradient.h 894 B

123456789101112131415161718192021222324252627
  1. // Gradient.h: interface for the CGradient class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(GRADIENT_H)
  5. #define GRADIENT_H
  6. #define PI 3.1415926535897932384626433832795
  7. #define GAMMA 0.4 // 广义自动矩阵汇编方法?;
  8. class CGradient
  9. {
  10. public:
  11. // Public methods
  12. CGradient();
  13. virtual ~CGradient();
  14. // 水平梯度;
  15. void HorizontalGradient(CDC* pDC, LPRECT lpRect, COLORREF sColor, COLORREF eColor, BOOL bGamma=FALSE, double gamma=GAMMA);
  16. void HorizontalGradient(CDC* pDC, HRGN hRgn, COLORREF sColor, COLORREF eColor, BOOL bGamma=FALSE, double gamma=GAMMA);
  17. // 垂直梯度;
  18. void VerticalGradient(CDC* pDC, LPRECT lpRect, COLORREF sColor, COLORREF eColor, BOOL bGamma=FALSE, double gamma=GAMMA);
  19. void VerticalGradient(CDC* pDC, HRGN hRgn, COLORREF sColor, COLORREF eColor, BOOL bGamma=FALSE, double gamma=GAMMA);
  20. };
  21. #endif // !defined(GRADIENT_H)