Advertisement
apl-mhd

Home

Nov 8th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.04 KB | None | 0 0
  1. #include "iGraphics.h"
  2.  
  3.  
  4. double x=50.0;
  5. double y=50.0;
  6.  
  7. double xa[]={65, 292, 5};
  8. double ya[]={27, 371, 10};
  9.  
  10. void animateBall()
  11. {
  12.  
  13.     //if(x>543){
  14.         //x = 50.0;
  15.         //y = 50.0;
  16.     //}
  17. //x=x+5;
  18.  
  19. }
  20.  
  21. void iDraw()
  22. {
  23.  
  24. iClear();
  25.  
  26. iSetColor(0,255,0);
  27.  
  28. iFilledRectangle(100,60,400,240);
  29.  
  30. iLine(65, 292, 278, 371);
  31. iLine(544, 292, 278, 371);
  32. iSetColor(246,43,15);
  33.  
  34. iFilledRectangle(150, 150, 50, 50);
  35. iSetColor(246,43,15);
  36. iFilledRectangle(400, 150, 50, 50);
  37. iSetColor(43,15,246);
  38. iFilledRectangle(270, 70, 70, 150);
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. //iFilledCircle(x,y,20);
  46. }
  47.  
  48. //place your drawing codes here
  49.  
  50. void iMouseMove(int mx, int my)
  51. {
  52.     printf("mouse cliked at: %d %d\n",mx,my);
  53. //place your codes here
  54. }
  55. void iMouse(int button, int state, int mx, int my)
  56. {
  57.        
  58.  
  59. }
  60. void iKeyboard(unsigned char key)
  61. {
  62. //place your codes here
  63. }
  64. void iSpecialKeyboard(unsigned char key)
  65. {
  66. //place your codes for other keys here
  67. }
  68. int main()
  69. {
  70.    
  71.    
  72.     //iSetTimer(30,animateBall);
  73.  
  74.    
  75.  
  76. iInitialize(600, 400,"Hello iGraphics");
  77. return 0;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement