Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QuadDraw revisited - drawing program work in progress
#13
Aha! Revised Text Sub kicks butt with clean graphics fonts at a range of sizes!

Code: (Select All)
Sub Text (x, y, textHeight, K As _Unsigned Long, txt$)
    Static beenHere, fontHandle&(6 To 64)
    If beenHere = 0 Then
        For i = 6 To 64
            'fontHandle&(i) = _LoadFont("arial.ttf", i )
            fontHandle&(i) = _LoadFont("ARLRDBD.ttf", i)
        Next
        beenHere = -1
    End If
    th = textHeight - 4 ' <<< this is needed to fix Dav's menu
    _Font fontHandle&(th)
    Dim As _Unsigned Long fg, bg
    fg = _DefaultColor
    bg = _BackgroundColor
    Color K, _RGB32(0, 0, 0, 0)
    _PrintString (x, y), txt$
    Color fg, bg
End Sub


You will have to adjust the sizes and x, y 's for better fitting screening of data but this sub is fast enough to update with each drawing loop! You will also have to include font(s) files for non Windows users.

    Clean and fast!
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
RE: QuadDraw revisited - drawing program work in progress - by bplus - 05-31-2022, 08:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  My ascii Map Maker... in progress / lots of work to do. pmackay 5 669 08-24-2025, 08:17 PM
Last Post: Unseen Machine
  Digit II level editor in progress pmackay 0 333 07-19-2025, 04:03 AM
Last Post: pmackay
  Everything Date Library in progress SMcNeill 2 713 05-14-2025, 08:36 PM
Last Post: SMcNeill
  SaveImage Library 3.0 (in progress) SMcNeill 5 1,250 06-22-2024, 03:23 PM
Last Post: bplus
  RotoLine line drawing James D Jarvis 0 517 10-11-2023, 04:24 PM
Last Post: James D Jarvis

Forum Jump:


Users browsing this thread: 1 Guest(s)