On Mon, 12 Jul 1999, Reginald Stadlbauer wrote: > On Tue, 13 Jul 1999, Mosfet wrote: > >On Mon, 12 Jul 1999, Roberto Alsina wrote: > >> On Mon, 12 Jul 1999, Mosfet wrote: > >> > > > >Oh! *thwack*! > > > >/me just got home from a meeting that sucked my rather meager communication > >skills and am no longer comprehending language very well ;-) I thought he was > >saying there was two diagonals being drawn. Silly me, I misread his email. > >Sorry Antonio! > > > >Can't see why we couldn't do that, just decrement X instead of increment it. > > Yes :-) BTW: Where is this code for the gradients now? Is it in KPixmap. If it > would support radial and rectengular gradients too, I could use it in > KPresenter instead of my (rather bad and slow) gradient code. It is in KPixmap and all it supports currently is Horizontal, Vertical, and Diagonal gradients. I have been looking at adding new modes and did not know KPresenter had gradient code... Can you point me to the file it's in (I don't have KOffice compiled) and maybe we can both look at speeding it up and maybe moving it to KPixmap also? I think gradients are useful to many apps like window managers, root window graphics applications, paint programs, etc.. It would also be neat to have modes like "Sunburst" :) Currently my main reason for doing this has been because I wanted diagonal gradients for the theme style plugin ;-) Nonetheless, for the few modes it supports KPixmap is quite fast now. The diagonal code is based on BlackBox's dgradient (the authors did a really cool job on this BTW). Here are some timings for a 300x300 pixmap on my Cyrix 333/Voodoo 1 machine: Vertical: 9ms. Really fast! I could not believe it when I first ran it but it's true... Horizontal: 132ms. Really slow... This is mostly because it draws a vertical gradient then rotates it. In previous KDE versions KWM included it's own gradient hack for >8bpp displays. Now that's in KPixmap but I have not timed it yet. I may try to dump this code completely. Diagonal: 93ms. Not that bad for diagonals since it's more complex then the above two. I had a version that ran in 72ms, but like the gimp it looked horizontal or vertical when the aspect ratio was way off. > > -- > Reggie -- Daniel M. Duley - Unix developer & sys admin. mosfet@kde.org mosfet@jorsm.com