mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
FlatSVGIcon: some additions to PR #817:
- create new `LinearGradientPaint` only if color has changed - preserve old `LinearGradientPaint.colorSpace` and `transform`
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
The SVG icons in this folder are from JSVG,
|
||||
which is licensed under the MIT License
|
||||
See: https://github.com/weisJ/jsvg
|
||||
@@ -0,0 +1,12 @@
|
||||
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"
|
||||
stroke="none">
|
||||
<defs>
|
||||
<linearGradient id="myGradient"
|
||||
gradientTransform="rotate(90)">
|
||||
<stop offset="5%" stop-color="gold" />
|
||||
<stop offset="95%" stop-color="red" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="0" y="50" width="100" height="40" fill="url(#myGradient)" />
|
||||
<text x="0" y="50" fill="url(#myGradient)">Hello lovely World!</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 417 B |
@@ -0,0 +1,14 @@
|
||||
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"
|
||||
stroke="none">
|
||||
<defs>
|
||||
<linearGradient id="myGradient">
|
||||
<stop offset="5%" stop-color="gold" />
|
||||
<stop offset="95%" stop-color="red" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<text x="0" y="50">
|
||||
Hello
|
||||
<tspan fill="url(#myGradient)">lovely</tspan>
|
||||
World!
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 336 B |
@@ -0,0 +1,14 @@
|
||||
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"
|
||||
stroke="none">
|
||||
<defs>
|
||||
<linearGradient id="myGradient">
|
||||
<stop offset="5%" stop-color="gold" />
|
||||
<stop offset="95%" stop-color="red" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<text x="0" y="50" fill="url(#myGradient)">
|
||||
Hello
|
||||
<tspan>lovely</tspan>
|
||||
World!
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 336 B |
@@ -0,0 +1,23 @@
|
||||
<svg width="120" height="240" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient id="Gradient1"
|
||||
gradientUnits="objectBoundingBox">
|
||||
<stop offset="0%" stop-color="red" />
|
||||
<stop offset="50%" stop-color="black" stop-opacity="0" />
|
||||
<stop offset="100%" stop-color="blue" />
|
||||
</linearGradient>
|
||||
<linearGradient id="Gradient2" x1="0" x2="0" y1="0"
|
||||
y2="1">
|
||||
<stop offset="0%" stop-color="red" />
|
||||
<stop offset="50%" stop-color="black" stop-opacity="0" />
|
||||
<stop offset="100%" stop-color="blue" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<rect id="rect1" x="10" y="10" rx="15" ry="15" width="100"
|
||||
height="100" fill="url(#Gradient1)" />
|
||||
<rect x="10" y="120" rx="15" ry="15" width="100" height="100"
|
||||
fill="url(#Gradient2)" />
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 767 B |
@@ -0,0 +1,27 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500px" height="500px">
|
||||
<defs>
|
||||
<linearGradient id="stripes">
|
||||
<stop offset="0%" stop-color="red" />
|
||||
<stop offset="10%" stop-color="red" />
|
||||
<stop offset="10%" stop-color="orange" />
|
||||
<stop offset="20%" stop-color="orange" />
|
||||
<stop offset="20%" stop-color="yellow" />
|
||||
<stop offset="30%" stop-color="yellow" />
|
||||
<stop offset="30%" stop-color="lightgreen" />
|
||||
<stop offset="40%" stop-color="lightgreen" />
|
||||
<stop offset="40%" stop-color="green" />
|
||||
<stop offset="50%" stop-color="green" />
|
||||
<stop offset="50%" stop-color="purple" />
|
||||
<stop offset="60%" stop-color="purple" />
|
||||
<stop offset="60%" stop-color="blue" />
|
||||
<stop offset="70%" stop-color="blue" />
|
||||
<stop offset="70%" stop-color="skyblue" />
|
||||
<stop offset="80%" stop-color="skyblue" />
|
||||
<stop offset="80%" stop-color="pink" />
|
||||
<stop offset="90%" stop-color="pink" />
|
||||
<stop offset="90%" stop-color="white" />
|
||||
<stop offset="100%" stop-color="white" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="url(#stripes)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user