Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 271
Registered: ‎12-24-2010
My Device: BlackBerry 10
My Carrier: Airtel

Draw a tranparent circle on the screen top of a bitmap field

[ Edited ]

Hi,

 

I want to draw a tranparent circle/rectengle on my screen top of a bitmap image. and want to move it around the screen. How can i do this?
Please help me.

 

Thanks,

Arindam.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Draw a transparent circle on the screen top of a bitmap field

[ Edited ]

The question is different but the ideas given in this Thread will also help you with this question. 

 

http://supportforums.blackberry.com/t5/Java-Development/How-to-make-this-UI/m-p/2696953#M224342

 

There are more efficient options, but the easiest option is to make the Bitmap with the cutout huge, then just position it so the cutout is where you want it be, Then in paint, use drawImage to paint it over the top of your real image. 

 

That gets you your cut out.  To move it, you just need to paint the Bitmap in different places.  If you want to animate this, then the code in here will help. 

http://supportforums.blackberry.com/t5/Java-Development/Display-an-animated-GIF/ta-p/445014