Android
To set bitmap transparency.
Java program example:
Public class helloworld extends activity {@ override public void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); setcontentview (New drawcanvas (this);} class drawcanvas extends view {public drawcanvas (context) {super (context );} @ override protected void ondraw (canvas) {super. ondraw (canvas); // obtain the bitmap of the resource image. Bitmap vbitmap = bitmapfactory. decoder Esource (this. getresources (), R. drawable. icon); // create the paint object paint vpaint = new paint (); vpaint. setstyle (paint. style. stroke); // hollow vpaint. setalpha (75); // bitmap transparency (0 ~ 100) canvas. drawbitmap (vbitmap, 50,100, null); // transparent canvas. drawbitmap (vbitmap, 50,200, vpaint); // transparent }}}
From: http://disanji.net/2010/12/11/android-bitmap-picture/