Is there a bug with drawing text to images in B+?

BlitzPlus Forums/BlitzPlus Programming/Is there a bug with drawing text to images in B+?

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.

Aaand... now there's no way to get the width and height of the current graphics buffer, so I can't make a generalized function for drawing a multiply blended rectangle to the current buffer.

; -----------------------------------------------------------------------------------------------------------------------------------
; This function draws a rectangle of the specified color using multiply blending to the current buffer.
; -----------------------------------------------------------------------------------------------------------------------------------
Function Draw_Rect(X1, Y1, X2, Y2, ColorR, ColorG, ColorB)

	Local LoopX, LoopY

	DestBuffer = GraphicsBuffer()
	
 
			
	LockBuffer(DestBuffer)
	For LoopY = Y1 To Y2
		For LoopX = X1 To X2

			RGB = ReadPixelFast(LoopX, LoopY, DestBuffer) 
		
			R = (RGB Shr 16) And 255 
			G = (RGB Shr 8 ) And 255
			B = (RGB       ) And 255
			
			R = R * (ColorR / 255.0)
			G = G * (ColorG / 255.0)
			B = B * (ColorB / 255.0)
			
			RGB = (R Shl 16) Or (G Shl 8) Or B
				
			WritePixelFast LoopX, LoopY, RGB, DestBuffer 
		
		Next
	Next
	UnlockBuffer(DestBuffer)

End Function

Blitzplus, why do you hate me so?


Ps:
the reason I need to know the width is so that I can automatically clip the rectangle to the edges of the image... Otherwise Blitz will crash if I specify a rectangle which is too large.