Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void bmp_rect(int x1, int y1, int x2, int y2, uint32_t color0, uint32_t color1, uint32_t * data)
- {
- int posx;
- int posy;
- void setPixel();
- for (posy=y1; posy <= y2; posy++)
- {
- for (posx=x1; posx<=x2; posx++)
- {
- if (posy<=(y1+20))
- {
- setPixel(posx, posy, color0, data);
- } else if (posx<=(x1+20))
- {
- setPixel(posx, posy, color0, data);
- } else if (posx>(x2-20))
- {
- setPixel (posx, posy, color0, data);
- } else
- {
- setPixel(posx, posy, color1, data);
- }
- if (posy>(y2-20))
- {
- setPixel(posx, posy, color0, data);
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement