Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print + scroll text big to an image (is there a better way?)
#11
Hello in red on white at 12X's height in the middle of the screen:
Code: (Select All)
Screen _NewImage(800, 600, 32): _ScreenMove 250, 60
s$ = " Hello "
ls = Len(s$)
mult = 12
Text (800 - ls * _FontWidth * mult) / 2, (600 - _FontHeight * mult) / 2, mult * _FontHeight, &HFFFF0000, &HFFFFFFFF, s$


Sub Text (x, y, textHeight, fore As _Unsigned Long, back 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 fore, back: _PrintString (0, 0), txt$
    _PutImage (x, y)-Step(Len(txt$) * textHeight / 2, textHeight), i&, cur&
    Color fg, bg: _FreeImage i&: _Dest cur&
End Sub
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


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

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

Forum Jump:


Users browsing this thread: 1 Guest(s)