Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed 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: 10
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.
Attached Files
File Type: zip Transparent.zip (62.2 KB, 10 views)
Reply With Quote
  #2 (permalink)  
Old 02-05-2010, 09:13 AM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 232
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Is this answer relevant? bList Image Resize and Transparency

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: 3,349
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 Alpha Image Device is as far as you can go within Basic4ppc and my ImageLibEx library 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: 3,349
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: 3,349
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Try the most recent version of my ImageLibEx library 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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 03:32 PM.


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