« Découvrir le SVG/Éléments graphiques » : différence entre les versions

Contenu supprimé Contenu ajouté
m →‎Syntaxe générale et aspect des objets : -remarque due à un bug de Firefox
→‎Exemple complet : conversion de toutes les longueurs et coordonnées en px
Ligne 317 :
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 
<!-- taille visée : format A4 (21 cm × 29,7 cm)
<svg width="21cm" height="29.7cm" version="1.1"
avec 90 dpi, 1cm = 35.43px (arrondi à l'entier le plus proche -->
 
<svg width="21cm744" height="29.7cm1052" version="1.1"
xmlns="http://www.w3.org/2000/svg"
font-family="monospace" font-size="1312"
>
 
<!-- 1cm = 35.43px -->
 
<title> Un logigramme simple </title>
Ligne 330 ⟶ 331 :
<desc> étiquette de départ du logigramme </desc>
<rect
x="8cm283" y="1cm35"
width="5cm177" height="2cm71"
rx="2mm7" ry="2mm7"
fill="lightyellow" stroke="black" stroke-width="1px1"
/>
<text
x="10.5cm372" y="2cm71"
text-anchor="middle" >
Début
Ligne 345 ⟶ 346 :
<desc> lien entre le départ et la première action </desc>
<line
x1="10.5cm372" y1="3cm106" x2="10.5cm372" y2="5cm177"
stroke="black" stroke-width="1px1"
/>
</g>
Ligne 357 ⟶ 358 :
/>
<text
x="10.5cm372" y="6cm213"
text-anchor="middle" >
Contenu du wikilivre
Ligne 366 ⟶ 367 :
<desc> lien entre la première action et le test </desc>
<line
x1="10.5cm372" y1="7cm248" x2="10.5cm372" y2="9cm319"
stroke="black" stroke-width="1px1"
/>
</g>
Ligne 375 ⟶ 376 :
<polygon
points="283 354, 372 319, 460 354, 372 390"
fill="lightyellow" stroke="black" stroke-width="1px1"
/>
<circle
cx="13.25cm469" cy="10cm354" r="0.25cm9"
fill="lightyellow" stroke="black" stroke-width="1px1"
/>
<text
x="10.5cm372" y="10cm354"
text-anchor="middle" >
Cela vous a plu
Ligne 392 ⟶ 393 :
<polyline
points="478 354, 620 354, 620 461"
fill="none" stroke="black" stroke-width="1px1"
/>
<text x="13.7cm485" y="9.8cm347">
Faux
</text>
Ligne 402 ⟶ 403 :
<desc> lien si le résultat du test est vrai </desc>
<line
x1="10.5cm372" y1="11cm390" x2="10.5cm372" y2="13cm461"
fill="none" stroke="black" stroke-width="1px1"
/>
<text
x="10.3cm365" y="12cm425"
text-anchor="end" >
Vrai
Ligne 415 ⟶ 416 :
<desc> procédure si le wikilivre a plu </desc>
<rect
x="8cm283" y="13cm461"
width="5cm177" height="2cm71"
fill="lightyellow" stroke="black" stroke-width="1px1"
/>
<line
x1="8.5cm301" y1="13cm461" x2="8.5cm301" y2="15cm531"
stroke="black" stroke-width="1px1"
/>
<line
x1="12.5cm443" y1="13cm461" x2="12.5cm443" y2="15cm531"
stroke="black" stroke-width="1px1"
/>
<text
x="10.5cm372" y="14cm496"
text-anchor="middle" >
Féliciter l'auteur
Ligne 437 ⟶ 438 :
<desc> procédure si le wikilivre a déplu </desc>
<rect
x="15cm531" y="13cm461"
width="5cm177" height="2cm71"
fill="lightyellow" stroke="black" stroke-width="1px1"
/>
<line
x1="15.5cm549" y1="13cm461" x2="15.5cm549" y2="15cm531"
stroke="black" stroke-width="1px1"
/>
<line
x1="19.5cm691" y1="13cm461" x2="19.5cm691" y2="15cm531"
stroke="black" stroke-width="1px1"
/>
<text
text-anchor="middle" >
<tspan x="17.5cm620" y="13.7cm485"> Rédiger une </tspan>
<tspan x="17.5cm620" y="14.3cm507"> critique positive </tspan>
</text>
</g>
Ligne 459 ⟶ 460 :
<desc> lien de la procédure si le livre a plu vers la fin </desc>
<line
x1="10.5cm372" y1="15cm531" x2="10.5cm372" y2="17cm602"
fill="none" stroke="black" stroke-width="1px1"
/>
</g>
Ligne 468 ⟶ 469 :
<polyline
points="620 531, 620 567, 372 567"
fill="none" stroke="black" stroke-width="1px1"
/>
</g>
Ligne 475 ⟶ 476 :
<desc> étiquette de fin du logigramme </desc>
<rect
x="8cm283" y="17cm602"
width="5cm177" height="2cm71"
rx="2mm7" ry="2mm7"
fill="lightyellow" stroke="black" stroke-width="1px1"
/>
<text
x="10.5cm372" y="18cm638"
text-anchor="middle" >
Fin