Gym_LineTracer.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Gym_LineFollower 作者: Chachay 项目源码 文件源码
def __init__(self, parent=None, id=-1, title=None):
        wx.Frame.__init__(self, parent, id, title)
        self.MainPanel = wx.Panel(self, size=(640, 480))
        self.MainPanel.SetBackgroundColour('WHITE')

        self.panel = wx.Panel(self.MainPanel, size = (640,480))
        self.panel.SetBackgroundColour('WHITE')

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        mainSizer.Add(self.panel)

        self.SetSizer(mainSizer)
        self.Fit()

        self.Bind(wx.EVT_CLOSE, self.CloseWindow)

        self.World = None

        self.cdc = wx.ClientDC(self.panel)
        w, h = self.panel.GetSize()
        self.bmp = wx.EmptyBitmap(w,h)

        self.timer = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.OnTimer)

        self.timer.Start(20)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号