I'm exporting svg file from figma, flutter have errors:
Failed to find definition for url(#pattern0)
Failed to find definition for url(#pattern1)
Full text of error:
The following assertion was thrown while parsing AssetBundlePictureKey(bundle: PlatformAssetBundle#41f97(), name: "assets/images/select-image.svg", colorFilter: null, theme: SvgTheme(currentColor: Color(0xff000000), fontSize: 14.0, xHeight: 7.0)) in _getDefinitionPaint:
Failed to find definition for url(#pattern1)
This library only supports and xlink:href references that are defined ahead of their references.
This error can be caused when the desired definition is defined after the element referring to it (e.g. at the end of the file), or defined in another file.
This error is treated as non-fatal, but your SVG file will likely not render as intended
My svg filу
<svg width="26" height="27" viewBox="0 0 26 27" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<image id="image0_133_96" width="100" height="100" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAJlUlEQVR4nO2de4wdVRnAf/fu3m3tg7YWulpapUQoFYtEWhEqVgoGfEQUTLAQ0AaigkGI1hhjRIMvUFPEGF8UBCP6h68gfyAoBRV5WaThIe22VdrVUlgobek+2+36xze3PfOdeZy5M/fubO75JSe5c+ebb858Z843533A4/F4PB6Px+PxeMrBQuA64DFgJzAEbAbuBD4TnC+aI4FPAL8BNgH9wC5gA/Bt4MSc+mvA+cDPgX8B+wL9TwDXAyfk1K95PXA58GugB7HhTsSm1wHHuyg5AlgLHADGUsJmYA1wFvKwjXIKcCswmHK/UeCXwLyM+qcAVwHbHPT/DOjO8SxvAK4B/hboS7rffuCnwPQ4Zccgb05aQkSF3cibcBlwtEPEu4CLgIcauNde4LOBjiTmANcCL2TUvwu4Euh0eI4qsBT4KvAP4GADz/MMYvsQM4FnG1AWF55E3Mx5hN/oRcDXkayb9x49wEeRHFCnBiwHbiE9x7kY6iPAawz9FeA44GIkVxfxHGNIRphhJshtEUKPAxciWXgKsAy4GvHx+zLecCfwPwe55xD/ehqSlV8bGD0p5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xql7xsg4690sfcWkhOlG9nZ+W7stcyzhr1IjolzCTOAz5G+uXBceBlpo4t7ng7gA8hWeC6bMieFjcB3ka7vJBdXQ3b2NK89gLGqhj45hqx5shJ5g6chSwB+CelydN08sh5eDEKSzLPB/WYjq2kvR/YjdNl9s89B/5PItqd1/cuQfXldWhv2Yhd+0sIeZMPmq4N7TQ1suZLoXL7WTLEZNL5TtA6vAr9D3solhJfSnglcgt2WkzUcQPz7eYT7b2YizRI9BTxHH+K+Tgl0dyAVt0uRbbeLbDZ6hoi+kWOw6ySuYTPwPWRwnUulsoYkmKuvNt/UNah2nwL1jyEFhUtwW6LqRMSd/gm769s1PE3CuKzpwE9I3wv2IPAI8EXs1YSy0I24yzTfvQP4AtlnCLvqH0C+m3nmxUwFPgj8ENmPMC0h9gM/QvXQxg29PB7ZXedcJPVmIVl0A3AP8jF3WSjTlYVIMfOc4H6Tgvs9DtwF3Inb6hJZ9Pci35V7gd+TPMKmERYhHmMFkpPmI5OjnkNseAd+oR+Px+PxeDwej8dTAv4P5HBDMaa2KGcAAAAASUVORK5CYII="/>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_133_96" transform="translate(-0.0142405) scale(0.0102848 0.01)"/>
</pattern>
<pattern id="pattern1" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_133_96" transform="translate(-0.0142405) scale(0.0102848 0.01)"/>
</pattern>
</defs>
<mask id="mask0_133_96" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="26" height="27">
<rect y="0.333344" width="25.28" height="26" fill="url(#pattern0)"/>
</mask>
<g mask="url(#mask0_133_96)">
<rect y="0.333344" width="25.28" height="26" fill="url(#pattern1)"/>
<rect y="0.333344" width="25.28" height="26" fill="#9A9EAA"/>
</g>
Where is my error?
I solved my problem, I converted image from figma to png to svg
Related
We need a help to execute the maps in jasper report
We have used below command which is working fine in 6.2.0 (10/6/2018).
Now it is stop to display map and getting error. Hence we added map.key to resolve and also experimented with latest map component, but not able get map as previously.
Could you please help us to resolve this issue.
Thank you
Map key data
<property name="net.sf.jasperreports.components.map.key" value="AIzaSy**********5w"/>
<property name="net.sf.jasperreports.components.map.version" value="3"/>
map component added in summary
<componentElement>
<reportElement x="0" y="0" width="572" height="680" uuid="d66b99c0-0651-47f0-954f-90fc23b4a344">
<printWhenExpression><![CDATA[$F{row_num}!= null]]></printWhenExpression>
</reportElement>
<c:map xmlns:c="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" evaluationTime="Band" mapType="hybrid">
<c:latitudeExpression><![CDATA[Float.parseFloat($F{center_lat})]]></c:latitudeExpression>
<c:longitudeExpression><![CDATA[Float.parseFloat($F{center_lng})]]></c:longitudeExpression>
<c:zoomExpression><![CDATA[Integer.parseInt($P{ZOOM})]]></c:zoomExpression>
<c:markerData>
<dataset/>
<c:item>
<c:itemProperty name="latitude">
<valueExpression><![CDATA[Float.parseFloat($F{latitude})]]></valueExpression>
</c:itemProperty>
<c:itemProperty name="longitude">
<valueExpression><![CDATA[Float.parseFloat($F{longitude})]]></valueExpression>
</c:itemProperty>
<c:itemProperty name="label">
<valueExpression><![CDATA[$F{row_num}]]></valueExpression>
</c:itemProperty>
</c:item>
</c:markerData>
</c:map>
</componentElement>
I am new here and facing problem while adjusting my exported svg file from Illustrator. I am trying to make it clickable (to link e-mail and Social Media Icons) but I am still not there. To linked yet. Can you please help me, to find the mistake? I know, it would be much more easier to code it by myself, although I am new and don't have enough experience for doing it. Thank you very much!
Sending the code, see mostly the end where are the slices I marked in the img in Illustrator and have to link.
Thanks a bunch!
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 850.4 566.9" style="enable-background:new 0 0 850.4 566.9;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;}
</style>
<rect id="_x3C_Slice_x3E_"><a xlink:href="https://www.xxxs.com/">x="423" y="237.9" class="st0" width="253" height="32"</a>/></rect>
<rect id="_x3C_Slice_x3E__1_"><a xlink:href="https://www.xxxx.com/">x="152" y="392.9" class="st0" width="271" height="29"</a>/></rect>
<rect id="_x3C_Slice_x3E__2_"><a xlink:href="https://www.xxxx/">x="580" y="295.9" class="st0" width="29" height="23"</a>/></rect>
<rect id="_x3C_Slice_x3E__3_"><a xlink:href="https://xxxx/">x="609" y="295.9" class="st0" width="20" height="23"</a>/></rect>
<rect id="_x3C_Slice_x3E__4_"><a xlink:href="https://xxx/">x="629" y="295.9" class="st0" width="25" height="23"</a>/></rect>
The <a> should go round the <rect> I changed the fill as well, otherwise all your rect elements are invisible.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 850.4 566.9" style="enable-background:new 0 0 850.4 566.9;" xml:space="preserve">
<style type="text/css">
.st0{fill:blue;}
</style>
<a xlink:href="https://www.xxxs.com/"><rect id="_x3C_Slice_x3E_" x="423" y="237.9" class="st0" width="253" height="32"/></a>
<a xlink:href="https://www.xxxx.com/"><rect id="_x3C_Slice_x3E__1_" x="152" y="392.9" class="st0" width="271" height="29"/></a>
<a xlink:href="https://www.xxxx/"><rect id="_x3C_Slice_x3E__2_" x="580" y="295.9" class="st0" width="29" height="23"/></a>
<a xlink:href="https://xxxx/"><rect id="_x3C_Slice_x3E__3_" x="609" y="295.9" class="st0" width="20" height="23"/></a>
<a xlink:href="https://xxx/"><rect id="_x3C_Slice_x3E__4_" x="629" y="295.9" class="st0" width="25" height="23"/></a>
Can we be more precise of target build?
I would like to know if we can customize a build type text of Jenkins. Most of the project have a table format instead
.svg source
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="20">
<linearGradient id="a" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<rect rx="3" width="90" height="20" fill="#555"/>
<rect rx="3" x="37" width="53" height="20" fill="#4c1"/>
<path fill="#4c1" d="M37 0h4v20h-4z"/>
<rect rx="3" width="90" height="20" fill="url(#a)"/>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="19.5" y="15" fill="#010101" fill-opacity=".3">build</text>
<text x="19.5" y="14">build</text>
<text x="62.5" y="15" fill="#010101" fill-opacity=".3">passing</text>
<text x="62.5" y="14">passing</text>
</g>
</svg>
I use iReport 5.5.0. How to center align a barcode component?
Relevant fragment of my jrxml is below.
<componentElement>
<reportElement x="0" y="9" width="113" height="36" uuid="a11badb4-7c31-4011-83ae-f287b457939a"/>
<jr:Code128 xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" textPosition="bottom">
<jr:codeExpression><![CDATA[$F{number}]]></jr:codeExpression>
</jr:Code128>
</componentElement>
Create a style, let's call it "Barcode", like:
<style name="Barcode" fontName="Helvetica" fontSize="10" hAlign="Center" vAlign="Middle"/>
and set the style property of your barcode element to "Barcode".
Please look at the attached example.
It works fine everywhere (including Android) but in iOS 5.1.1 (both iPhone / iPad) Safari.
If you test it there you'll see that the linear gradient is not repeated at all as it appears everywhere else.
Is that a bug of ios safari or is there something wrong on my svg?
<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:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="150"
height="150"
id="svg5262"
onload="anim();">
<defs
id="defs5264">
<linearGradient
x1="0"
y1="0"
x2="-8"
y2="8"
id="linearGradient5260"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,0)"
spreadMethod="repeat">
<stop
id="stop5216"
style="stop-color:#ff0000;stop-opacity:1"
offset="0" />
<stop
id="stop5218"
style="stop-color:#7f0000;stop-opacity:1"
offset="1" />
</linearGradient>
</defs>
<script language="javascript">
var x=0;
function anim(){
var gr = document.getElementById("linearGradient5260");
gr.setAttribute("gradientTransform", "translate(" + x + ", 0)");
x++;
if (x>15) x=0;
setTimeout(anim, 50);
}
</script>
<g
id="layer1">
<path
d="M 20,140 L 20,20 140,20"
style="fill:none;stroke:black;stroke-width:12;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="M 20,140 L 20,20 140,20"
id="path2985"
style="fill:none;stroke:url(#linearGradient5260);stroke-width:10;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>
This is a bug. It has been confirmed to me by Apple (bug id #10171198 at http://bugreport.apple.com)
#Iviggiani It seems that the spreadMethod attribute of the linearGradient tag is being ignored on the iPad (both Safari and Chrome in my tests). Using both the SVG linearGreadient and pattern tags, I was able to create the same effect that I was getting with just the linearGradient tag, with the benefit that it works on both a windows machine and the iPad. I got the idea from this site https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Patterns
Here is an example of what I did (jsFiddle here: http://jsfiddle.net/wahoodoss/eG5Tx/):
<!DOCTYPE html>
<html>
<body>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<svg id="abc" width="200" height="200" xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<linearGradient id="Gradient1">
x1="0%" y1="0%" x2="0%" y2="100%"
<stop offset="40%" stop-color="white" stop-opacity="1"/>
<stop offset="100%" stop-color="#00AA00" stop-opacity="1"/>
</linearGradient>
<pattern id="Pattern" x="0" y="0" width="5" height="5"
patternTransform="rotate(90 0 0)" patternUnits="userSpaceOnUse">
<rect x="0" y="0" width="5" height="5" fill="url(#Gradient1)"/>
</pattern>
</defs>
</svg>
<script>
var arc = d3.svg.arc()
.innerRadius(40).outerRadius(100)
.startAngle(20 * 3.141 / 180)
.endAngle(120 * 3.141 / 180);
var chart = d3.select("#abc")
.attr("class", "chart")
.attr("width", 420)
.attr("height", 420);
chart.append("svg:rect")
.style("fill","url(#Pattern)")
.style("stroke", "black")
.attr("x", 20).attr("y",20).attr("width",120).attr("height",120);
</script>
</body>
</html>