BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 02-11-2008, 01:57 PM   #1
alhazen
New Member
 
Join Date: Feb 2008
Model: 8300
PIN: N/A
Carrier: N/A
Posts: 2
Default Drawing arrows

Please Login to Remove!

I couldn't find a method to draw an arrow , I was thinking of loading a bitmap of an arrow , but will I be able to rotate the bitmap ?

Thanks.
Offline  
Old 02-12-2008, 04:19 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

you can use graphics to draw whatever you want. not as easy as using paint, though
i don't think there is api support for rotating bitmaps, at least i don't know of any. you could add more then one image, though.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 02-12-2008, 06:28 PM   #3
rab1
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 25
Default

Quote:
Originally Posted by alhazen View Post
I couldn't find a method to draw an arrow , I was thinking of loading a bitmap of an arrow , but will I be able to rotate the bitmap ?

Thanks.
I think the straight forward way is to draw a bitmap for the arrow. I did it once when I had to draw right and left arrows. There is no API to rotate a bitmap, but you can add code to do that. It is not hard. The simplest algorithm is to go over the bitmap, byte by byte and change their positions depending on the rotation. The algorithm uses the sin and cos functions if the rotation is any arbitrary angle. What I have noticed is that the algorithm is slow if you have big bitmaps, but it is acceptable for small bitmaps.

rab
Offline  
Old 02-13-2008, 05:09 PM   #4
alhazen
New Member
 
Join Date: Feb 2008
Model: 8300
PIN: N/A
Carrier: N/A
Posts: 2
Default

Thanks for your replies. Actually , my program that requires the arrow is simple , and I don't want to over complicate things. I was thinking of implementing it with a line and arc or a rectangle and a triangle composite. I'm a newbie , can you please guide me to drawing composite figures given the fact that there are other field on the main screen.

Thanks.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper picture

SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper

$29.29



3/4

3/4" Brass Electric Solenoid Valve 12V 12 VDC Volt DC Water Air Gas VITON NC B21

$36.80



3/8

3/8" Inch 4 Way Directional Control Cylinder Electric Solenoid Air Valve 12V DC

$35.99



3/4

3/4" Brass Electric Solenoid Valve 110V 120V Volt AC Water Air Gas VITON NC B21

$36.20



Fuel Shutoff Solenoid 1503ES-12A5UC5S SA-4569-T For Kubota Tractors B1700D UE picture

Fuel Shutoff Solenoid 1503ES-12A5UC5S SA-4569-T For Kubota Tractors B1700D UE

$25.89



Starter Solenoid - Delco Style - 12 Volt - 4 Terminal fits International picture

Starter Solenoid - Delco Style - 12 Volt - 4 Terminal fits International

$38.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.