Advertisement
dcomicboy

circle

Jun 7th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. bool MenuShow = True;
  2. void CircleFilled(int x, int y, int r, int s, DWORD color,LPDIRECT3DDEVICE9 pDevice)
  3. {
  4. float Step = 3.14159265*2.0/s; // Add this back in for Sides.
  5. for (float a=0; a < 3.14159265*2.0; a += Step)
  6. {
  7. float x1 = r * cos(a) + x;
  8. float y1 = r * sin(a) + y;
  9. float x2 = r * cos(a+Step) + x;
  10. float y2 = r * sin(a+Step) + y;
  11. FillRGB(x1,y1,x2,y2,color,pDevice);
  12. }
  13. }
  14. if(MenuShow)
  15. CircleFilled(0,0,20,9500000000, Green, pDevice);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement