Default pixel and paint device bounds

Boudewijn Rempt boud at valdyas.org
Sun Sep 12 13:44:59 CEST 2010


On Sunday 12 September 2010, Marc wrote:
> Yesterday I fixed bug 245778 in the transform workers, though the
> problem might still appear in other places.
> Actually, the problem came from the fact that the first layer had a non
> transparent default pixel. In that case, KisPaintDevice's exactBounds
> and extent return defaultBounds (which is set to (0,0),(image width,
> image height)) : that isn't really what the transform workers expect
> when calling exactBounds.
> For now, the transform workers check whether the default pixel is
> transparent or not. If it isn't, then it uses the dataManager extent
> instead of paintDevice bounds.
> It might be good to consider changing the exactBounds() behaviour when
> default pixel is not transparent (sven wondered whether we could unite
> the default bounds with the data manager in that case).

I think that exactBounds is used in a number of different ways and that it makes sense to add a parameter to the function to manage the handling of non-transparent default pixel paint devices, something like

exactBounds(bool alwaysCalculate = false);

?

-- 
Boudewijn Rempt | http://www.valdyas.org
Ceterum censeo lapsum particulorum probae delendum esse


More information about the kimageshop mailing list