From: Robin Dunn Date: Fri, 8 Sep 2006 20:08:21 +0000 (+0000) Subject: Show status of wxMac CoreGraphics build option X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2f72b58ae6635bca17e8e19889a84e3b70c7f3a5 Show status of wxMac CoreGraphics build option git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/AlphaDrawing.py b/wxPython/demo/AlphaDrawing.py index 8c3f973d96..740d29cfbe 100644 --- a/wxPython/demo/AlphaDrawing.py +++ b/wxPython/demo/AlphaDrawing.py @@ -7,20 +7,23 @@ class TestPanel(wx.Panel): def __init__(self, parent, log): self.log = log wx.Panel.__init__(self, parent, -1) - - wx.StaticText(self, -1, - "On the Mac these squares should be transparent,\n" - "if the CoreGrahics option is turned on.", - (20, 20)) - self.Bind(wx.EVT_PAINT, self.OnPaint) + txt = "On the Mac these squares should be transparent, if the\n" \ + "CoreGraphics option is turned on. " + if "wxMac" in wx.PlatformInfo: + txt += "This build of wxPython\n" \ + "%s have the CoreGraphics option turned on." \ + % ("mac-cg" in wx.PlatformInfo and "DOES" or "DOS NOT") + wx.StaticText(self, -1, txt, (20, 20)) + + def OnPaint(self, evt): dc = wx.PaintDC(self) rect = wx.Rect(0,0, 100, 100) - for RGB, pos in [((178, 34, 34), ( 50, 70)), - (( 35, 142, 35), (110, 130)), - (( 0, 0, 139), (170, 70)) + 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) @@ -49,6 +52,9 @@ brushes. This is accomplished by enabling the wx.Colour class to have a fourth component for the alpha value, where 0 is fully transparent, and 255 is fully opaque. +

You can consider this a \"preview of coming attractions\" for the +other platforms. + """