Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void drawCoordinates(Bmp* this, int resolution, int offset)
  2. {
  3.     drawLine(this,BLACK,offset,offset,this->width-offset,offset);
  4.     drawLine(this,BLACK,offset,offset-1,this->width-offset,offset-1);
  5.     drawLine(this,BLACK,offset,offset-2,this->width-offset,offset-2);
  6.     drawLine(this,BLACK,offset,offset,offset,this->height-offset);
  7.     drawLine(this,BLACK,offset-1,offset,offset-1,this->height-offset);
  8.     drawLine(this,BLACK,offset-2,offset,offset-2,this->height-offset);
  9.  
  10.     int i;
  11.  
  12.     for(i=offset+resolution;i<=this->width-offset;i=i+resolution)
  13.     {
  14.         drawLine(this,BLACK,i-1,offset+10,i-1,offset-10);
  15.         drawLine(this,BLACK,i,offset+10,i,offset-10);
  16.         drawLine(this,BLACK,i+1,offset+10,i+1,offset-10);
  17.     }
  18.  
  19.     for(i=offset+resolution;i<=this->width-offset;i=i+resolution)
  20.     {
  21.         drawLine(this,BLACK,offset+10,i-1,offset-10,i-1);
  22.         drawLine(this,BLACK,offset+10,i,offset-10,i);
  23.         drawLine(this,BLACK,offset+10,i+1,offset-10,i+1);
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement