mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
make QgsCompositionChecker less forgiving and readd a svg used in tests (fixes #7731)
This commit is contained in:
parent
b9fc239e1b
commit
ff7aaba323
76
images/svg/gpsicons/plane_orange.svg
Normal file
76
images/svg/gpsicons/plane_orange.svg
Normal file
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
x="0"
|
||||
y="0"
|
||||
width="109.13385"
|
||||
height="109.13385"
|
||||
id="svg602"
|
||||
xml:space="preserve"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.45"
|
||||
sodipodi:docname="plane_orange.svg"
|
||||
sodipodi:docbase="/home/gsherman/qgis_09_qml/share/qgis/svg/gpsicons"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
|
||||
id="metadata10"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs8" /><sodipodi:namedview
|
||||
inkscape:window-height="679"
|
||||
inkscape:window-width="1024"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:zoom="3.6927131"
|
||||
inkscape:cx="54.566925"
|
||||
inkscape:cy="54.566925"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:current-layer="g841" /><g
|
||||
transform="translate(1.907349e-5,1.15625)"
|
||||
style="font-size:12;"
|
||||
id="g841"><rect
|
||||
style="fill:#ff8000;fill-opacity:1;stroke:none;stroke-opacity:1"
|
||||
id="rect1309"
|
||||
width="7.9182968"
|
||||
height="86.771385"
|
||||
x="50.982937"
|
||||
y="6.1554475"
|
||||
ry="4.6036596"
|
||||
rx="4.6036596" /><path
|
||||
style="fill:#ff8000;fill-opacity:1;fill-rule:evenodd;stroke:#ff8000;stroke-width:6.09166908;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 54.942086,37.82865 L 11.143125,65.542701 L 98.74105,65.542701 L 54.942086,37.82865 z "
|
||||
id="path3061"
|
||||
sodipodi:nodetypes="cccc" /><path
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path3936"
|
||||
d="M 54.942086,79.491147 L 35.702152,91.665329 L 74.182023,91.665329 L 54.942086,79.491147 z "
|
||||
style="fill:#ff8000;fill-opacity:1;fill-rule:evenodd;stroke:#ff8000;stroke-width:2.67593813;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><rect
|
||||
rx="4.6036596"
|
||||
ry="4.6036596"
|
||||
y="45.42197"
|
||||
x="25.527399"
|
||||
height="18.258076"
|
||||
width="7.9182968"
|
||||
id="rect3938"
|
||||
style="fill:#ff8000;fill-opacity:1;stroke:#ff8000;stroke-opacity:1" /><use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect3938"
|
||||
id="use3940"
|
||||
transform="translate(50.64027,-4.017428e-7)"
|
||||
width="109.13385"
|
||||
height="109.13385"
|
||||
style="fill:#ff8000;fill-opacity:1;stroke:#ff8000;stroke-opacity:1" /></g></svg>
|
After Width: | Height: | Size: 3.0 KiB |
@ -126,7 +126,7 @@ bool QgsCompositionChecker::compareImages( const QImage& imgExpected, const QIma
|
||||
differenceImage.save( differenceImagePath, "PNG" );
|
||||
}
|
||||
|
||||
//allow pixel deviation of 1 percent
|
||||
//allow pixel deviation of 1 per mille
|
||||
int pixelCount = imageWidth * imageHeight;
|
||||
return (( double )mismatchCount / ( double )pixelCount ) < 0.01;
|
||||
return (( double )mismatchCount / ( double )pixelCount ) < 0.001;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user