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
Regular Contributor
Posts: 70
Registered: ‎10-06-2010
My Device: BB 9780
Accepted Solution

Use a shape to draw a bitmap

I'm wondering if there is a way to change the shape of a Bitmap, using a mask or something similar on it. Here's the problem:

 

i have a rectangle bitmap, and i need to round the corners so to obtain a rounded Bitmap (with transparent angles). Is there a way to do it?

In Android i can specify a shape to "cut" a bitmap...

Highlighted
Developer
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520
My Carrier: T-Mobile

Re: Use a shape to draw a bitmap

Take a look at the DevCon 2010 session downloads. In particular sessions DEV18 through DEV21.  In there you will find an update to the RIM AdvancedUI samples, which include using a bitmap mask to do exactly what you are asking.

Regular Contributor
Posts: 70
Registered: ‎10-06-2010
My Device: BB 9780

Re: Use a shape to draw a bitmap

Thank you very much. I'm checking them and let you know Smiley Happy

Regular Contributor
Posts: 70
Registered: ‎10-06-2010
My Device: BB 9780

Re: Use a shape to draw a bitmap

Thank you very much! It worked perfectly!

Developer
Posts: 44
Registered: ‎02-21-2010
My Device: Z10
My Carrier: AT&T

Re: Use a shape to draw a bitmap

Do you have an link to the content?

Regular Contributor
Posts: 70
Registered: ‎10-06-2010
My Device: BB 9780

Re: Use a shape to draw a bitmap

https://www.blackberry.com/bdsc/?lang=na#devcon

 

You need a developer account to see the links!

Contributor
Posts: 27
Registered: ‎02-12-2010
My Device: Torch 9800
My Carrier: Globe/Unlocked AT&T

Re: Use a shape to draw a bitmap

Is there a publicly available link to that session or the sample code?

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

Re: Use a shape to draw a bitmap

Not that I am aware of and they are likely down now because they are usually only accessible for 1 year.

 

But most of the code made it into this KB article:

 

http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...