Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. GAME_ENGINE->SetColor(COLOR(255, 0, 0));
  2. DrawDotGrid(700, 0, 15, 2, 5, 4);
  3.  
  4. GAME_ENGINE->SetColor(COLOR(0, 255, 0));
  5. DrawDotGrid(700, 200, 15, 2, 4, 5);
  6.  
  7. GAME_ENGINE->SetColor(COLOR(0, 0, 255));
  8. DrawDotGrid(695, 195, 10, 12, 4, 5);
  9.  
  10.  
  11.  
  12.  
  13. void MethodsLab1::DrawDotGrid(int x, int y, int dotRadius, int gap, int rows, int cols)
  14. {
  15. int yPos = y + dotRadius + gap;
  16. for (int row = 0; row < rows; ++row, yPos += dotRadius * 2 + gap)
  17. {
  18. //Draw columns in this row
  19. int xPos = x + dotRadius + gap;
  20. for (int col = 0; col < cols; ++col, xPos += dotRadius * 2 + gap)
  21. {
  22. GAME_ENGINE->FillEllipse(xPos, yPos, dotRadius, dotRadius);
  23. }
  24.  
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement