Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void drawrectangle(int row,int col, int width, int height, unsigned short color)
- {
- int r,c;
- for(r=0;r<height;r++)
- {
- for(c=0;c<width;c++)
- {
- setpixel(row+r,col+c,color);
- }
- }
- }
- //it is working above
- void drawrectangle(int row,int col, int width, int height, unsigned short color)
- {
- for(row;row<(height+row);row++)
- {
- for(col;c<(width+col);col++)
- {
- setpixel(row,col,color);
- }
- }
- }
- //it is working, but the result is not what I expected..
Add Comment
Please, Sign In to add comment