Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void fb_paintline2(Point p1, Point p2, uint16_t clr)
- {
- int i;
- int j;
- int xdiff = p2.x - p1.x;
- int ydiff = p2.y - p1.y;
- int len = 0;
- if(xdiff > 0)
- {
- if (ydiff > 0)
- {
- int pixelsforeachx = (p2.x-p1.x)/(p2.x-p1.x);
- for(i = p1.x; i < p2.x; i++)
- {
- for(j = 0; j < pixelsforeachx; j++)
- {}
- fb_plot(p1.y+len*j, i , clr);
- len += pixelsforeachx;
- //}
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment