Code archives/Graphics/draw rectangle
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Code for drawing rectangles given point origin and width & height. | |||||
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
| ||
I'm sure you already know about the 'rect' command....I do wonder at the purpose of these posts though... |
| ||
apparently to clog up the code archives with junk. |
Code Archives Forum