Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hardware images...Talk to me!
#6
Hi Unseen Machine
a hardware image demo


[Image: image-2025-09-23-010636756.png]

and here the code

Code: (Select All)
DefLng L
DefInt I
Screen _NewImage(800, 600, 32)
_Title " Demo Hardware images:please move mouse, scroll mousewheel, left mousebutton or enter to quit"
L = _NewImage(12, 16, 32)
lWhite = _RGBA32(255, 255, 255, 0)
lBlack = _RGBA32(0, 0, 0, 255)
_Dest L
Color lWhite, lBlack
_PrintString (1, 1), "A"
l2 = _CopyImage(L, 33)
_Dest 0
_FreeImage L
For icount = 1 To 150
    Line (Rnd * 800, Rnd * 600)-(Rnd * 800, Rnd * 600), _RGBA32(Rnd * 255, Rnd * 255, Rnd * 255, 255), BF
Next icount
iK = 1
Do
    _Limit 30
    i2 = _KeyHit
    If _MouseInput Then
        iMx = _MouseX
        iMy = _MouseY
    End If
    If _MouseButton(1) Then i2 = 13
    If _MouseWheel > 0 Then
        If iK < 10 Then iK = iK + 2
    ElseIf _MouseWheel < 0 Then
        If iK > 1 Then iK = iK - 2
    End If
    _PutImage (iMx, iMy)-Step(12 * iK, 16 * iK), l2, 0
Loop Until i2 = 13
_FreeImage l2
End

You can enjoy about mouse buffer that emulates a history movement of mouse's cursor.
Reply


Messages In This Thread
Hardware images...Talk to me! - by Unseen Machine - 09-14-2025, 04:48 AM
RE: Hardware images...Talk to me! - by bplus - 09-14-2025, 06:06 AM
RE: Hardware images...Talk to me! - by Pete - 09-15-2025, 08:05 AM
RE: Hardware images...Talk to me! - by SMcNeill - 09-15-2025, 10:56 AM
RE: Hardware images...Talk to me! - by TempodiBasic - 09-22-2025, 11:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  about Hardware Images and _DisplayOrder,Help! qbfans 11 574 02-11-2026, 07:10 AM
Last Post: SMcNeill
  Nth problem with hardware images Ikerkaz 9 503 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 477 12-04-2025, 04:18 PM
Last Post: Pete
  Transparency with Hardware Images NakedApe 8 1,038 07-10-2025, 09:47 AM
Last Post: Pete
  How does QB64 support saving 8bit images? CMR 4 797 04-27-2025, 04:46 PM
Last Post: CMR

Forum Jump:


Users browsing this thread: 1 Guest(s)