Need a test with this...

BlitzMax Forums/BlitzMax Beginners Area/Need a test with this...

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Thanks for the tests !

@seb : its confirms that this code using classic bmax viewport to simulate the blitzbasic drawimagerect doesn't work on old machines. Yes graphics images are include into the exe. i suppose that this function doesn't work too on your old pc :

Function DrawImageRectClip(image:TImage, x#, y#, rx#, ry#, rw#, rh#, frame=0)
	Local vx, vy, vw, vh, hx#, hy#
	
	hx# = image.handle_x
	hy# = image.handle_y
	SetImageHandle image, 0, 0
	GetViewport(vx, vy, vw, vh)
	SetViewport x#, y#, rx# + rw#, ry# + rh#
	
	DrawImage image, x# - rx#, y# - ry#, frame
	
	SetViewport vx, vy, vw, vh
	SetImageHandle image, hx#, hy#
End Function