Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Alpha-channel how-to -> can anyone explain ?

Featured Replies

  • Commercial Member

Hi all,Can anyone explain how I should implement alpha-channel shading in my gauges ?I know how to draw an image with an alpha-channel in PSP and run that through the imagetool from MS, its the bit after that that I don't seem to get right. Basically I want to add some shading to a few of my C++ indicator gauges and add a transparent protection to one of the switches. These gauges consist of a STATIC (off course), a few icons and needles etc... and I want to layer an ICON element on top of that containing the alpha-channel based shading.I added the IMAGE_USE_ALPHA flag to the ICON element but the result is completely not what I had intended. Although the alpha looks really nice in imagetool , when I add it to the gauge it basically results in either 100% black or 100% transparent.Does anyone have experience with this ?Thx,Bj

simcheck_sig_banner_devteam.jpg

 

Bj

  • Commercial Member

Thx Dai,I read what you mentionned in the current version but frankly... it doesn't make too much sense, at least it doesn't for me ;)Looking forward to the new release (as always !).Bj

simcheck_sig_banner_devteam.jpg

 

Bj

  • Commercial Member

Dai,I've re-read the v.24 (p.76) text and I will try using a static element in stead of an ICON for the alpha channel stuff and see if that works any better. The NEEDLE example in v.24 seems to indicate that alpha channels don't really work in other than STATIC elements, have you tried using an ICON with alpha channel ?Thx,Bj

simcheck_sig_banner_devteam.jpg

 

Bj

  • Commercial Member

Caught. The very first time I make an assumption in the sd2gau series I get caught. Where's the justice in that? :-lol No, I didn't try MAKE_ICON; I assumed that it would most likely work if the icon only had a single bitmap that was switched permanently on. If you are using a single-bitmap MAKE_ICON, then there is no reason why you couldn't change it for MAKE_STATIC. I guess that when I have the time I should run a set of tests to see if the alpha channel will work with a multi-image MAKE_ICON.-Dai

  • Commercial Member

Dai,Tried it and it only really works with STATIC elements. I did find a problem with poor refresh rates of the static image so you will have to add the IMAGE_USE_ERASE flag also, but other than that it works really well.Bj

simcheck_sig_banner_devteam.jpg

 

Bj

  • Author
  • Moderator

Actually, that makes sense, because we can only use an Alpha mask on static (non-moving) elements using XML as well...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.