Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print + scroll text big to an image (is there a better way?)
#12
That's a great way Bplus! Here is a little scrolling mod I just made using the Mouse Wheel, although I think you have done this before. This also centers the Hello on the screen pretty good. 


Code: (Select All)

'Bplus Font Resize - Scrolling Mod by SierraKen
Screen _NewImage(800, 600, 32): _ScreenMove 250, 60
s$ = "Hello"
ls = Len(s$)
size = 1
Do
    _Limit 40
    While _MouseInput
        If _MouseWheel = -1 Then Cls: size = size + 1
        If _MouseWheel = 1 Then Cls: size = size - 1
    Wend
    If size < 1 Then size = 70
    If size > 70 Then size = 1
    Text ((800 - ls * _FontWidth) / 2) - (size * 20), ((600 - _FontHeight) / 2) - (size * 8), size * _FontHeight, &HFFFF0000, s$
Loop Until InKey$ = Chr$(27)
End

Sub Text (x, y, textHeight, K As _Unsigned Long, txt$)
    Dim fg As _Unsigned Long, bg As _Unsigned Long, cur&, i&
    fg = _DefaultColor: bg = _BackgroundColor: cur& = _Dest
    i& = _NewImage(8 * Len(txt$), 16, 32)
    _Dest i&: Color K, _RGBA32(0, 0, 0, 0): _PrintString (0, 0), txt$
    _PutImage (x, y)-Step(Len(txt$) * textHeight / 2, textHeight), i&, cur&
    Color fg, bg: _FreeImage i&: _Dest cur&
End Sub
Reply


Messages In This Thread
RE: print + scroll text big to an image (is there a better way?) - by SierraKen - 03-25-2025, 11:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  3D Text SMcNeill 13 701 02-10-2026, 08:17 AM
Last Post: Unseen Machine
  Screw Peek-a-boo. Write on a hardware image form. Pete 0 446 04-08-2025, 11:28 PM
Last Post: Pete
  ImageGrid (combine multiple image files into one giant poster) madscijr 2 733 12-17-2024, 03:59 AM
Last Post: madscijr
  Text Previewer (windows only) SMcNeill 14 2,381 03-25-2024, 02:34 PM
Last Post: SMcNeill
  Minimal Text Animator James D Jarvis 5 1,091 09-16-2022, 07:12 PM
Last Post: James D Jarvis

Forum Jump:


Users browsing this thread: 1 Guest(s)