Board index FlightGear Development Canvas

Two Images to a Texture

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Re: Two Images to a Texture

Postby Hooray » Thu Sep 18, 2014 3:44 pm

indeed, that's looking good !
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: Two Images to a Texture

Postby Algernon » Wed Oct 01, 2014 3:34 pm

Just a quick update on this - a busy work schedule and a few hitches in rebuilding the EF2000 have meant I haven't yet had a play with the transparency method. Hoping that TheTom might be able to shed some light on it before I do, but failing that, I should have some time for more experimentation next week.
Algernon
FGUK - A FlightGear community in the United Kingdom and Republic of Ireland
User avatar
Algernon
 
Posts: 498
Joined: Sun Jun 27, 2010 3:55 pm
Callsign: G-ALGY
Version: 3.0
OS: W7U

Re: Two Images to a Texture

Postby Hooray » Mon Oct 20, 2014 6:52 pm

sorry for getting back to this so late (I guess we're all kinda busy ATM) - but you could take a look at either tooltip.nas and/or gui.nas in the $FG_ROOT/Nasal/canvas/gui directory, I think there's code doing transparency management IIRC.

Subject: Improving screen text visibility

TheTom wrote:Try adding one of the following code blocks:

Code: Select all
me._canvasWindow.getCanvas().set("blend-source-alpha", "src-alpha")
                            .set("blend-destination-alpha", "one-minus-src-alpha");


Code: Select all
me._canvasWindow.getCanvas().set("blend-source-alpha", "one")
                            .set("blend-destination-alpha", "zero");


EDIT: http://wiki.flightgear.org/index.php?ti ... ldid=74123
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Previous

Return to Canvas

Who is online

Users browsing this forum: No registered users and 24 guests