summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Wolf <alex.v.wolf@gmail.com>2019-03-02 17:59:54 +0700
committerAlexander Wolf <alex.v.wolf@gmail.com>2019-03-02 17:59:54 +0700
commit70ce09fe5db3c5889a2a91ec3d6bf96fd81ae8cb (patch)
treec1b1ce5566061603d595948182fd0f1f0226643a
parent795e8f74ae8643374c7e410fe44336f484b97a1e (diff)
Let's try use SVG as texturesaw_svgTextureSupport
-rw-r--r--src/core/modules/MarkerMgr.cpp12
-rw-r--r--textures/asterisk.svg50
-rw-r--r--textures/circle.svg40
-rw-r--r--textures/circled-cross.svg46
-rw-r--r--textures/cross.svg40
-rw-r--r--textures/dashed-square.svg55
-rw-r--r--textures/square.svg51
7 files changed, 288 insertions, 6 deletions
diff --git a/src/core/modules/MarkerMgr.cpp b/src/core/modules/MarkerMgr.cpp
index d5bd962c57..794be192cc 100644
--- a/src/core/modules/MarkerMgr.cpp
+++ b/src/core/modules/MarkerMgr.cpp
@@ -287,25 +287,25 @@ HorizonMarker::HorizonMarker(const float az, const float alt, const float& size,
switch (markerType)
{
case SkyMarker::Cross:
- fileName = "cross.png";
+ fileName = "cross.svg";
break;
case SkyMarker::Circle:
- fileName = "neb_lrg.png";
+ fileName = "circle.svg";
break;
case SkyMarker::Ellipse:
fileName = "neb_gal_lrg.png";
break;
case SkyMarker::Square:
- fileName = "neb_dif_lrg.png";
+ fileName = "square.svg";
break;
case SkyMarker::DottedCircle:
fileName = "neb_ocl_lrg.png";
break;
case SkyMarker::CircledCross:
- fileName = "neb_gcl_lrg.png";
+ fileName = "circled-cross.svg";
break;
case SkyMarker::DashedSquare:
- fileName = "neb_drk_lrg.png";
+ fileName = "dashed-square.svg";
break;
case SkyMarker::SquaredDCircle:
fileName = "neb_ocln_lrg.png";
@@ -320,7 +320,7 @@ HorizonMarker::HorizonMarker(const float az, const float alt, const float& size,
fileName = "gear.png";
break;
}
- markerTexture = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/"+fileName);
+ markerTexture = StelApp::getInstance().getTextureManager().createTextureSvg(StelFileMgr::getInstallationDir()+"/textures/"+fileName, (int)size);
}
HorizonMarker::~HorizonMarker()
diff --git a/textures/asterisk.svg b/textures/asterisk.svg
new file mode 100644
index 0000000000..f20e2bd9ee
--- /dev/null
+++ b/textures/asterisk.svg
@@ -0,0 +1,50 @@
+<?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"
+ id="svg3802"
+ version="1.1"
+ viewBox="0 0 135.46666 135.46667"
+ height="512"
+ width="512">
+ <defs
+ id="defs3796" />
+ <metadata
+ id="metadata3799">
+ <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>
+ <g
+ transform="translate(0,-161.53332)"
+ id="layer1">
+ <text
+ id="text3875"
+ y="259.31497"
+ x="-54.522984"
+ style="font-style:normal;font-weight:normal;font-size:6.61458302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ xml:space="preserve"><tspan
+ style="stroke-width:0.26458332px"
+ y="265.16733"
+ x="-54.522984"
+ id="tspan3873"></tspan></text>
+ <g
+ id="text3898"
+ style="font-style:normal;font-weight:normal;font-size:165.98382568px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.63935328px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ aria-label="✷">
+ <path
+ id="path3900"
+ style="stroke-width:6.63935328px"
+ d="m 67.733333,166.49592 9.158288,40.60444 35.174309,-22.20682 -22.125776,35.17431 40.523396,9.23933 -40.523396,9.15829 22.125776,35.17431 -35.174309,-22.20682 -9.158288,40.60444 -9.158287,-40.60444 -35.174307,22.20682 22.125774,-35.17431 -40.5233951,-9.15829 40.5233951,-9.23933 -22.125774,-35.17431 35.174307,22.20682 z" />
+ </g>
+ </g>
+</svg>
diff --git a/textures/circle.svg b/textures/circle.svg
new file mode 100644
index 0000000000..4b7b5792f2
--- /dev/null
+++ b/textures/circle.svg
@@ -0,0 +1,40 @@
+<?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"
+ id="svg3802"
+ version="1.1"
+ viewBox="0 0 135.46666 135.46667"
+ height="512"
+ width="512">
+ <defs
+ id="defs3796" />
+ <metadata
+ id="metadata3799">
+ <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>
+ <g
+ transform="translate(0,-161.53332)"
+ id="layer1">
+ <g
+ id="text3806"
+ style="font-style:normal;font-weight:normal;font-size:166.87060547px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.67482424px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ aria-label="○">
+ <path
+ id="path3808"
+ style="stroke-width:6.67482424px"
+ d="m 40.722784,182.41577 q -27.13277,15.64412 -27.13277,46.85087 0,31.20676 27.13277,46.85088 13.444165,7.82206 26.969809,7.82206 13.607125,0 27.05129,-7.82206 27.132767,-15.64412 27.132767,-46.85088 0,-31.20675 -27.132767,-46.85087 -13.444165,-7.82206 -27.05129,-7.82206 -13.525644,0 -26.969809,7.82206 z M 35.915476,284.34698 Q 4.056879,265.93255 4.056879,229.26664 q 0,-36.6659 31.858597,-55.08033 15.888559,-9.20722 31.777117,-9.20722 15.970039,0 31.858597,9.20722 31.8586,18.41443 31.8586,55.08033 0,36.66591 -31.8586,55.08034 -15.888558,9.20722 -31.858597,9.20722 -15.888558,0 -31.777117,-9.20722 z" />
+ </g>
+ </g>
+</svg>
diff --git a/textures/circled-cross.svg b/textures/circled-cross.svg
new file mode 100644
index 0000000000..a9b40db0b4
--- /dev/null
+++ b/textures/circled-cross.svg
@@ -0,0 +1,46 @@
+<?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"
+ id="svg3802"
+ version="1.1"
+ viewBox="0 0 135.46666 135.46667"
+ height="512"
+ width="512">
+ <defs
+ id="defs3796" />
+ <metadata
+ id="metadata3799">
+ <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>
+ <g
+ transform="translate(0,-161.53332)"
+ id="layer1">
+ <path
+ id="text3866"
+ transform="matrix(0.26458333,0,0,0.26458333,0,161.53332)"
+ d="M 255.85156 22.828125 C 217.43274 22.828125 179.01452 33.959444 140.5957 56.222656 C 63.561049 100.74908 25.042969 167.34119 25.042969 256 C 25.042969 344.65881 63.561049 411.25092 140.5957 455.77734 C 179.01452 478.04056 217.43274 489.17188 255.85156 489.17188 C 294.4674 489.17188 332.98548 478.04056 371.4043 455.77734 C 448.43895 411.25092 486.95703 344.65881 486.95703 256 C 486.95703 167.34119 448.43895 100.74908 371.4043 56.222656 C 332.98548 33.959444 294.4674 22.828125 255.85156 22.828125 z M 228.99805 59.833984 L 228.99805 228.67578 L 61.148438 228.67578 C 68.303504 166.72174 100.59701 119.18555 158.03125 86.070312 C 181.63442 72.337558 205.29101 63.595831 228.99805 59.833984 z M 283.00195 59.857422 C 306.76057 63.632738 330.41696 72.367452 353.96875 86.070312 C 411.40299 119.18555 443.6965 166.72174 450.85156 228.67578 L 283.00195 228.67578 L 283.00195 59.857422 z M 61.148438 283.32422 L 228.99805 283.32422 L 228.99805 452.16602 C 205.29101 448.40417 181.63442 439.66244 158.03125 425.92969 C 100.59701 392.81445 68.303504 345.27826 61.148438 283.32422 z M 283.00195 283.32422 L 450.85156 283.32422 C 443.6965 345.27826 411.40299 392.81445 353.96875 425.92969 C 330.41696 439.63255 306.76057 448.36726 283.00195 452.14258 L 283.00195 283.32422 z "
+ style="font-style:normal;font-weight:normal;font-size:160.13751221px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:24.20976448px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <text
+ id="text3875"
+ y="259.31497"
+ x="-54.522984"
+ style="font-style:normal;font-weight:normal;font-size:6.61458302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ xml:space="preserve"><tspan
+ style="stroke-width:0.26458332px"
+ y="265.16733"
+ x="-54.522984"
+ id="tspan3873"></tspan></text>
+ </g>
+</svg>
diff --git a/textures/cross.svg b/textures/cross.svg
new file mode 100644
index 0000000000..257b7bd3a3
--- /dev/null
+++ b/textures/cross.svg
@@ -0,0 +1,40 @@
+<?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"
+ id="svg3802"
+ version="1.1"
+ viewBox="0 0 135.46666 135.46667"
+ height="512"
+ width="512">
+ <defs
+ id="defs3796" />
+ <metadata
+ id="metadata3799">
+ <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>
+ <g
+ transform="translate(0,-161.53332)"
+ id="layer1">
+ <g
+ id="text3840"
+ style="font-style:normal;font-weight:normal;font-size:195.33273315px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:7.81330872px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ aria-label="+">
+ <path
+ id="path3842"
+ style="stroke-width:7.81330872px"
+ d="m 75.745027,168.03443 v 53.12517 h 53.125163 v 16.21414 H 75.745027 V 290.4989 H 59.721639 V 237.37374 H 6.5964765 V 221.1596 H 59.721639 v -53.12517 z" />
+ </g>
+ </g>
+</svg>
diff --git a/textures/dashed-square.svg b/textures/dashed-square.svg
new file mode 100644
index 0000000000..b9b0c63e55
--- /dev/null
+++ b/textures/dashed-square.svg
@@ -0,0 +1,55 @@
+<?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"
+ id="svg3802"
+ version="1.1"
+ viewBox="0 0 135.46666 135.46667"
+ height="512"
+ width="512">
+ <defs
+ id="defs3796" />
+ <metadata
+ id="metadata3799">
+ <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>
+ <g
+ transform="translate(0,-161.53332)"
+ id="layer1">
+ <text
+ id="text3875"
+ y="259.31497"
+ x="-54.522984"
+ style="font-style:normal;font-weight:normal;font-size:6.61458302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ xml:space="preserve"><tspan
+ style="stroke-width:0.26458332px"
+ y="265.16733"
+ x="-54.522984"
+ id="tspan3873"></tspan></text>
+ <g
+ id="text3954"
+ style="font-style:normal;font-weight:normal;font-size:164.50453186px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.58018112px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ aria-label="▢">
+ <path
+ id="path4015"
+ style="stroke-width:6.58018112px"
+ d="m 14.116744,264.77006 q 0,18.31399 18.313981,18.31399 h 70.605215 q 18.31398,0 18.31398,-18.31399 v -71.00683 q 0,-18.31399 -18.31398,-18.31399 H 32.430725 q -18.313981,0 -18.313981,18.31399 z m -9.1569904,0 v -71.00683 q 0,-27.47098 27.4709714,-27.47098 h 70.605215 q 27.47097,0 27.47097,27.47098 v 71.00683 q 0,27.47098 -27.47097,27.47098 H 32.430725 q -27.4709714,0 -27.4709714,-27.47098 z" />
+ </g>
+ <path
+ transform="rotate(90)"
+ d="m 212.5623,-143.77151 h 33.40869 V 8.3048401 H 212.5623 Z m -59.33383,92.742522 v -33.408691 h 152.07635 v 33.408691 z"
+ style="fill:#ffffff;stroke:none;stroke-width:0.26458332"
+ id="rect3975-6" />
+ </g>
+</svg>
diff --git a/textures/square.svg b/textures/square.svg
new file mode 100644
index 0000000000..4a3be2e9f2
--- /dev/null
+++ b/textures/square.svg
@@ -0,0 +1,51 @@
+<?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"
+ id="svg3802"
+ version="1.1"
+ viewBox="0 0 135.46666 135.46667"
+ height="512"
+ width="512">
+ <defs
+ id="defs3796" />
+ <metadata
+ id="metadata3799">
+ <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>
+ <g
+ transform="translate(0,-161.53332)"
+ id="layer1">
+ <text
+ id="text3875"
+ y="259.31497"
+ x="-54.522984"
+ style="font-style:normal;font-weight:normal;font-size:6.61458302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ xml:space="preserve"><tspan
+ style="stroke-width:0.26458332px"
+ y="265.16733"
+ x="-54.522984"
+ id="tspan3873"></tspan></text>
+ <text
+ id="text3954"
+ y="271.99927"
+ x="-9.9805994"
+ style="font-style:normal;font-weight:normal;font-size:164.50453186px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.58018112px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ xml:space="preserve"><tspan
+ style="stroke-width:6.58018112px"
+ y="271.99927"
+ x="-9.9805994"
+ id="tspan3952">▢</tspan></text>
+ </g>
+</svg>