Pixplicity / sharp

Scalable vector graphics for Android
Apache License 2.0
1.03k stars 117 forks source link

Problem with gradients #26

Open glorko opened 8 years ago

glorko commented 8 years ago

Gradients in a simple example do not work. The lines and fugures from this snippet do not show a gradient:

private String testingLines = "<svg xmlns=\"http://www.w3.org/2000/svg\"\n" +
        "     xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" +
        "\n" +
        "  <defs>\n" +
        "    <linearGradient id=\"myLinearGradient1\"\n" +
        "                    x1=\"0%\" y1=\"0%\"\n" +
        "                    x2=\"0%\" y2=\"100%\"\n" +
        "                    spreadMethod=\"pad\">\n" +
        "      <stop offset=\"0%\"   stop-color=\"#00cc00\" stop-opacity=\"1\"/>\n" +
        "      <stop offset=\"100%\" stop-color=\"#006600\" stop-opacity=\"1\"/>\n" +
        "    </linearGradient>\n" +
        "  </defs>\n" +
        "\n" +
        "  <rect x=\"10\" y=\"10\" width=\"75\" height=\"100\" rx=\"10\" ry=\"10\"\n" +
        "     style=\"fill:url(#myLinearGradient1);\n" +
        "            stroke: #005000;\n" +
        "            stroke-width: 3;\" />\n" +
        "\n" +
        "</svg>";
vivekjoyride commented 1 year ago

any have find solution regarding this?