Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BAM: Thinking about adding a SCROLL statement
#2
That's an interesting idea. In the case of such a command with QB64, I would suggest two more parameters at the end: Source and target screen. This can be done very easily with _PutImage.

Something as this, maybe:

Code: (Select All)

image& = _NewImage(400, 400, 256)
_Dest image&
Cls , 140
_PrintString (200 - 64, 200 - 8), "12345678"
_Dest 0

Screen _NewImage(1024, 768, 32)
Do
    k& = _KeyHit
    Select Case k&
        Case 18432: Yp = Yp + 10
        Case 20480: Yp = Yp - 10
        Case 19200: Xp = Xp + 10
        Case 19712: Xp = Xp - 10
    End Select
    Line (311, 153)-(713, 555), _RGB32(255), BF
    SCROLL 312, 154, 712, 554, Xp, Yp, image&, _Dest
    _Display
    _KeyClear
    _Limit 20
Loop

Sub SCROLL (x1%, y1%, x2%, y2%, h%, v%, s&, d&)
    Wi% = _Width(s&)
    He% = _Height(s&)
    _PutImage (x1%, y1%)-(x2%, y2%), s&, d&, (h%, v%)
End Sub


Reply


Messages In This Thread
RE: BAM: Thinking about adding a SCROLL statement - by Petr - 06-25-2023, 03:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  BAM Draw CharlieJV 9 2,053 11-07-2023, 10:27 PM
Last Post: James D Jarvis
  BAM: New version CharlieJV 0 505 06-29-2023, 02:22 AM
Last Post: CharlieJV
  BAM: SCROLL statement "super-test" CharlieJV 5 1,282 06-27-2023, 10:16 PM
Last Post: CharlieJV
  BAM and the CIRCLE statement CharlieJV 4 1,361 06-12-2023, 11:41 AM
Last Post: CharlieJV
  BAM App Personalizer (a GUI to personalize BAM programs) CharlieJV 0 496 01-06-2023, 03:48 AM
Last Post: CharlieJV

Forum Jump:


Users browsing this thread: 1 Guest(s)