For example, if I draw this circle
is clearly imprecise and ugly. Is there any way to adjust the sensitivity of the draw?
edit:
I can summarize to:
self.da = wx.Panel(self, -1, size=(-1, 800))
self.da.Bind(wx.EVT_PAINT, self.paint)
self._buffer = wx.EmptyBitmap(500,500) # creating empty buffer
dc = wx.MemoryDC(self._buffer) # to handle the buffer
dc.SetBackground( wx.Brush("White") ) # setting background
dc.DrawCircle(50,40,100) #drawing circle
def paint(self, evt):
dc = wx.BufferedPaintDC(self.da, self._buffer) #on paint event draw this
You can use wx.GCDC because it support anti-aliased drawing
Try this:
buffer = wx.EmptyBitmap(500,500) # creating empty buffer
dc = wx.MemoryDC(buffer) # to handle the buffer
dc = wx.GCDC(dc)
dc.SetBackground( wx.Brush("White") ) # setting background
dc.DrawCircle(50,40,100) #drawing circle
dc.DrawCircle(200,200,100) #drawing circle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With