Re: How do I draw a semicircle?

Phil <[email protected]> Sun, 4 Jul 2021 10:02:50 +1000
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
On 4/7/21 2:45 am, 'Chris Barker' via wxPython-users wrote:
>
>     I now have my meter working and now have to sort out how to
>     incorporate
>     it into it's own class. I have no idea how to do this, at the moment.
>
>
> create a subclass of wxPanel
>
> Create a method to draw the dial.
>
> Call that method from The OnPaint handler to a method that draws your 
> dial.
>
> When the data changes, call Refesh() on your panel -- that will 
> trigger a Paint event, which will re-draw the dial.
>
> You may want to have the dial itself be pre-saved to a bitmap, and 
> then you can just re-draw the needle on top of it when things change.
>
Thank you Chris,

Perhaps I should have delayed my question until I'd had a good night's 
sleep. I completed this project over a few days. Creating the dial in a 
drawing programme was a far neater idea and saved a lot of coding.

-- 

Regards,
Phil

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/08c9d19b-924b-8fae-9010-208abfaafc49%40gmail.com.