Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text Effects 2
#4
Code: (Select All)

handle& = _NewImage(1020, 600, 32)
Screen handle&
Dim Shared Lw, Lh As Integer
Lw = 8: Lh = 16
Dim Shared Letter(255, Lw, Lh) As Integer
Dim Shared Letter2(255, Lw * 2 + 1, Lh * 2 + 1) As Integer
Cls , _RGB(0, 0, 0)
Color _RGB(1, 1, 1), _RGB(0, 0, 0)
For ch = 1 To 255 '----------LOAD CHARACTERS TO ARRAY
    _PrintString (0, 0), Chr$(ch)
    For i = 1 To Lw
        For k = 1 To Lh
            Letter(ch, i, k) = 0
            If Point(i - 1, k - 1) = _RGB(1, 1, 1) Then
                Letter(ch, i, k) = 1
                Letter2(ch, i * 2, k * 2) = 1: Letter2(ch, i * 2 + 1, k * 2) = 1: Letter2(ch, i * 2, k * 2 + 1) = 1: Letter2(ch, i * 2 + 1, k * 2 + 1) = 1
            End If
        Next k
    Next i
Next ch

Cls , _RGB(0, 0, 0)
printstring3 "What is QB64?", 10, 80, 3, -2, 4
printstring3 "QB64 is a BASIC compatible Editor and C++ emitter that creates", 2, 140, 2, -4, 1
printstring3 "working Executable files from QBasic BAS files that can be run", 2, 170, 2, -4, 1
printstring3 "on 32 or 64 bit PC's using Windows (XP to 10), Linux or macOS.", 2, 200, 2, -4, 1

For ch = 1 To 255
    For i = 1 To Lw * 2
        For k = 1 To Lh * 2
            If i > 1 And k > 1 And Letter2(ch, i, k) = 1 And Letter2(ch, i - 1, k) = 0 And Letter2(ch, i, k - 1) = 0 Then Letter2(ch, i, k) = 2 'LEFT UP
            If i > 1 And k < Lh * 2 And Letter2(ch, i, k) = 1 And Letter2(ch, i - 1, k) = 0 And Letter2(ch, i, k + 1) = 0 Then Letter2(ch, i, k) = 3 'LEFT DOWN
            If i < Lw * 2 And k > 1 And Letter2(ch, i, k) = 1 And Letter2(ch, i + 1, k) = 0 And Letter2(ch, i, k - 1) = 0 Then Letter2(ch, i, k) = 4 'RIGHT UP
            If i < Lw * 2 And k < Lh * 2 And Letter2(ch, i, k) = 1 And Letter2(ch, i + 1, k) = 0 And Letter2(ch, i, k + 1) = 0 Then Letter2(ch, i, k) = 5 'RIGHT DOWN
        Next k
    Next i
Next ch
For ch = 1 To 255
    For i = 1 To Lw * 2
        For k = 1 To Lh * 2
            If i > 1 And k > 1 And Letter2(ch, i, k) = 0 And Letter2(ch, i - 1, k) = 1 And Letter2(ch, i, k - 1) = 1 Then Letter2(ch, i, k) = 7 'LEFT UP
            If i > 1 And k < Lh * 2 And Letter2(ch, i, k) = 0 And Letter2(ch, i - 1, k) = 1 And Letter2(ch, i, k + 1) = 1 Then Letter2(ch, i, k) = 7 'LEFT DOWN
            If i < Lw * 2 And k > 1 And Letter2(ch, i, k) = 0 And Letter2(ch, i + 1, k) = 1 And Letter2(ch, i, k - 1) = 1 Then Letter2(ch, i, k) = 7 'RIGHT UP
            If i < Lw * 2 And k < Lh * 2 And Letter2(ch, i, k) = 0 And Letter2(ch, i + 1, k) = 1 And Letter2(ch, i, k + 1) = 1 Then Letter2(ch, i, k) = 7 'RIGHT DOWN
        Next k
    Next i
Next ch

printstring3 "What is QB64? - smooth EFFECT", 10, 280, 3, -4, 4
printstring3 "QB64 is a BASIC compatible Editor and C++ emitter that creates", 2, 340, 2, -4, 1
printstring3 "working Executable files from QBasic BAS files that can be run", 2, 370, 2, -4, 1
printstring3 "on 32 or 64 bit PC's using Windows (XP to 10), Linux or macOS.", 2, 400, 2, -4, 1

End

Sub printstring3 (word$, wleft, wtop, wsize, wstyle, wcolor)
    If wcolor = 4 Then color1& = _RGB(200, 200, 0): color1b& = _RGBA(200, 200, 0, 200)
    If wcolor = 1 Then color1& = _RGB(200, 200, 200): color1b& = _RGBA(200, 200, 200, 200)

    For wl = 1 To Len(word$)
        wl1 = Asc(Mid$(word$, wl, 1))
        For i = 1 To Lw * 2
            For k = 1 To Lh * 2
                If Letter2(wl1, i, k) = 1 Then PSet (wleft + wl * Lw * 2 + i, wtop + k), color1&
                If Letter2(wl1, i, k) = 7 Then PSet (wleft + wl * Lw * 2 + i, wtop + k), color1b&


            Next k
        Next i
    Next wl

End Sub
Reply


Messages In This Thread
Text Effects 2 - by 2112 - 10-29-2025, 06:12 PM
RE: Text Effects 2 - by hsiangch_ong - 10-29-2025, 06:52 PM
RE: Text Effects 2 - by Unseen Machine - 10-29-2025, 11:31 PM
RE: Text Effects 2 - smooth edges (size 2 only) - by 2112 - 10-30-2025, 10:03 PM
RE: Text Effects 2 - by NakedApe - 10-30-2025, 10:39 PM
RE: Text Effects 2 - by 2112 - 10-30-2025, 10:50 PM
RE: Text Effects 2 - by Unseen Machine - 10-30-2025, 11:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Text Encryption-Decryption 2112 6 754 10-21-2025, 11:51 AM
Last Post: euklides
  Text Effects, typewriter, glow 2112 3 503 10-19-2025, 05:37 AM
Last Post: hsiangch_ong
  Upside-Down Big Text SierraKen 2 677 02-22-2025, 01:52 AM
Last Post: SierraKen
  Exercise with picture and text Kernelpanic 10 2,349 06-14-2024, 10:00 PM
Last Post: SMcNeill
  Word (text) processor krovit 19 4,437 09-02-2023, 04:38 PM
Last Post: grymmjack

Forum Jump:


Users browsing this thread: 1 Guest(s)