X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec873c943d71f0d5f13e3398557071448cda6c23..a4027e74873007e3430af3bd77019bcab76f6c04:/wxPython/demo/AlphaDrawing.py diff --git a/wxPython/demo/AlphaDrawing.py b/wxPython/demo/AlphaDrawing.py deleted file mode 100644 index 6fb15a97c3..0000000000 --- a/wxPython/demo/AlphaDrawing.py +++ /dev/null @@ -1,76 +0,0 @@ - -import wx - -#---------------------------------------------------------------------- - -class TestPanel(wx.Panel): - def __init__(self, parent, log): - self.log = log - wx.Panel.__init__(self, parent, -1) - self.Bind(wx.EVT_PAINT, self.OnPaint) - - txt = """\ -If this build of wxPython includes the new wx.GCDC class (which -provides the wx.DC API on top of the new wx.GraphicsContext class) -then these squares should be transparent. -""" - wx.StaticText(self, -1, txt, (20, 20)) - - - def OnPaint(self, evt): - pdc = wx.PaintDC(self) - try: - dc = wx.GCDC(pdc) - except: - dc = pdc - rect = wx.Rect(0,0, 100, 100) - for RGB, pos in [((178, 34, 34), ( 50, 90)), - (( 35, 142, 35), (110, 150)), - (( 0, 0, 139), (170, 90)) - ]: - r, g, b = RGB - penclr = wx.Colour(r, g, b, wx.ALPHA_OPAQUE) - brushclr = wx.Colour(r, g, b, 128) # half transparent - dc.SetPen(wx.Pen(penclr)) - dc.SetBrush(wx.Brush(brushclr)) - rect.SetPosition(pos) - dc.DrawRoundedRectangleRect(rect, 8) - - # some additional testing stuff - #dc.SetPen(wx.Pen(wx.Colour(0,0,255, 196))) - #dc.SetBrush(wx.Brush(wx.Colour(0,0,255, 64))) - #dc.DrawCircle(50, 275, 25) - #dc.DrawEllipse(100, 275, 75, 50) - - -#---------------------------------------------------------------------- - -def runTest(frame, nb, log): - win = TestPanel(nb, log) - return win - -#---------------------------------------------------------------------- - - - -overview = """
-