diff --git a/wxPython/demo/AlphaDrawing.py b/wxPython/demo/AlphaDrawing.py index 7023b7beda..6fb15a97c3 100644 --- a/wxPython/demo/AlphaDrawing.py +++ b/wxPython/demo/AlphaDrawing.py @@ -35,7 +35,13 @@ then these squares should be transparent. 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) + #---------------------------------------------------------------------- diff --git a/wxPython/demo/GraphicsContext.py b/wxPython/demo/GraphicsContext.py index 99510b0605..e598362381 100644 --- a/wxPython/demo/GraphicsContext.py +++ b/wxPython/demo/GraphicsContext.py @@ -70,6 +70,13 @@ class TestPanel(wx.Panel): gc.DrawText("Scale", 0, -BASE2) gc.Translate(0, 20) + # for testing clipping + #gc.Clip(0, 0, 100, 100) + #rgn = wx.RegionFromPoints([ (0,0), (75,0), (75,25,), (100, 25), + # (100,100), (0,100), (0,0) ]) + #gc.ClipRegion(rgn) + #gc.ResetClip() + gc.SetBrush(wx.Brush(wx.Colour(178, 34, 34, 128))) # 128 == half transparent for cnt in range(8): gc.Scale(1.08, 1.08) # increase scale by 8% @@ -81,7 +88,7 @@ class TestPanel(wx.Panel): gc.PushState() # save it again gc.Translate(400, 200) gc.DrawText("Rotate", 0, -BASE2) - + gc.Translate(0, 75) for angle in range(0, 360, 30): gc.PushState() # save this new current state so we can pop back to