Bitte ändert euer Passwort!

Im März 2026 wurde das Forum gehackt. Dabei hatten die Angreifer Zugriff auf die Datenbank und somit Zugriff auf eure Passwörter. Auch wenn das Forum kein Passwort im Klartext speichert, können die Angreifer eure Passwörter knacken. Bitte ändert daher dringend euer Passwort für das Forum. Solltet ihr das gleiche Passwort auch an anderer Stelle verwenden, ändert es bitte unbedingt an allen Stellen!

Drawing rotated strings in a lua app tele window

  • davidmcq137
  • Autor
  • Offline
  • Senior Mitglied
  • Senior Mitglied
  • Beiträge: 79
  • Thanks: 87

Drawing rotated strings in a lua app tele window

08 Feb. 2023 23:12 - 08 Feb. 2023 23:13
#
Hi all,
For a project I am working on now, I needed to draw some rotated character strings .. in my case only numbers. I looked around for some good single line fonts and found an interesting website that had a nice simple font. It's an old-school-looking font. Links are in the app source file.

I was a little concerned about CPU usage, and it turns out if you draw it with the anti-alias rendering API it consumes about 2% of CPU per character drawn, which is manageable in my case.

You can find the code and a test app on my github page: github.com/davidmcq137/JetiLuaDFM/blob/0.../misclua/hp1345a.lua

I hope this is of some use to other lua app developers.

Dave
Letzte Änderung: 08 Feb. 2023 23:13 von davidmcq137.
Folgende Benutzer bedankten sich: WalterL, IG-Modellbau, frank.kleiner@gmx.net

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • IG-Modellbau
  • Offline
  • Moderator
  • Moderator
  • Beiträge: 3779
  • Thanks: 2809

Re: Drawing rotated strings in a lua app tele window

09 Feb. 2023 08:52
#
Hi Dave,
that's extrem nice!
Thank you for sharing this.

Ingmar

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • davidmcq137
  • Autor
  • Offline
  • Senior Mitglied
  • Senior Mitglied
  • Beiträge: 79
  • Thanks: 87

Re: Drawing rotated strings in a lua app tele window

10 Feb. 2023 19:47
#
Sometimes when we are coding, we laugh out loud at dumb things we do (well, at least I do!)

First time I went to use this I realized I forgot to include the minus sign, so I could not do negative numbers...
Here is an update: github.com/davidmcq137/JetiLuaDFM/blob/1.../misclua/hp1345a.lua

The project I am working on is an instrument panel generator with a number of different gauges and widgets that are drawn with a drag and drop interface on a website .. then downloaded with a companion lua app to the TX. It uses the same pilot-specific data download idea as my maps app.

Here is the example panel that was driving this "characters on an angle" work. Soon I will be asking if anyone is interested in beta testing.
Folgende Benutzer bedankten sich: sunbeam, WalterL, IG-Modellbau, frank.kleiner@gmx.net

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.483 Sekunden
Powered by Kunena Forum