Hi Heikki, > Currently getting those events on the calendar rendered in that nice > gradient runs through some pretty slow looking code, and although we > cache gradient brushes we can still end up making quite a few of them, > meaning slow code. For example, in the resize test making those > gradients takes over 8% of the profile. > > I searched around for wx and gradients, and ended up finding a couple of > things that look promising. > > wx.DC, http://www.wxpython.org/docs/api/wx.DC-class.html, has methods > GradientFillLinear and GradientFillConcentric. > > wx.GraphicsContext, > http://www.wxpython.org/docs/api/wx.GraphicsContext-class.html, has > methods CreateLinearGradientBrush and CreateRadialGradientBrush. > > There is also a wxPython ButtonPanel.py demo which includes gradients, > and some other controls that support gradients as well, but these seem > more like potential hacks than solutions. > > Could some of those approaches be used instead of our custom gradients?
I'm pretty sure Alec tried those when he was experimenting with gradients, but unfortunately I don't know why he didn't choose them. I'll ask him. Of course, it's always possible wx has improved since Alec last played with gradients, so it may be worth experimenting again. Sincerely, Jeffrey _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "chandler-dev" mailing list http://lists.osafoundation.org/mailman/listinfo/chandler-dev
