Multilingual Wiki Documentation

You are currently using syntax.
In an attempt to improve PlantUML documentation...
Please do not use this website for your own diagrams.
You can click here and use the online server here for your own documentation.

Wiki Toc    Recent changes    View page history    Add new chapter    Reorder page    Raw


Scalable Vector Graphics

SVG est un format graphique qui est vectoriel. Cela signifie que si vous zoomez une image, vous avez toujours une bonne qualité d'image. Ce format donne de bon résultat lors de l'impression.

Vous pouvez activez la génération SVG à l'aide de l'option -tsvg sur la ligne de commande.

Vous pouvez aussi utiliser format="svg" lors de la définition d'une tâche Ant.

<target name="main">
  <plantuml dir="./src" format="svg" />
</target>

Il est aussi possible de générer du SVG depuis un appel de code Java.

Scalable Vector Graphics

SVG is a graphical format which is scalable. It means that when you zoom an image, you don't lose quality. So this format gives good printing result.

You can enable SVG generation by using -tsvg flag with the command line.

You can also use format="svg" in the Ant task definition.

<target name="main">
  <plantuml dir="./src" format="svg" />
</target>

You can also generate SVG directly from Java.

Paramètres SkinParameter

Vous pouvez changer la valeur target dans le SVG généré grâce au paramètre svgLinkTarget.

@startuml
skinparam svgLinkTarget _parent
start
:[[http://plantuml.com]];
stop
@enduml

Il y a aussi un paramètre spécifique pour changer la couleur lorsque le pointeur de la souris survole les liens:

@startuml
skinparam pathHoverColor green
class Foo2 [[http://www.yahoo.com/Foo2]] {
  +double[] x
  +double y
}
Foo2 --> Foo3
@enduml

*[Ref. [QA-7334](https://forum.plantuml.net/7334)]*

WARNING
 This translation need to be updated. 
WARNING

Specific SkinParameter for SVG

svgLinkTarget

You can change the target value in the generated SVG with the svgLinkTarget setting.

According to the HTML specification, you can choose:
  • _blank
  • _parent
  • _self
  • _top (by default, if svgLinkTarget is empty)

@startuml
skinparam svgLinkTarget _parent
start
:[[http://plantuml.com]];
stop
@enduml

pathHoverColor

There is also a setting skinparam pathHoverColor to specify a color change when the mouse pointer goes hover some links.

@startuml
skinparam pathHoverColor green
class Foo2 [[http://www.yahoo.com/Foo2]] {
  +double[] x
  +double y
}
Foo2 --> Foo3
@enduml

[Ref. QA-5453]

svgDimensionStyle

If you does not want to have the attribut style, width and height on the header of the SVG output, you can set skinparam svgDimensionStyle false.

@startuml
skinparam svgDimensionStyle false

component a {
}
component b {
}
a -(0- b
@enduml

[Ref. QA-7334]

Specific Pragma for SVG

svgSize

This directive !pragma svgSize <U+hhhhh> XX tells to PlantUML: "assume that the size of <U+hhhhh> is the same as 'XX' "

You can play with this directive:

  • !pragma svgSize <U+hhhhh> XX
  • !pragma svgSize <U+hhhhh> I

to find the best setting.

@startuml
!pragma svgSize <U+1F610> XX

test: text <U+1F610>
test_size45: text <size:45><U+1F610>
@enduml

[Ref. QA-12550]


Please report any bugs to plantuml@gmail.com or here.
This website is still in beta testing.