Post Reply 
Custom Text Formatting (Previously: Getting long results in a program)
04-15-2024, 07:42 PM
Post: #84
RE: Custom Text Formatting
(04-15-2024 06:55 PM)Tyann Wrote:  Do you know the formula for extracting the alpha value from a value returned by an extended RGB?

The formula is:
BITSR(color,24)

(04-15-2024 06:55 PM)Tyann Wrote:  So now you have to rewrite ATEXTOUT_P with a maximum of 9 parameters, Ha I'm going to end up going goat .

ATEXTOUT_P for 9 parameters looks very similar:
Code:
EXPORT ATEXTOUT_P(...l)
BEGIN
 LOCAL d:=SIZE(l);
 IF TYPE(l(2))≠8 THEN 
  l(−2):=G0;
  d:=d+1;
 END;
 IF 2<d<7 THEN
  LOCAL f:=STRING(l);
  RETURN EXPR("TEXTOUT_P("+SUPPRESS(f,{1,DIM(f)}));
 END;
 IF d<9 THEN
  l:=CONCAT(l,SUB({320,−1},d-6,2));
 ELSE
  IF d>9 THEN Err(0); END;
  IF l(9)<0 THEN Err(2); END;
 END;
 l;
 atextout(l(1),l(2),l(3),l(4),l(5),l(6),l(7),l(8),l(9));
END;

I understand your frustration with the constant changes. In this situation, maybe let's stick with 10 parameters and one common transparency coefficient to avoid further complicating things.

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


Messages In This Thread
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: 39 Guest(s)