Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: CBKGradient.cpp
  3. *
  4. * This file contains the code to support the functionality test harness
  5. * for GDI+. This includes menu options and calling the appropriate
  6. * functions for execution.
  7. *
  8. * Created: 05-May-2000 - Jeff Vezina [t-jfvez]
  9. *
  10. * Copyright (c) 2000 Microsoft Corporation
  11. *
  12. \**************************************************************************/
  13. #include "CBKGradient.h"
  14. #include "CFuncTest.h"
  15. extern CFuncTest g_FuncTest;
  16. CBKGradient::CBKGradient(BOOL bRegression)
  17. {
  18. strcpy(m_szName,"BKGradient");
  19. m_bRegression=bRegression;
  20. }
  21. CBKGradient::~CBKGradient()
  22. {
  23. }
  24. void CBKGradient::Set(Graphics *g)
  25. {
  26. Color color1b(255, 255, 0, 0);
  27. Color color2b(128, 0, 0, 255);
  28. RectF Rect;
  29. if (!m_bUseSetting)
  30. return;
  31. Rect.X=0.0f;
  32. Rect.Y=0.0f;
  33. Rect.Width=TESTAREAWIDTH;
  34. Rect.Height=TESTAREAHEIGHT;
  35. LinearGradientBrush LinearGrad(Rect, color1b, color2b,//color1b,color1b
  36. LinearGradientModeForwardDiagonal);
  37. g->FillRectangle(&LinearGrad,Rect);
  38. }