|
From: Peter M. <pe...@pd...> - 2006-04-04 02:38:48
|
Eric, In case you or anyone out there is serious about this, I've attached a di= f=20 file against CVS HEAD of a patch that is a start for adding a -bgimage option to the Tk Text widget. (This is really just copied from tkhtml.)=20 Currently, it looks right on startup, but has a number of problems: - it messes up the cursor position when it moves - it updates only lines that have text. - Doesn't take into account x/y offset of scroll And I'm sure there are others. To see what it looks like go to: http://pdqi.com/textbg.gif Peter On April 3, 2006 01:07 pm, Eric Taylor wrote: > At 08:15 AM 4/3/2006 -0700, Peter MacDonald wrote: > >Currently a bgimage can be implement in canvas at the script level, bu= t it > > is messy and there is no such option for text... > > A number of good ideas have surfaced since the TIP was > published. > > -------- canvas approach > > I've been experimenting using canvases in place of frames, > and I'm now wondering what, if anything, a canvas cannot do > that a frame can do. I've experimented with nested canvases, > just like nested frames and so far it all seems to work. > > I've also seen some pure tcl code that will tile an image. > > The one other idea that has surfaced, and for which I was > about to modify the TIP, was to add an option for > transparency. If a canvas's background image could be made > transparent then perhaps there's no need to change frames. > > I was also thinking that when implementing transparency, one > would use > > -transparent <float> > > > where 0. was totally opaque, and 1. was totally transparent. > This could potentially allow for semi-transparency. If a > system couldn't implement this, it could just then round the > value to 0/1 for opaque/transparent. > > If this was a configurable option, then some cool fade in/out > effects on images could be created by stepping the value > between 0. .. 1. over a short timespan. > > ------- paved widgets > > It has also come to my attention that there's a package > called Paved::widgets which does do tiling and also > background images. It can transform an existing frame into a > Paved::frame. > > http://web.tiscali.it/irrational/tcl/paved1.1/doc/index.html > > > I have posted a question about transparency, and the only > other issue might be that this also requires the snit > package. I've often had difficulty with scripts that need > lots of packages, as they then become much more difficult to > deploy. But that's just my situation. > > > Eric Taylor > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new codin= g > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Tcl-Core mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-core --=20 Peter MacDonald PDQ Interfaces Inc Email: pe...@pd... =09http://pdqi.com Phone: (250) 595-5998 |