Extension to the TEXTOUT_P function for displaying text with various attributes (bold, underlined, etc. ....) and using a transparency level.
The attached archive contains the hppgm file and detailed instructions in PDF format in English and French.
Extension de la fonction TEXTOUT_P permettant d'afficher du texte avec divers attributs (gras, sous ligné, etc ....) et d'utiliser un niveau de transparence.
Vous trouverez dans l'archive jointe le fichier hppgm et un mode d'emploi détaillé au format PDF en anglais et en français.
Tyann et Komame.
Bonjour
Voici une petite démo de ce que l'on peut obtenir.
Hello
Here's a quick demo of what you can achieve.
[
attachment=13517]
Here's a small demonstration of text overlay capabilities during background animation.
[
attachment=13524]
To run this program, the library from the first post is required.
Bonjour komame
Très belle démo, par contre le programme renvoie une erreur (testé sur l'émulateur) : il manque un 'h' sur le #FFFFFF du premier ATEXTOUT_P.
Je me disais aussi que nous avons oublié quelque chose pour la compatibilité avec TEXTOUT_P :
atextout ne renvoie pas de valeur 'X' .
Hello komame
Very nice demo, but the program returns an error (tested on the emulator): the #FFFFFF in the first ATEXTOUT_P is missing an 'h'.
I also thought we'd forgotten something about TEXTOUT_P compatibility:
atextout doesn't return an 'X' value.
(05-08-2024 05:21 AM)Tyann Wrote: [ -> ]Hello komame
Very nice demo, but the program returns an error (tested on the emulator): the #FFFFFF in the first ATEXTOUT_P is missing an 'h'.
I also thought we'd forgotten something about TEXTOUT_P compatibility:
atextout doesn't return an 'X' value.
Hi Tyann,
Thank you for noticing that error. With default settings, the absence of "h" doesn't signal an error, and the program works correctly, so the error would only appear if someone has changed the settings in HOME => Settings, which is why it slipped my attention (because I still have the default settings). In situations where the program uses binary integers, we need to insert the pragma in the program header:
Code:
#pragma mode( separator(.,;) integer(h32) )
and then the "h" at the end of the number becomes optional. The attachment has already been corrected.
Regarding the return of the position of the next character (i.e., what is returned by TEXTOUT_P), here it conflicts with the "frame" format because it excludes the continuation of text in the standard way. To continue the text using the "frame" format, the text needs to be pushed further away so that the next character doesn't overlap with the frame of the previous text. This one format somewhat complicates the implementation of this task.
Nous avons la longueur du texte grâce à ATEXTSIZE qui tiens compte des attributs, notamment de l'italique.
Si nous renvoyons x + longueur du texte fournie par ATEXTSIZE? cela ne suffit-il pas ?
We have the length of the text thanks to ATEXTSIZE, which takes into account attributes such as italics.
If we return x + text length supplied by ATEXTSIZE? isn't that enough?
(05-08-2024 08:31 AM)Tyann Wrote: [ -> ]We have the length of the text thanks to ATEXTSIZE, which takes into account attributes such as italics.
If we return x + text length supplied by ATEXTSIZE? isn't that enough?
Hi Tyann,
Could you update the file I sent you?
Bonjour
Voici une nouvelle version ATEXTOUT_P avec quelques modifications, il y a maintenant une version de la documentation en Espagnol et en Allemand, ainsi qu'un écran et un programme de démonstration.
Tyann et Komame.
Hello
Here is a new version of ATEXTOUT_P with a few changes, there is now a version of the documentation in Spanish and German, as well as a screen and a demonstration program.
Tyann and Komame.
[
attachment=13543]
This is a new version (v1.03) with fixes regarding increased compatibility with TEXTOUT_P (in terms of maximum text length) as well as minor optimizations.
Documentation has also been added in Dutch (NLD), Portuguese (POR), and Simplified Chinese (ZHS).
EDIT (May 17, 2024):
The documentation has been additionally provided in Japanese (JPN).