Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
- Add ellipse tools
- Change QgsEllipse().toLineString to have closed linestring
- Loading branch information
Showing
with
1,281 additions
and 5 deletions.
- +4 −0 images/images.qrc
- +124 −0 images/themes/default/mActionEllipseCenter2Points.svg
- +120 −0 images/themes/default/mActionEllipseCenterPoint.svg
- +126 −0 images/themes/default/mActionEllipseExtent.svg
- +118 −0 images/themes/default/mActionEllipseFoci.svg
- +10 −0 src/app/CMakeLists.txt
- +67 −0 src/app/qgisapp.cpp
- +16 −0 src/app/qgisapp.h
- +118 −0 src/app/qgsmaptooladdellipse.cpp
- +56 −0 src/app/qgsmaptooladdellipse.h
- +86 −0 src/app/qgsmaptoolellipsecenter2points.cpp
- +33 −0 src/app/qgsmaptoolellipsecenter2points.h
- +68 −0 src/app/qgsmaptoolellipsecenterpoint.cpp
- +33 −0 src/app/qgsmaptoolellipsecenterpoint.h
- +68 −0 src/app/qgsmaptoolellipseextent.cpp
- +33 −0 src/app/qgsmaptoolellipseextent.h
- +86 −0 src/app/qgsmaptoolellipsefoci.cpp
- +33 −0 src/app/qgsmaptoolellipsefoci.h
- +1 −0 src/core/geometry/qgsellipse.cpp
- +80 −4 src/ui/qgisapp.ui
- +1 −1 tests/src/core/testqgsgeometry.cpp
@@ -0,0 +1,124 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<svg | ||
xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
xmlns:cc="http://creativecommons.org/ns#" | ||
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
width="24" | ||
version="1.1" | ||
id="svg4016" | ||
sodipodi:docname="mActionEllipseCenter2Points.svg" | ||
inkscape:version="0.92.1 r15371"> | ||
<metadata | ||
id="metadata4022"> | ||
<rdf:RDF> | ||
<cc:Work | ||
rdf:about=""> | ||
<dc:format>image/svg+xml</dc:format> | ||
<dc:type | ||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
<dc:title></dc:title> | ||
</cc:Work> | ||
</rdf:RDF> | ||
</metadata> | ||
<defs | ||
id="defs4020" /> | ||
<sodipodi:namedview | ||
pagecolor="#ffffff" | ||
bordercolor="#666666" | ||
borderopacity="1" | ||
objecttolerance="10" | ||
gridtolerance="10" | ||
guidetolerance="10" | ||
inkscape:pageopacity="0" | ||
inkscape:pageshadow="2" | ||
inkscape:window-width="1680" | ||
inkscape:window-height="991" | ||
id="namedview4018" | ||
showgrid="false" | ||
inkscape:zoom="31.083333" | ||
inkscape:cx="11.045195" | ||
inkscape:cy="12.41345" | ||
inkscape:window-x="0" | ||
inkscape:window-y="0" | ||
inkscape:window-maximized="1" | ||
inkscape:current-layer="svg4016" | ||
inkscape:measure-start="7.94638,12.8686" | ||
inkscape:measure-end="4.08579,12.8365" /> | ||
<linearGradient | ||
gradientUnits="userSpaceOnUse" | ||
x1="-10" | ||
x2="-10" | ||
y1="15" | ||
y2="21" | ||
id="linearGradient3996"> | ||
<stop | ||
offset="0" | ||
stop-color="#555753" | ||
id="stop3992" /> | ||
<stop | ||
offset="1" | ||
stop-color="#555753" | ||
stop-opacity="0" | ||
id="stop3994" /> | ||
</linearGradient> | ||
<g | ||
id="g4950"> | ||
<g | ||
transform="rotate(-22.793251,5.0934779,13.639832)" | ||
id="g4859"> | ||
<g | ||
id="g4938"> | ||
<ellipse | ||
ry="4.724184" | ||
rx="7.724184" | ||
style="fill:none;stroke:#8cbe8c;stroke-width:2.55163217;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | ||
cy="13.904556" | ||
cx="11.354177" | ||
id="path4032" /> | ||
<path | ||
d="M 0.89982258,12.316814 H 3.8998227 v 3 H 0.89982258 Z" | ||
id="path4012" | ||
inkscape:connector-curvature="0" | ||
style="fill:#bebebe;stroke:#8c8c8c;stroke-width:0.99999994" /> | ||
<path | ||
d="m 9.7164284,11.991888 h 3.0000006 v 3 H 9.7164284 Z" | ||
id="path4012-3" | ||
inkscape:connector-curvature="0" | ||
style="fill:#bebebe;stroke:#8c8c8c;stroke-width:0.99999994" /> | ||
<path | ||
d="m 9.6009831,7.6161834 2.9999999,-10e-8 V 10.616184 H 9.6009831 Z" | ||
id="path4012-6" | ||
inkscape:connector-curvature="0" | ||
style="fill:#bebebe;stroke:#8c8c8c;stroke-width:0.99999994" /> | ||
</g> | ||
</g> | ||
<g | ||
transform="translate(33)" | ||
id="g4004"> | ||
<rect | ||
height="11" | ||
rx="2.0114901" | ||
width="11" | ||
x="-20" | ||
y="13" | ||
id="rect3998" | ||
style="fill:#c4a000" /> | ||
<path | ||
d="m -15,14 v 2.0625 c -0.537663,0.111041 -1.024662,0.383291 -1.375,0.78125 l -1.78125,-1.03125 -0.5,0.875 1.78125,1.03125 C -16.957063,17.966182 -17,18.225145 -17,18.5 c 0,0.274855 0.04294,0.533818 0.125,0.78125 l -1.78125,1.03125 0.5,0.875 1.78125,-1.03125 c 0.352503,0.40042 0.832682,0.670182 1.375,0.78125 V 23 h 1 v -2.0625 c 0.537663,-0.111041 1.024662,-0.383291 1.375,-0.78125 l 1.78125,1.03125 0.5,-0.875 -1.78125,-1.03125 C -12.042937,19.033818 -12,18.774855 -12,18.5 c 0,-0.274855 -0.04294,-0.533818 -0.125,-0.78125 l 1.78125,-1.03125 -0.5,-0.875 -1.78125,1.03125 C -12.977503,16.44333 -13.457682,16.173568 -14,16.0625 V 14 Z m 0.5,3.5 c 0.552,0 1,0.448 1,1 0,0.552 -0.448,1 -1,1 -0.552,0 -1,-0.448 -1,-1 0,-0.552 0.448,-1 1,-1 z" | ||
id="path4000" | ||
inkscape:connector-curvature="0" | ||
style="fill:#fcffff" /> | ||
<path | ||
d="m -19,19 9,-0.0096 c 0,0 0,0 0,-2 C -10,14 -11,14 -14.5,14 c -3.5,0 -4.5,0 -4.5,3 0,2 0,2 0,2 z" | ||
id="path4002" | ||
inkscape:connector-curvature="0" | ||
style="opacity:0.3;fill:#fcffff;fill-rule:evenodd" /> | ||
</g> | ||
</g> | ||
</svg> |
@@ -0,0 +1,120 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<svg | ||
xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
xmlns:cc="http://creativecommons.org/ns#" | ||
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
width="24" | ||
version="1.1" | ||
id="svg4016" | ||
sodipodi:docname="mActionEllipseCenterPoint.svg" | ||
inkscape:version="0.92.1 r15371"> | ||
<metadata | ||
id="metadata4022"> | ||
<rdf:RDF> | ||
<cc:Work | ||
rdf:about=""> | ||
<dc:format>image/svg+xml</dc:format> | ||
<dc:type | ||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
<dc:title></dc:title> | ||
</cc:Work> | ||
</rdf:RDF> | ||
</metadata> | ||
<defs | ||
id="defs4020" /> | ||
<sodipodi:namedview | ||
pagecolor="#ffffff" | ||
bordercolor="#666666" | ||
borderopacity="1" | ||
objecttolerance="10" | ||
gridtolerance="10" | ||
guidetolerance="10" | ||
inkscape:pageopacity="0" | ||
inkscape:pageshadow="2" | ||
inkscape:window-width="1680" | ||
inkscape:window-height="991" | ||
id="namedview4018" | ||
showgrid="false" | ||
inkscape:zoom="31.083333" | ||
inkscape:cx="5.3025676" | ||
inkscape:cy="12.41345" | ||
inkscape:window-x="0" | ||
inkscape:window-y="0" | ||
inkscape:window-maximized="1" | ||
inkscape:current-layer="svg4016" | ||
inkscape:measure-start="7.94638,12.8686" | ||
inkscape:measure-end="4.08579,12.8365" /> | ||
<linearGradient | ||
gradientUnits="userSpaceOnUse" | ||
x1="-10" | ||
x2="-10" | ||
y1="15" | ||
y2="21" | ||
id="linearGradient3996"> | ||
<stop | ||
offset="0" | ||
stop-color="#555753" | ||
id="stop3992" /> | ||
<stop | ||
offset="1" | ||
stop-color="#555753" | ||
stop-opacity="0" | ||
id="stop3994" /> | ||
</linearGradient> | ||
<g | ||
id="g4859" | ||
transform="rotate(-22.793251,5.0934779,13.639832)" /> | ||
<g | ||
id="g6483"> | ||
<g | ||
transform="rotate(-0.614448,-345.87479,83.397875)" | ||
id="g6469" | ||
style=""> | ||
<ellipse | ||
ry="4.724184" | ||
rx="7.724184" | ||
style="fill:none;stroke:#8cbe8c;stroke-width:2.55163217;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | ||
cy="14" | ||
cx="11" | ||
id="path4032" /> | ||
<path | ||
d="m 18.5,6.5000001 h 3 V 9.5 h -3 z" | ||
id="path4008" | ||
inkscape:connector-curvature="0" | ||
style="fill:#bebebe;stroke:#8c8c8c;stroke-width:0.99999994" /> | ||
<path | ||
d="m 9.9340952,12.658446 h 2.9999998 v 3 H 9.9340952 Z" | ||
id="path4012" | ||
inkscape:connector-curvature="0" | ||
style="fill:#bebebe;stroke:#8c8c8c;stroke-width:0.99999994" /> | ||
</g> | ||
<g | ||
transform="translate(33)" | ||
id="g4004"> | ||
<rect | ||
height="11" | ||
rx="2.0114901" | ||
width="11" | ||
x="-20" | ||
y="13" | ||
id="rect3998" | ||
style="fill:#c4a000" /> | ||
<path | ||
d="m -15,14 v 2.0625 c -0.537663,0.111041 -1.024662,0.383291 -1.375,0.78125 l -1.78125,-1.03125 -0.5,0.875 1.78125,1.03125 C -16.957063,17.966182 -17,18.225145 -17,18.5 c 0,0.274855 0.04294,0.533818 0.125,0.78125 l -1.78125,1.03125 0.5,0.875 1.78125,-1.03125 c 0.352503,0.40042 0.832682,0.670182 1.375,0.78125 V 23 h 1 v -2.0625 c 0.537663,-0.111041 1.024662,-0.383291 1.375,-0.78125 l 1.78125,1.03125 0.5,-0.875 -1.78125,-1.03125 C -12.042937,19.033818 -12,18.774855 -12,18.5 c 0,-0.274855 -0.04294,-0.533818 -0.125,-0.78125 l 1.78125,-1.03125 -0.5,-0.875 -1.78125,1.03125 C -12.977503,16.44333 -13.457682,16.173568 -14,16.0625 V 14 Z m 0.5,3.5 c 0.552,0 1,0.448 1,1 0,0.552 -0.448,1 -1,1 -0.552,0 -1,-0.448 -1,-1 0,-0.552 0.448,-1 1,-1 z" | ||
id="path4000" | ||
inkscape:connector-curvature="0" | ||
style="fill:#fcffff" /> | ||
<path | ||
d="m -19,19 9,-0.0096 c 0,0 0,0 0,-2 C -10,14 -11,14 -14.5,14 c -3.5,0 -4.5,0 -4.5,3 0,2 0,2 0,2 z" | ||
id="path4002" | ||
inkscape:connector-curvature="0" | ||
style="opacity:0.3;fill:#fcffff;fill-rule:evenodd" /> | ||
</g> | ||
</g> | ||
</svg> |
@@ -0,0 +1,126 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<svg | ||
xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
xmlns:cc="http://creativecommons.org/ns#" | ||
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
width="24" | ||
version="1.1" | ||
id="svg4016" | ||
sodipodi:docname="mActionEllipseExtent.svg" | ||
inkscape:version="0.92.1 r15371"> | ||
<metadata | ||
id="metadata4022"> | ||
<rdf:RDF> | ||
<cc:Work | ||
rdf:about=""> | ||
<dc:format>image/svg+xml</dc:format> | ||
<dc:type | ||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
<dc:title></dc:title> | ||
</cc:Work> | ||
</rdf:RDF> | ||
</metadata> | ||
<defs | ||
id="defs4020" /> | ||
<sodipodi:namedview | ||
pagecolor="#ffffff" | ||
bordercolor="#666666" | ||
borderopacity="1" | ||
objecttolerance="10" | ||
gridtolerance="10" | ||
guidetolerance="10" | ||
inkscape:pageopacity="0" | ||
inkscape:pageshadow="2" | ||
inkscape:window-width="1680" | ||
inkscape:window-height="991" | ||
id="namedview4018" | ||
showgrid="false" | ||
inkscape:zoom="31.083333" | ||
inkscape:cx="11.045195" | ||
inkscape:cy="12.41345" | ||
inkscape:window-x="0" | ||
inkscape:window-y="0" | ||
inkscape:window-maximized="1" | ||
inkscape:current-layer="g4859" | ||
inkscape:measure-start="7.94638,12.8686" | ||
inkscape:measure-end="4.08579,12.8365" /> | ||
<linearGradient | ||
gradientUnits="userSpaceOnUse" | ||
x1="-10" | ||
x2="-10" | ||
y1="15" | ||
y2="21" | ||
id="linearGradient3996"> | ||
<stop | ||
offset="0" | ||
stop-color="#555753" | ||
id="stop3992" /> | ||
<stop | ||
offset="1" | ||
stop-color="#555753" | ||
stop-opacity="0" | ||
id="stop3994" /> | ||
</linearGradient> | ||
<g | ||
id="g4859" | ||
transform="rotate(-22.793251,5.0934779,13.639832)"> | ||
<g | ||
id="g4866"> | ||
<g | ||
id="g4852"> | ||
<rect | ||
y="7.9408765" | ||
x="2.0408766" | ||
height="12.018247" | ||
width="18.018248" | ||
id="rect4710" | ||
style="fill:none;stroke:#bebebe;stroke-width:0.08175312;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> | ||
<ellipse | ||
ry="4.724184" | ||
rx="7.724184" | ||
style="fill:none;stroke:#8cbe8c;stroke-width:2.55163217;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | ||
cy="14" | ||
cx="11" | ||
id="path4032" /> | ||
</g> | ||
<path | ||
style="fill:#bebebe;stroke:#8c8c8c;stroke-width:0.99999994" | ||
inkscape:connector-curvature="0" | ||
id="path4008" | ||
d="m 18.5,6.5000001 h 3 V 9.5 h -3 z" /> | ||
<path | ||
style="fill:#bebebe;stroke:#8c8c8c;stroke-width:0.99999994" | ||
inkscape:connector-curvature="0" | ||
id="path4012" | ||
d="M 0.49999997,18.5 H 3.5 v 3 H 0.49999997 Z" /> | ||
</g> | ||
</g> | ||
<g | ||
id="g4004" | ||
transform="translate(33)"> | ||
<rect | ||
style="fill:#c4a000" | ||
id="rect3998" | ||
y="13" | ||
x="-20" | ||
width="11" | ||
rx="2.0114901" | ||
height="11" /> | ||
<path | ||
style="fill:#fcffff" | ||
inkscape:connector-curvature="0" | ||
id="path4000" | ||
d="m -15,14 v 2.0625 c -0.537663,0.111041 -1.024662,0.383291 -1.375,0.78125 l -1.78125,-1.03125 -0.5,0.875 1.78125,1.03125 C -16.957063,17.966182 -17,18.225145 -17,18.5 c 0,0.274855 0.04294,0.533818 0.125,0.78125 l -1.78125,1.03125 0.5,0.875 1.78125,-1.03125 c 0.352503,0.40042 0.832682,0.670182 1.375,0.78125 V 23 h 1 v -2.0625 c 0.537663,-0.111041 1.024662,-0.383291 1.375,-0.78125 l 1.78125,1.03125 0.5,-0.875 -1.78125,-1.03125 C -12.042937,19.033818 -12,18.774855 -12,18.5 c 0,-0.274855 -0.04294,-0.533818 -0.125,-0.78125 l 1.78125,-1.03125 -0.5,-0.875 -1.78125,1.03125 C -12.977503,16.44333 -13.457682,16.173568 -14,16.0625 V 14 Z m 0.5,3.5 c 0.552,0 1,0.448 1,1 0,0.552 -0.448,1 -1,1 -0.552,0 -1,-0.448 -1,-1 0,-0.552 0.448,-1 1,-1 z" /> | ||
<path | ||
style="opacity:0.3;fill:#fcffff;fill-rule:evenodd" | ||
inkscape:connector-curvature="0" | ||
id="path4002" | ||
d="m -19,19 9,-0.0096 c 0,0 0,0 0,-2 C -10,14 -11,14 -14.5,14 c -3.5,0 -4.5,0 -4.5,3 0,2 0,2 0,2 z" /> | ||
</g> | ||
</svg> |
Oops, something went wrong.