On Tue, 2014-02-11 at 11:19 -0800, mathog wrote:
On 11-Feb-2014 10:44, mathog wrote:
Hmm, "save as" operations that go through cairo never enter SPImage::print, and do output correctly. Now to find where those are going and compare the code in the two.
The only other file type that goes through SPImage::print is LaTEX.
And LaTeX doesn't handle images at all... so I can't use LaTeX output to test changes to SPImage::print.
Cairo seems to ignore this aspect stuff totally.
? I don't understand what you mean here. AFAICT Cairo (both interactive and cairo-renderer) is doing the correct thing.
I think what is happening here is that before the recent work on aspect the value of this->aspect_align in this method was always 0, so no attempt was made to handle the aspect issue. Now that that value is no longer 0 EMF,WMF, and LaTEX output is going through the other section, which does try to handle aspect, but apparently never worked. Inkscape's current handling of preserveAspectRatio (interactively) is that it forces the _entire_ image to be inscribed in one manner or another into a rectangle. Depending on the mode, the alignment within that rectangle changes.
Yes, this is correct and is according to the SVG 1.1 spec.
The current code in SPImage::print is not doing that at all, it is moving a subpixel array around inside the full image.
Oh well, at least I see where and what the problem is now.
Out file output system is a complete mess. It's hard to figure out what is outputting what. And the lack of comments in the code isn't very helpful.
Tav