daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void fb_paintline2(Point p1, Point p2, uint16_t clr)
  2. {
  3.     int i;
  4.     int j;
  5.     int xdiff = p2.x - p1.x;
  6.     int ydiff = p2.y - p1.y;
  7.     int len = 0;
  8.     if(xdiff > 0)
  9.     {
  10.         if (ydiff > 0)
  11.         {
  12.             int pixelsforeachx = (p2.x-p1.x)/(p2.x-p1.x);
  13.             for(i = p1.x; i < p2.x; i++)
  14.             {
  15.                 for(j = 0; j < pixelsforeachx; j++)
  16.                 {}
  17.                     fb_plot(p1.y+len*j, i , clr);
  18.                     len += pixelsforeachx;
  19.                 //}
  20.             }
  21.         }
  22.     }  
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top