0
我正在設置wxPanel的形狀,但有很多鋸齒狀的邊緣。有沒有辦法使這些變得平滑?面板中的反鋸齒圖像
裏面的wx.Frame的,我從一個黑白的PNG圖片
mask = wx.Image('Resources/Images/Window/window_alpha_map.png')
mask.ConvertAlphaToMask()
shape = mask.ConvertToBitmap()
shape.SetMask(wx.Mask(shape, wx.BLACK))
self.SetShape(wx.RegionFromBitmap(shape))
裏面的wxPanel的設置形狀,我則設置在圖像eraseBackground
def onEraseBackground(self, event):
dc = event.GetDC()
if not dc:
dc = wx.ClientDC(self)
rect = self.GetUpdateRegion().GetBox()
dc.SetClippingRect(rect)
dc.Clear()
background = wx.Image('Resources/Images/Window/window_background.png')
bmp = background.ConvertToBitmap()
dc.DrawBitmap(bmp, 0, 0)
下面是我正在談論的一些示例:http://clfu.se/PZn3http://clfu.se/uE4
有沒有辦法在wxPython中甚至在瑞克在Photoshop中我失蹤了?
任何幫助表示讚賞