General Category > Programming

Transparency in BASIC

(1/2) > >>

IndyUK:
Hi

When using transparency mode in BASIC, does it not work when in TAG mode? I've attached a small test program which demostrates what I mean.


--- Code: ---10 MODE 1
20 PRINT CHR$(22)+CHR$(1):REM Trans on
30 LOCATE 10,20:PEN 3:PRINT CHR$(143)
40 LOCATE 10,20:PEN 2:PRINT CHR$(238)
50 PRINT CHR$(22)+CHR$(0);:REM Trans off
60 TAG:REM Transparency not working with TAG mode on
70 PRINT CHR$(22)+CHR$(1);:REM Trans on
80 MOVE 100,150:PRINT CHR$(143);
90 MOVE 100,150:PRINT CHR$(238);
100 PRINT CHR$(22)+CHR$(0);:REM Trans off       
110 TAGOFF
--- End code ---

Am I doing something wrong?

Thanks

eto:
With TAG you are switching to graphics mode. You have to select the graphics ink mode to OR.


--- Code: ---PRINT CHR$(23);CHR$(3)
--- End code ---

Also if you want to change the pen, you have to select the graphics pen and no longer the text pen.


IndyUK:


--- Quote from: eto on 13:32, 02 December 21 ---PRINT CHR$(23);CHR$(3)
--- End quote ---

Hi

Tried that but still didn't work. BTW, I'm using 464 model, so could what you suggested be for 664/6128 only?

Also, what is the BASIC command for setting the graphics pen?

Thanks

eto:

--- Quote from: IndyUK on 14:14, 02 December 21 ---Hi

Tried that but still didn't work. BTW, I'm using 464 model, so could what you suggested be for 664/6128 only?

Also, what is the BASIC command for setting the graphics pen?

Thanks

--- End quote ---


Afaik this works for both models, as long as you are using the Escape codes.
Can you try this?


--- Code: ---10 CLS
20 PRINT CHR$(23);CHR$(3):rem before TAG
30 TAG
40 MOVE 100,100,2:PRINT "X";
50 MOVE 100,100,3:PRINT "O";

--- End code ---


IndyUK:

--- Quote from: IndyUK on 14:14, 02 December 21 ---10 CLS 20 PRINT CHR$(23);CHR$(3):rem before TAG 30 TAG 40 MOVE 100,100,2:PRINT "X"; 50 MOVE 100,100,3:PRINT "O";
--- End quote ---

Kind of worked. The transparency worked - Thanks! But the pen colour did not as the MOVE command does not have a 3rd parameter. According to the CPC464 manual it only has two - X and Y.

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Reactions Mod
Powered by SMFPacks Alerts Pro Mod
Powered by SMFPacks Mentions Pro Mod