[PD] GUI and DSP
Mathieu Bouchard
matju at artengine.ca
Sun Feb 12 06:06:00 CET 2012
Le 2012-02-11 à 09:15:00, Jonathan Wilkes a écrit :
> Do you still have any of those changes you made to Tk? If so, how do
> they compare to unpatched Tk when running Hans' array-demo?
Well, yes, I have them, but it's not very relevant, as I already know that
those changes make Pd really worse in too many cases.
The interface common to all item-types has a function to return one bbox
(bounding-box : x1 y1 x2 y2). It is assumed that the whole bbox has to be
redrawn whenever any aspect of the item has changed. For long diagonal
lines, this means a damn lot of stuff that isn't even close to the line.
I didn't change this.
Then this info is centralised as a single bbox that tells which part of
the canvas to redraw. There's only one. In my diff, I replace this by a
grid each representing a 8x8 or 32x32 zone, I don't remember what precise
size. But that was all, and this caused draw-commands to be duplicated
many times the way I did it, because I drew each zone separately with a
clipmask. There would have been other ways to reduce the waste, some
involving redrawing multiple zones at once in the grid system, and some
involving handling multiple bboxes at once and merging them into something
that is not a bbox.
I also had other ideas, such as making items modify the grid instead of
returning a bbox, which would greatly speed up things like diagonal lines
and perhaps pd's arrays (any item in which the bbox has a much greater
area than the item).
______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
More information about the Pd-list
mailing list