the new ALPHA_BLEND command

A place to discuss general QL issues.
User avatar
Giorgio Garabello
Trump Card
Posts: 234
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, ITaly
Contact:

the new ALPHA_BLEND command

Postby Giorgio Garabello » Thu Jul 14, 2016 10:04 am

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

Giorgio


Derek_Stewart
QL Wafer Drive
Posts: 1137
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: the new ALPHA_BLEND command

Postby Derek_Stewart » Thu Jul 14, 2016 1:21 pm

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
dilwyn
Mr QL
Posts: 1395
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales
Contact:

Re: the new ALPHA_BLEND command

Postby dilwyn » Thu Jul 14, 2016 5:53 pm

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
ALPHA_BLEND demo, listing by Marcel (mk79)
alphablend.png (7.64 KiB) Viewed 1289 times

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.


Dilwyn
All things QL: see www.dilwyn.me.uk
RWAP
RWAP Master
Posts: 2544
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: the new ALPHA_BLEND command

Postby RWAP » Thu Jul 14, 2016 6:34 pm

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


User avatar
NormanDunbar
Super Gold Card
Posts: 578
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: the new ALPHA_BLEND command

Postby NormanDunbar » Thu Nov 29, 2018 12:13 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
dilwyn
Mr QL
Posts: 1395
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales
Contact:

Re: the new ALPHA_BLEND command

Postby dilwyn » Thu Nov 29, 2018 2:57 pm

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!


Dilwyn
All things QL: see www.dilwyn.me.uk
User avatar
NormanDunbar
Super Gold Card
Posts: 578
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: the new ALPHA_BLEND command

Postby NormanDunbar » Thu Nov 29, 2018 3:37 pm

Thanks Dilwyn.

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


Cheers,
Norm.


Why do they put lightning conductors on churches?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.

Return to “General QL Chat”

Who is online

Users browsing this forum: No registered users and 0 guests