Invalid image rectangle Updating to V73a
Monkey Forums/Monkey Programming/Invalid image rectangle Updating to V73a
| ||
Hi! I have just updated to v73a from v63b, and now I'm getting an "Invalid image rectangle" when building in debug mode. Any idea? DrawImageRect(imagen,X+(tamTileX*x)+j,Y+(tamTileY*y),imgX,imgY,tamTileX+1,tamTileY+1,0) |
| ||
Did you delete your build folder before you build the first time under v73a? |
| ||
Hmm, no. I have deleted the build folder but not at first run. And now, what you suggest? Can I try other version? |
| ||
your image rectangle is out of bounds of the original image. you'll need to do your own cropping. do a quick test: Print imagen.Width()+" "+imagen.Height()+" .. "+(imgX+tamTileX+1)+" "+(imgY+tamTileY+1) there were come changes, but those changes are in v74/75 i think. |
| ||
Ok, I see the problem now. Up to version 66B, Monkey wasn't throwing any errors in debug mode when drawing a rectangle of an image bigger than the image itself. In later versions, the debugger doesn't allow to do that, but running in release mode it works. Now I have added a checking so my program doesn't try to pick a piece of an image wich surpasses the image's limits, and everything seems to run Ok. Thanks! |