Guest User

Untitled

a guest
Jun 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. void drawrectangle(int row,int col, int width, int height, unsigned short color)
  2. {
  3. int r,c;
  4.  
  5. for(r=0;r<height;r++)
  6. {
  7. for(c=0;c<width;c++)
  8. {
  9. setpixel(row+r,col+c,color);
  10. }
  11. }
  12.  
  13. }
  14.  
  15. //it is working above
  16.  
  17.  
  18. void drawrectangle(int row,int col, int width, int height, unsigned short color)
  19. {
  20.  
  21.  
  22. for(row;row<(height+row);row++)
  23. {
  24. for(col;c<(width+col);col++)
  25. {
  26. setpixel(row,col,color);
  27. }
  28. }
  29.  
  30. }
  31. //it is working, but the result is not what I expected..
Add Comment
Please, Sign In to add comment