Hi Jamie, Thanks for your interest. I'm not sure when I can really look at your code, though.
One note: you code mixes tabs and spaces -- that is a serious no-no in python (it really should be dis-allowed, but legacies will persist) FloatCanvas (and wxPython, and ...) uses the now almost-standard of four spaces per indent. thanks, -Chris Jamie Bullock wrote: > Hi Chris, > > Thanks for the uptake on this, and apologies for the slow response. From > the various replies (and looking at the wx code) it seems like the basic > situation is that lines aren't 'filled' and so can't have a gradient. > Initially I thought that DrawLineList might solve the problem (we could > pass in a 'gradated' list of pens), but it seems that it is currently > only supported by DC not GC, and so won't support the alpha channel (?). > > Anyhow I'm quite keen on GC support in FloatCanvas, so I started poking > around with your test (see below). > > On Wed, 2007-09-05 at 15:55 -0700, Christopher Barker wrote: > >> I started poking into this last night. It looks doable. However, >> unfortunately for the OP, it's going to be a trick to get a line to fade >> out, as you can make a gradient brush, but not a gradient pen, so you'd >> need to make a skinny polygon instead of a line (so there is something >> to fill with the brush). >> >> I started a bit of test code. It's in SVN: >> >> Tests/GCTest.py >> Tests/AlphaLine.py >> > > I've attached a basic merging of the 'filled path' idea from GCTest into > AlphaLine. It works, and proves the concept of using GC with a > NavCanvas, albeit with a few flaws (Zoom is a bit clunky), but maybe > this I've done something wrong anyhow. > >>From an interface perspective it works the same as the Line class, but > takes additional arguments 'StartAlpha', 'EndAlpha' and 'BorderColour'. > It's probably a bit of a hack, but it does seem to do the job. > > I'm happy to help out with this in anyway I can, but I am fairly new to > Python and very new to wxPython and floatcanvas, so might initially drop > a few clangers! > > best, > > Jamie > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > FloatCanvas mailing list > [email protected] > http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
