[Tutor] Using trigonometry to draw a circle

Alan Gauld alan.gauld at yahoo.co.uk
Wed May 19 15:41:51 EDT 2021


On 19/05/2021 01:10, Phil wrote:

> trying to simulate an analogue meter and the current approach is to use 
> the path.AddArc function to draw the meter arc. Now I'd like to add 
> ticks along the arc; I cannot see how to do this.

The normal way to do this is draw a meter in a drawing package,
save it as a png or gif file and display that. Then use the
graphics library to draw the needle at the appropriate angle
on top of the meter. This is common in photo-realistic GUIs
(as often used in lab tools etc), sometimes even taking a
photo of a real meter as a starting point.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list