Is DrawImageRect broken?

BlitzMax Forums/BlitzMax Beginners Area/Is DrawImageRect broken?

(tu) ENAY(Posted 2005) [#1]
After just converting some code from bb to bmax I've come across a problem with DrawImageRect whereby there are too few parameters meaning that it's impossible to use the command properly.

In Bmax there doesn't seem to be anyway to position the draw location of the rect you're drawing in? I don't understand :(

Here are both command sets:-

BB = DrawImageRect(image, x, y, posx, posy, width, height, frame)

BMAX = DrawImageRect(image, x, y, width, height, frame)

Checking the docs explains nothing. Any ideas?


tonyg(Posted 2005) [#2]
They are not the same command.
Drawimagerect in BMax will draw the entire image in the area you specify and *not* draw a rectangular portion of the image.
There are some functions in code archives which reproduce BB drawimagerect behaviour..
drawimageblock
drawimagerect
setviewport
Be aware that Bmax code changes mean you'll probably have to alter the code a bit.


LeisureSuitLurie(Posted 2005) [#3]
Yeah. I had a similar problem and had to use setviewport to hack it out.