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.

54 lines
2.5 KiB

  1. #ifndef __GDIPSCSAVE_H
  2. #define __GDIPSCSAVE_H
  3. #include <windows.h>
  4. #include <objbase.h>
  5. #include <scrnsave.h>
  6. #include "resource.h"
  7. //#include <imaging.h>
  8. #include <gdiplus.h>
  9. using namespace Gdiplus;
  10. //#include <stdio.h>
  11. #define MINVEL 1 /* minimum number of fractals */
  12. #define MAXVEL 10 /* maximum number of fractals */
  13. #define DEFVEL 3 /* default number of fractals */
  14. #define REDRAWTIME 2000 /* number of milliseconds between redraws */
  15. #define MAXHEIGHWAYLEVEL 14 /* Maximum number of levels for heighway dragon */
  16. #define MINHEIGHWAYLEVEL 7 /* Minimum number of levels for heighway dragon */
  17. DWORD nNumFracts = DEFVEL; /* number of fractals variable */
  18. DWORD nFractType = 0; /* Type of fractal to draw */
  19. WCHAR szAppName[APPNAMEBUFFERLEN]; /* .ini section name */
  20. WCHAR szTemp[20]; /* temporary array of characters */
  21. BOOL fMandelbrot = FALSE; /* TRUE if mandelbrot sets used */
  22. #define HKEY_PREFERENCES TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\ScreenSaver\\Preferences")
  23. //FILE *stream;
  24. VOID FillSierpinski(Graphics *g, PointF one, PointF two, PointF three, int level, Brush *pBrush, Pen *pPen);
  25. VOID DrawSierpinski(HDC hDC, HWND hwnd, RECT rc, int iColor);
  26. VOID DrawHieghway(HDC hDC, HWND hwnd, RECT rc, int iColor);
  27. VOID IterateHieghway(PointF *points, PointF *newpoints, int *iSize);
  28. VOID DrawTree(HDC hDC, HWND hwnd, RECT rc, int iColor);
  29. VOID DrawBranch(HWND hwnd, Graphics *g, GraphicsPath *path, int iLevel,
  30. PointF *scale, REAL *rotate, PointF *translate,
  31. int iBranches, int iColor);
  32. VOID DrawJulia(HDC hDC, HWND hwnd, RECT rc, int iColor, BOOL fMandelbrot);
  33. ARGB IndexToSpectrum(INT index);
  34. INT SpectrumToIndex(ARGB argb);
  35. INT MakeColor(INT c1, INT c2, INT deltamax);
  36. INT MakeColor(INT c1, INT c2, INT c3, INT c4, INT deltamax);
  37. BYTE MakeAlpha(BYTE a1, BYTE a2, INT deltamax);
  38. BYTE MakeAlpha(BYTE a1, BYTE a2, BYTE a3, BYTE a4, INT deltamax);
  39. BOOL HalfPlasma(HWND& hwnd, Graphics& g,BitmapData &bmpd, INT x0, INT y0, INT x1, INT y1,REAL scale);
  40. VOID DrawPlasma(HDC hDC, HWND hwnd, RECT rc, int iColor);
  41. VOID GetFractalConfig (DWORD *nType, DWORD *nSize);
  42. VOID SetFractalConfig (DWORD nType, DWORD nSize);
  43. #endif