Post Reply 
Custom Text Formatting (Previously: Getting long results in a program)
04-13-2024, 05:58 AM (This post was last modified: 04-13-2024 06:16 AM by Tyann.)
Post: #66
RE: Getting long results in Program
Bonjour komame

Très belle optimisation, boucler sur la valeur h est une excellente idée et évite de la modifié et donc d'avoir à la sauvegarder : bravo.
En réfléchissant hier, j'ai moi aussi pensé que le fond d'écran pouvais intervenir dans les couleurs pour la transparence.
J'ai également trouvé une optimisation à faire dans ATEXTOUT_P :
après le test if d<8 then, pour ajouter le paramètre de largeur manquant, nous pouvons économiser l'appel à ATEXTSIZE et mettre la largeur maxi, car ensuite dans atextout refait la vérification pour voir si celle ci ne dépassent pas la largeur du texte.
Le code devient donc :

Hello komame

Very nice optimisation, looping on the h value is an excellent idea and avoids modifying it and therefore having to save it: well done.
When I was thinking about it yesterday, I also thought that the screen background could be involved in the colours for transparency.
I also found an optimisation to do in ATEXTOUT_P :
after the if d<8 then test, to add the missing width parameter, we can save the call to ATEXTSIZE and set the max width, because then atextout redoes the check to see if it doesn't exceed the width of the text.
The code therefore becomes :
Code:
 IF d<8 THEN
    l(0):=320;
   END;
Concernant la transparence j'ai réfléchi à définir celle ci comme attribut, car comme paramètre il faut revoir ATEXTOUT_P avec 10 paramètres au lieu de 9, puis ensuite atextout, cela me semble compliqué ?
Par contre dans le cas d'un attribut les modifications sont minimes, mais il faut une valeur :
on peut imaginer une valeur fixe ou une variable ou une fonction style SETTRANSP ?
Qu'en pensez-vous ?

Concerning transparency, I've thought about defining it as an attribute, because as a parameter you have to revise ATEXTOUT_P with 10 parameters instead of 9, then atextout, which seems complicated to me?
On the other hand, in the case of an attribute, the changes are minimal, but you need a value:
Can we imagine a fixed value or a variable or a SETTRANSP-style function?
What are your thoughts on this?

EDIT :
Une idée de dernière minute pour la transparence, si nous copions 2 fois le buffer vers Gx avec 2 couleurs différentes pour c,alpha , mettant noir et blanc !
la première fois les pixels noirs ne sont pas copié, mais ils le sont la seconde fois
?
A last minute idea for transparency, if we copy the buffer to Gx 2 times with 2 different colours for c,alpha , putting black and white!
the first time the black pixels are not copied, but they are the second time
?
Translated with DeepL.com (free version)

Sorry for my english
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Getting long results in Program - Tyann - 04-13-2024 05:58 AM
RE: Custom Text Formatting - Tyann - 04-15-2024, 06:55 PM
RE: Custom Text Formatting - komame - 04-15-2024, 07:42 PM
RE: Custom Text Formatting - Tyann - 04-16-2024, 04:38 AM
RE: Custom Text Formatting - komame - 04-16-2024, 06:02 AM



User(s) browsing this thread: