.examples

git-svn-id: svn://ultimatepp.org/upp/trunk@12814 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-03-07 09:44:08 +00:00
parent 0d65076a3c
commit 3e2b9a171a
4 changed files with 31 additions and 0 deletions

View file

@ -16,6 +16,8 @@ file
svg\anne.svg,
svg\tux.svg,
svg\rg1024_Presentation_with_girl.svg,
svg\symbol.svg,
svg\idtest.svg,
svg\yinyang.svg;
mainconfig

View file

@ -91,6 +91,11 @@ bool SvgView::Key(dword key, int)
DoDir();
return true;
}
if(key == K_F5) {
dir = GetDataFile("svg");
LoadDir();
return true;
}
return false;
}

View file

@ -0,0 +1,5 @@
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
<circle id="myCircle" cx="5" cy="5" r="4"/>
<use href="#myCircle" x="10" fill="blue"/>
<use href="#myCircle" x="20" fill="white" stroke="blue"/>
</svg>

After

Width:  |  Height:  |  Size: 224 B

View file

@ -0,0 +1,19 @@
<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol -->
<svg viewBox="0 0 80 20" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Our symbol in its own coordinate system -->
<symbol id="myDot" width="10" height="10" viewBox="0 0 2 2">
<circle cx="1" cy="1" r="1" />
</symbol>
<!-- A grid to materialized our symbol positionning -->
<path d="M0,10 h80 M10,0 v20 M25,0 v20 M40,0 v20 M55,0 v20 M70,0 v20" fill="none" stroke="pink" />
<!-- All instances of our symbol -->
<use xlink:href="#myDot" x="5" y="5" style="opacity:1.0" />
<use xlink:href="#myDot" x="20" y="5" style="opacity:0.8" />
<use xlink:href="#myDot" x="35" y="5" style="opacity:0.6" />
<use xlink:href="#myDot" x="50" y="5" style="opacity:0.4" />
<use xlink:href="#myDot" x="65" y="5" style="opacity:0.2" />
</svg>

After

Width:  |  Height:  |  Size: 899 B