03-25-2025, 10:44 PM
(03-25-2025, 08:31 PM)madscijr Wrote: Thanks @bplus, i'll give that a look.
Right away I see you are stretching the font with _PutImage, which would save me from having to use an array, but I'm getting an illegal function call.
I'm out of time for today but can keep plugging away on it later.
Thanks for posting that, I'll re-read it later.
Code: (Select All)' display "hello" 2x bigger on screen
Dim img1 As Long
Dim ing2 As Long
Dim in2$
in2$ = "hello"
InitImage img1, _FontWidth * Len(in2$), _FontHeight, _RGB32(0, 0, 0)
InitImage img2, 1024, 768, _RGB32(0, 0, 0)
_Dest img1
Locate 1, 1
Color _RGB32(255, 0, 0), _RGB32(0, 0, 0)
Print "hello"
Screen img2: _ScreenMove 0, 0
_Dest img2
Dim sx1 As Integer, sy1 As Integer, sx2 As Integer, sy2 As Integer
sx1 = 1
sy1 = 1
sx2 = _Width(img1)
sy2 = _Height(img1)
Dim dx1 As Integer, dy1 As Integer, dx2 As Integer, dy2 As Integer
dx1 = 10
dy1 = 20
dx2 = _FontWidth * Len(in2$) * 2
dy2 = _FontHeight * 2
'_PUTIMAGE (dx1, dy1)-(dx2, dy2), sourceHandle&, destHandle&, (sx1, sy1) ' right side of source from top-left corner to destination
'THIS LINE FAILS WITH ILLEGAL FUNCTION CALL ERROR:
_PutImage (dx1, dy1)-(dx2, dy2), img1, img2, (sx1, sy1) '-(sx2, sy2)
Sleep
Screen 0
FreeImage img1
FreeImage img2
' /////////////////////////////////////////////////////////////////////////////
Sub InitImage (ThisImage&, iWidth&, iHeight&, bgColor~&)
FreeImage ThisImage&
ThisImage& = _NewImage(iWidth&, iHeight&, 32)
_Dest ThisImage&: Cls , bgColor~&
End Sub ' InitImage
' /////////////////////////////////////////////////////////////////////////////
Sub FreeImage (ThisImage&)
If ThisImage& < -1 Or ThisImage& > 0 Then _FreeImage ThisImage&
End Sub ' FreeImage
' _PUTIMAGE - QB64 Phoenix Edition Wiki
' https://qb64phoenix.com/qb64wiki/index.php/PUTIMAGE
' _PUTIMAGE (dx1, dy1)-(dx2, dy2), sourceHandle&, destHandle&,(sx1, sy1) 'right side of source from top-left corner to destination
' DAY 009:_PutImage
' https://qb64phoenix.com/forum/showthread.php?pid=9827
Typo on line: Dim ing2 As Long ' you want img2
No more error just a big ole blank screen

But I don't what the hell you are doing with all that other stuff? (very confused emoji here)
b = b + ...