Back to project page helsinki-testbed2-android.
The source code is released under:
GNU General Public License
If you think the Android project helsinki-testbed2-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fi.testbed2.android.ui.svg; //w ww . ja va2s. co m import fi.testbed2.android.app.Logger; import fi.testbed2.util.ColorUtil; import lombok.Getter; /** * Map marker image as SVG for municipalities. */ public class MunicipalityMarkerSVG { @Getter private String xmlContent; public MunicipalityMarkerSVG(String colorHex) { double opacity = ColorUtil.getOpacityFromARGB(colorHex); String colorWithoutAlpha = ColorUtil.getColorWithoutAlpha(colorHex); int strokeWidth = 20; Logger.debug("MunicipalityMarkerSVG opacity: " + opacity); Logger.debug("MunicipalityMarkerSVG color: " + colorWithoutAlpha); xmlContent = "<?xml version=\"1.0\"?>\n" + "<svg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\">\n" + " <g>\n" + " <title>Layer 1</title>\n" + " <g id=\"Layer_1\">\n" + " <circle id=\"point_circle\" cx=\"100\" cy=\"100\" r=\"80\" stroke=\"#000000\" stroke-width=\""+strokeWidth+"\" fill=\""+colorWithoutAlpha+"\" fill-opacity=\""+opacity+"\" />\n" + " </g>\n" + " </g>\n" + "</svg>"; } }