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.

53 lines
1.3 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: CPaths.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 "CFillMode.h"
  14. #include <limits.h>
  15. CFillMode::CFillMode(BOOL bRegression)
  16. {
  17. strcpy(m_szName,"Test Winding Fill Mode");
  18. m_bRegression=bRegression;
  19. }
  20. CFillMode::~CFillMode()
  21. {
  22. }
  23. VOID TestEscherNewPath(Graphics* g);
  24. void CFillMode::Draw(Graphics *g)
  25. {
  26. // Create an ALTERNATE non-zero winding fill mode path.
  27. GraphicsPath p1(FillModeAlternate);
  28. p1.AddEllipse(0, 0, 100, 100);
  29. p1.CloseFigure();
  30. GraphicsPath p2(FillModeAlternate);
  31. p2.AddEllipse(10, 10, 80, 80);
  32. p2.CloseFigure();
  33. // Both paths should be same direction. Filling with even-odd rule
  34. // gives a donut while non-zero gives a filled circle.
  35. p1.AddPath(&p2, FALSE);
  36. LinearGradientBrush brush(Point(0,0), Point(100,100), Color(0xFF,0,0xFF,0), Color(0xFF, 0xFF, 0, 0));
  37. g->FillPath(&brush, &p1);
  38. }