[Chandler-dev] Making custom gradient brush is slow
Heikki Toivonen
heikki at osafoundation.org
Mon Apr 9 21:35:15 PDT 2007
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?
--
Heikki Toivonen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/chandler-dev/attachments/20070409/a8679bb8/signature.pgp
More information about the chandler-dev
mailing list