def test_lib_floatcanvas_fc_spline(self):
        fccanvas = fc.FloatCanvas(self.frame)

        obj = fc.Spline((2, 2))

        fccanvas.AddObject(obj)
        fccanvas.Destroy()
Beispiel #2
0
    def DrawTest(self, event=None):
        wx.GetApp().Yield()

        Canvas = self.Canvas

        Points = [
            (0, 0),
            (200, 0),
            (200, 0),
            (200, 0),
            (200, 15),
            (185, 15),
            (119, 15),
            (104, 15),
            (104, 30),
            (104, 265),
            (104, 280),
            (119, 280),
            (185, 280),
            (200, 280),
            (200, 295),
            (200, 295),
            (200, 295),
            (0, 295),
            (0, 295),
            (0, 295),
            (0, 280),
            (15, 280),
            (81, 280),
            (96, 280),
            (96, 265),
            (96, 30),
            (96, 15),
            (81, 15),
            (15, 15),
            (0, 15),
            (0, 0),
        ]

        Canvas.ClearAll()

        MyLine = FC.Spline(Points, LineWidth=3, LineColor="Blue")

        Canvas.AddObject(MyLine)
        Canvas.AddPointSet(
            Points,
            Color="Red",
            Diameter=4,
        )

        ## A regular old spline:
        Points = [
            (-30, 260),
            (-10, 130),
            (70, 185),
            (160, 60),
        ]

        Canvas.AddSpline(Points, LineWidth=5, LineColor="Purple")