[bb] draw rectangle by stanrol [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:43

Previous topic - Next topic

BlitzBot

Title : draw rectangle
Author : stanrol
Posted : 1+ years ago

Description : Code for drawing rectangles given point origin and width & height.

Code :
Code (blitzbasic) Select
Function rec(x,y,w,h)
Line x,y,x+w,y
Line x+w,y,x+w,y+h
Line x+w,y+h,x,y+h
Line x,y+h,x,y
Return Abs(w*h)
End Function
Graphics 800,600,0,2
Text 1,5,"Hi there this draws a rectangle"
Color 22,220,79
AppTitle "area is "+Rec(1,1,200,300)
WaitKey


Comments :


Matty(Posted 1+ years ago)

 I'm sure you already know about the 'rect' command....I do wonder at the purpose of these posts though...


GW(Posted 1+ years ago)

 apparently to clog up the code archives with junk.