the new ALPHA_BLEND command

A place to discuss general QL issues.
Post Reply
User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

the new ALPHA_BLEND command

Post by Giorgio Garabello »

.. in the SMSQE version 3.26, how it works?
iv'e not found documentation.... (probably my fault)

Giorgio


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: the new ALPHA_BLEND command

Post by Derek_Stewart »

Giorgio Garabello wrote:.. in the SMSQE version 3.26, how it works?
iv'e not found documentation.... (probably my fault)

Giorgio

Hi Giorgio,

I updated the SMSQ/QDOS Reference Manual, with the information you need, it can be found at:

http://www.wlenerz.com/QLStuff/#qdosms


Regards,

Derek
User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: the new ALPHA_BLEND command

Post by Giorgio Garabello »

thnks!


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: the new ALPHA_BLEND command

Post by dilwyn »

Giorgio Garabello wrote:.. in the SMSQE version 3.26, how it works?
iv'e not found documentation.... (probably my fault)
Giorgio
When I get time I will update the SMSQE/SBASIC manual, as it needs the addition of the Alpha_Blend keyword and Recent thing (time... at least Derek has already managed to update the SMSQE Reference Guide).

Here's a short extract from the current Quanta mag where I described the Alpha_Blend:

Alpha-blending is a method of drawing graphics whereby the resultant output is partly transparent – overlapping shapes and text created with BLOCK, LINE, CIRCLE, PRINT etc. will be see-through to a degree, set by a new command ALPHA_BLEND. This takes a value from 0 (fully transparent) to 255 (opaque), ALPHA_BLEND 128 will make all output half-transparent, for example.
In the past, we have only had the variations offered by the OVER command, now we can achieve some pretty exciting graphical effects for use in games, for example. Here’s a sample screen shot showing the results from Marcel’s short BASIC program which draws three overlapping circles which are half-transparent.
alphablend.png
In the screen shot, the circle is seen beneath, through the ones above, and the text printed is also partly transparent. By varying the ALPHA_BLEND value in line 20 you can see how adjusting the ALPHA_BLEND parameter varies the degree of transparency.
A new trap #3 with D0=$62, d1=alpha weight 0-255, d3.w=timeout and a0=channel ID allows the alpha-blend value to be set from assembler and other languages.


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: the new ALPHA_BLEND command

Post by RWAP »

Now someone just needs to add this to the SBASIC/SuperBASIC Online Manual...


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: the new ALPHA_BLEND command

Post by NormanDunbar »

RWAP wrote:Now someone just needs to add this to the SBASIC/SuperBASIC Online Manual...
As no-one else did, I did!

https://superbasic-manual.readthedocs.i ... lpha-blend

Of course, until I get my finger out and build a easy to use manual updater, I'm pretty much the only one who can update the docs!


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: the new ALPHA_BLEND command

Post by dilwyn »

Thanks Norman, it's been in the SMSQ/E manual since v1.04 too.

For the record, if you discover any further new SBASIC keywords to be added, if I've updated the SMSQ/E manual before it's added to the online reference guide, feel free to copy, or to point out any errors/omissions I may have made!


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: the new ALPHA_BLEND command

Post by NormanDunbar »

Thanks Dilwyn.

And thanks for the original details of the ALPHA_BLEND command. :)


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Post Reply