DrawRect Replacement
BlitzMax Forums/BlitzMax Beginners Area/DrawRect Replacement| 
 | ||
| Has anyone got a function that replaces DrawRect with an option to have the rect solid or not? | 
| 
 | ||
| Something like: Function DrawRect2(x:int,y:int,w:int,h:int,filled:byte = true)
  Select filled
    Case False
      DrawLine x,y,x+w,y
      DrawLine x+w,y,x+w,y+h
      DrawLine x+w,y+h,x,y+h
      DrawLine x,y+h,x,y
    Case True
      DrawRect x,y,w,h
  End Select
End Function | 
| 
 | ||
| That does just the job, thanks Gfk. | 
| 
 | ||
| I typed it straight into the reply box so it might not work right with scaling/rotation, but I guess you'll be able to iron out the wrinkles as you find them. | 
| 
 | ||
| ... and  this  might help. |