Post Reply 
Custom Text Formatting (Previously: Getting long results in a program)
04-13-2024, 07:26 PM
Post: #73
RE: Getting long results in Program
(04-13-2024 06:18 PM)Tyann Wrote:  Yes, I too wanted to clarify things.
So if we agree that ATEXTOUT replaces TEXTOUT in a program, we agree that ATEXTOUT cannot have 10 fixed parameters with default values, but must have a number of variable parameters.

I completely agree with you. ATEXTOUT_P cannot have a fixed number of parameters, and I never suggested such a thing. The only place where I wanted to use a fixed number of parameters is in the "atextout" function (the internal one that is called by ATEXTOUT_P), because it currently takes a list, and I think I can optimize the solution much more if it takes a fixed number of parameters. Throughout our discussion, I've always had "atextout" (written in lowercase) in mind; I never meant ATEXTOUT_P.

(04-13-2024 06:18 PM)Tyann Wrote:  I'm thinking of using the {c,alpha} syntax on the 'c' text colour parameter for transparency, but I know you don't like that too much.

As for the text color format {c,alpha}, it indeed can contain two different alpha values, so I believe that if part "c" has its own transparency value, and additionally, a second transparency value is defined in the second element of the list, PPL should report an "Invalid input" error, but it doesn't do that. But that's the only thing I have concerns about. In practice, I also use this color format and I'm not opposed to it.

When it comes to your proposal of {c,alpha}, one would have to ask here, what if for "c" (text color) we define the color {255,128} and for "f" (background color) we define the color {128,64} - meaning different transparencies? Would there then be separate transparency for the text and separate for the background? This seems very difficult to achieve, or at least it's not possible using a single buffer. On the other hand, if you assume that the transparency of the text color affects the transparency of the background, you might as well say that the transparency of the background should affect the transparency of the text, right? To avoid such dilemmas, I had the idea of using a 10th parameter, where only the transparency value is passed (without color, similar to how it works in the case of BLIT_P). Then everything is clear, and no one will ask additional questions.

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Getting long results in Program - komame - 04-13-2024 07:26 PM
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: 64 Guest(s)