Rect function
Blitz3D Forums/Blitz3D Beginners Area/Rect function
| ||
Is there anywhere you can see how the rect function code looks like or is it hardcoded in another language mabye? I want to fill and rotate a couple of areas as fast as possible and thougt I could start of with rect and modify it a little bit. |
| ||
if that fit what you expect, use 3d accelerated ( with mesh/sprite or want you prefer, then "filling rect" will be as simple as ColorEntity(quad,r,g,b) or BrushColor or the way you want it to be painted )else you can try FastImage that performs the same stuff as Blitzmax does. |
| ||
I want to do it in 2d at first to get the basics going. Fastimage? |
| ||
Function fillRect(startx,starty,width,height,r,g,b) color r,g,b for a=0 to width-1 for b = 0 to height-1 plot startx+a,starty+b next next return end function That should work. |
| ||
That function won't work for rotated rects. I'd give fast image a look. I'm sure you can download as demo. |
| ||
I just looked at it briefly but doesn´t fast image require a 3d window? |
| ||
Yessah, 3D accelerated 2d = much faster = better, plus you get awesome entity controls =D |
| ||
Is there anywhere you can see how the rect function code looks like or is it hardcoded in another language mabye? I want to fill and rotate a couple of areas as fast as possible and thougt I could start of with rect and modify it a little bit. I say this from experience: Go with 3D accelerated 2D. It's faster, like B-labs said, and it's also much less painful. ;) |