[trunk] SVG images 'printed' twice on PDF 1st page and never on following pages

• Feb 13, 2012 - 14:27
S4 - Minor

Context: rev. 5316, latest Qt SDK (Qt lib 4.7.4) under Win XP and Ubuntu 11.10

1) load or create a score with an embedded SVG image in the first page AND in one of the following pages (a small sample score is attached)
2) export the score to PDF

A) the image in the first page is 'printed' twice, once regularly and once as a very (very!!) small raster image near the top left corner of the previous occurrence; this raster image appears no larger than a dot, but by appropriate zooming appears as a second copy of the SVG image;

B) SVG images on pages after the first are not 'printed'.

A sample PDF generated from the sample score is also attached.


Issue A) occurs because in SvgImage::draw() (file libmscore/image.cpp, line 252) canvasPos() is used instead of pagePos(): as each page is generated, the x coord of canvasPos() increases and on following pages image as generated 'off page'.

Issue B) occurs because, after 'printing' the SVG image in lines 252-254, execution continues at line 267, where the image is printed again as a raster image.

The attached patch corrects both points; a sample PDF generated after applying the patch is also attached.




La exportación de fragmentos musicales a Word, por ejemplo, -y sin perder la calidad- es muy importante para los autores musicales.