the '..' are line continuation if you haven't guessed yet.
Anyway, this seems to do the job using standard Bmax commands :
Anyway, this seems to do the job using standard Bmax commands :
Function Drawrect1( x:Float, y:Float, w:Float,h:Float, fill:Int=True) Local origin_x:Float Local origin_y:Float GetOrigin origin_x,origin_y Local handle_x:Float Local handle_y:Float GetHandle handle_x,handle_y Local xy:Float[]=[x,y,x+w,y,x+w,y+h,x,y+h] If fill DrawPoly xy Else Local x1:Float=xy[xy.Length-2] Local y1:Float=xy[xy.Length-1] For Local i:Int=0 Until Len xy Step 2 Local x2:Float=xy[i] Local y2:Float=xy[i+1] DrawLine (handle_x + x1 , handle_y + y1 , handle_x + x2 , handle_y + y2) x1=x2 y1=y2 Next EndIf End Function Graphics 800 , 600 drawrect1(100 , 100 , 100 , 100) drawrect1(10,10,110,110,False) Flip WaitKey()