Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

Sun Monitor

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 10-25-2007, 01:37 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Gentlemen,

Just a small 3D bitmap or some shades of color. I have been putting together web sites for years.

I totally lack of in-depth knowledge of the frameworks, nor do I own ability of constructing DLLs with #Develop. On top of this, I have a talent to introduce new bugs as my senile, rusty brain attempts to add functionality.

Most of my apps are enhanced by dzt's and Filippo's irreplaceable DLLs.

In short, I am truly happy to have you at my side
Reply With Quote
  #12 (permalink)  
Old 10-25-2007, 06:20 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default Gauges

Hi
Until there are controls in the shape of gauges, I used poligons (Erel's suggestion) as demonstrated here:

.....
triangle(track,40)
Form5.FPolygon(alX,0,alY,0,4,Rgb(TRK.R,TRK.G,TRK.B ),f)
Form5.FPolygon(alX,0,alY,0,4,cBlack)
....
Sub Triangle(angle,k)
angle = angle * cPI / 180
s = Sin(angle)
c = Cos(angle)
alX.Item(0) = center_x + k * s
alY.Item(0) = center_y - k * c
alX.Item(1) = center_x + 6 * c + 7 *s
alY.Item(1) = center_y - 7 * c + 6 * s
alX.Item(2) = center_x + 10 * s
alY.Item(2) = center_y - 10 * c
alX.Item(3) = center_x - 6 * c + 7 * s
alY.Item(3) = center_y - 7 * c - 6 * s
End Sub
.....

and it is drawn on the background of an image of a map, so an image of the instrument is the same.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #13 (permalink)  
Old 10-25-2007, 07:05 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Very nice, David,

Your method allows scaling, thick lines, etc. A true alternative.

A control would require a vector graphic as background image rather than a bitmap to allow virtually limitless scaling of the control's dimensions.
Reply With Quote
  #14 (permalink)  
Old 10-25-2007, 02:38 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Being inspired by seeing alfcens' gauges I've been playing with pictures and polygons to make analogue gauges. To make it easier I've taken derez' code above, added a bit to it and parameterized it to make playing with different pointer shapes easier. Someone might be interested so I've posted it below. You can make a surprising number of different pointer styles by playing with different parameters!
Attached Images
File Type: jpg Clock.jpg (3.7 KB, 22 views)
Attached Files
File Type: sbp Pointer.sbp (2.3 KB, 22 views)
Reply With Quote
  #15 (permalink)  
Old 10-25-2007, 06:55 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Looks great!
You should zip the picture (with the code) as the forum changes its size and causes the large clock to be in a wrong size.
Reply With Quote
  #16 (permalink)  
Old 10-26-2007, 07:37 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

That's a gorgeous gauge, agraham.
Reply With Quote
  #17 (permalink)  
Old 10-26-2007, 09:43 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Erel View Post
Looks great!
You should zip the picture (with the code) as the forum changes its size and causes the large clock to be in a wrong size.
Zipped!
Attached Files
File Type: zip Clock.zip (4.8 KB, 25 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 11:31 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0