DrawArc on Windows vs. Linux with wxPython 3.0.2.0
ABC <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
I noticed a difference in drawing of an arc on Windows vs. Linux.
With the following code, on Windows, the arc does NOT touch the 2nd drawn
line, while on Linux (Fedora 24 with latest update), it does.
I think the Windows rendering is the correct one.
import wx
class DrawPanel(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, title="Draw on Panel")
self.Bind(wx.EVT_PAINT, self.OnPaint)
def OnPaint(self, event=None):
dc = wx.PaintDC(self)
dc.Clear()
dc.SetPen(wx.Pen(wx.BLACK, 1))
dc.DrawLine(0, 0, 199, 0)
dc.DrawLine(0, 100, 199, 100)
dc.SetPen(wx.Pen(wx.RED, 1))
dc.SetBrush(wx.TRANSPARENT_BRUSH)
dc.DrawArc(199, 0, # x1, y1 start point
99, 99, # x2, y2 end point
199, 99)
app = wx.App(False)
frame = DrawPanel()
frame.SetClientSize((200,200)) # sets the size of the INSIDE of a window
frame.Show()
app.MainLoop()
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.