Download the free trial version
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Semi-Transparent controls

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2010, 12:05 AM
Junior Member
 
Join Date: Aug 2008
Location: Israel
Posts: 25
Send a message via Skype™ to ddahan
Default Semi-Transparent controls

Hi ,
I'm trying to have semi-transparent ImageButton but have some difficulties.
I found that using a PNG image format with alpha channel is the most promising approach.
There is inconsistency that I cannot resolve - The ImageButton is semi-transparent in the desktop environment but is solid (not semi-transparent) in the device screen.
I have attached a simple example.
I'll appreciate your advice.

thanks,
David.
Reply With Quote
  #2 (permalink)  
Old 02-05-2010, 09:13 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 754
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Is this answer relevant? http://www.basic4ppc.com/forum/quest...html#post31911

Mike.
Reply With Quote
  #3 (permalink)  
Old 02-05-2010, 09:54 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,933
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by ddahan View Post
I found that using a PNG image format with alpha channel is the most promising approach.
The Compact Framework does not support alpha channels, colours are always solid. At the moment http://www.basic4ppc.com/forum/addit...ge-device.html is as far as you can go within Basic4ppc and my http://www.basic4ppc.com/forum/addit...x-library.html can do a constant alpha blend of two bitmaps.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #4 (permalink)  
Old 02-05-2010, 05:43 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,933
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

In a few days I'll post an update to ImageLibEx than can handle pixel level alpha. At the moment it supports constant alpha blend by the BitmapEx method.

AlphaBlend(src, srcrectangle, percent, destleft, desttop, transparent, transcolor)

where percent is the alpha for the source bitmap. I'll be adding

AlphaPixelBlend(src, srcrectangle, alphadata, destleft, desttop, transparent, transcolor)

where alphadata is a bitmap containing the alpha for source each pixel. It will need to be read from a file created on the desktop from a png file by a new Alpha object in the library. Full details will be in the help.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #5 (permalink)  
Old 02-06-2010, 03:43 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,933
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Try the most recent version of my http://www.basic4ppc.com/forum/addit...x-library.html and see if BitmapEx.AlphaPixelBlend will help.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation error: semi colon expected Caravelle Questions (Windows Mobile) 4 01-15-2010 10:07 AM
transparent and toolbarbutton Byak@ Questions (Windows Mobile) 6 07-22-2008 03:45 PM
Transparent .gif? Zenerdiode Questions (Windows Mobile) 2 06-29-2008 03:58 PM
image transparent hung Questions (Windows Mobile) 4 08-08-2007 03:00 AM
Something transparent (invisible) sloopa Questions (Windows Mobile) 1 05-20-2007 10:27 AM


All times are GMT. The time now is 01:42 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0