python - Anti-Aliasing Images in a panel -



python - Anti-Aliasing Images in a panel -

i'm setting shape of wxpanel, there lot of jagged edges. there way smooth these out?

inside of wx.frame, setting shape black , white .png image

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))

inside of wxpanel, setting image in 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)

here examples of talking about: http://clfu.se/pzn3 http://clfu.se/ue4

is there way smooth these out in wxpython or trick in photoshop missing?

any help appreciated

you improve off draw image using graphicscontext widget supports anti-aliasing:

http://wxpython.org/phoenix/docs/html/graphicscontext.html

wxpython allows drawing via cairo, back upwards anti-aliasing:

http://wiki.wxpython.org/usingcairowithwxpython

finally, take @ floatcanvas:

best canvas drawing in wxpython?

python wxpython wxwidgets

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -