
On 12-Feb-2014 11:42, Tavmjong Bah wrote:
On Tue, 2014-02-11 at 11:19 -0800, mathog wrote:
On 11-Feb-2014 10:44, mathog wrote:
And LaTeX doesn't handle images at all... so I can't use LaTeX output to test changes to SPImage::print.
Which in this case has the upside that my changes could not have broken it!
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 didn't say that well.
Class SPImage carries these 4 values around:
double sx, sy; double ox, oy;
These values already reflect the preserveAspectRatio settings when the image gets into SPImage::Print. So there is no need to put in cases for all the preserveAspectRatio settings in the print output because they have already been handled appropriately. Cairo doesn't use these 4 values, instead it calls calculatePreserveAspectRatio() during the output phase in sp_image_render() in cairo-renderer.cpp. In other words, it reinvents the wheel and repeats the aspect calculation. (I just checked this in the debugger for PDF output.)
I think these 4 values are being set in SPViewBox::apply_viewbox(). Unless there is some execution path that bypasses that method, a possibility that at this point I have no way of excluding, no other section of the code should need to explicitly look at this->aspect_align.
Our 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.
Yup.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech