Guest User

Untitled

a guest
Dec 7th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. __forceinline void DrawPlayer(GpGraphics *graphics, REAL x, REAL y, REAL size)
  2. {
  3. GpSolidFill *brush;
  4. GpPath *path;
  5. GpPathGradient *pathgradient;
  6.  
  7. // main ellipse:
  8. GdipCreatePath(FillModeWinding, &path);
  9. GdipAddPathEllipse(path, x, y, size, size);
  10. GdipCreatePathGradientFromPath(path, &pathgradient);
  11. GdipSetPathGradientCenterColor(pathgradient, 0xFF2D9B2D);
  12.  
  13. ARGB colors = { 0xFF095A09 };
  14. int count = 1;
  15. GdipSetPathGradientSurroundColorsWithCount(pathgradient, &colors, &count);
  16. GdipFillEllipse(graphics, pathgradient, x, y, size, size);
  17.  
  18. // reflection:
  19. GdipAddPathEllipse(path, x, y, size, size);
  20. GdipSetPathGradientCenterColor(pathgradient, 0x88FFFFFF);
  21. GdipFillEllipse(graphics, pathgradient, x, y, size, size);
  22.  
  23. GdipCreateSolidFill(0x44FFFFFF, &brush);
  24. GdipFillEllipse(graphics, brush, x + size/5, y + size/10, size/3 * 2, size/3);
  25.  
  26. // eyes:
  27. GdipCreateSolidFill(0xFFFFFFFF, &brush);
  28. GdipFillEllipse(graphics, brush, x + size/7, y + size/7, size/3, size/3);
  29. GdipFillEllipse(graphics, brush, x + size/2, y + size/7, size/3, size/3);
  30.  
  31. GdipCreateSolidFill(0xFF000000, &brush);
  32. GdipFillEllipse(graphics, brush, x + size/4, y + size/4, size/8, size/8);
  33. GdipFillEllipse(graphics, brush, x + size/3 + size/4, y + size/4, size/8, size/8);
  34. }
Add Comment
Please, Sign In to add comment