Hey Parry,
I used a loop to achieve this.
_Cropped = Bitmap.createBitmap(width, height, _BMAP.getConfig());
for(int i=0; i<_Cropped.getWidth(); i++){
for(int j=0; j<_Cropped.getHeight(); j++){
_Cropped.setPixel(i,j, Color.TRANSPARENT);
}
}
On Monday, 2 April 2012 20:54:47 UTC+5, Perry168 wrote:
>
> hi,
>
> I used following method to create a canvas.
>
> temp = Bitmap.createBitmap(thisWidth, thisHeight, Config.ARGB_4444);
> Canvas thisCanvas = new Canvas(temp);
>
> I don't know why the canvas has a black background. How to create a
> Transparent background for use?
>
> Thanks a lot!
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/9b645a1a-bbea-4be3-b12a-e0820594dd43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.