In an attempt to improve PlantUML documentation...
Wiki Toc View page history Add new chapter Reorder page Raw
![]() |
![]() |
||||
スケーラブル・ベクタ・グラフィックス |
Scalable Vector Graphics |
||||
|
|||||
スケーラブル・ベクタ・グラフィックス(SVG )は、そのスケーラビリティで有名な グラフィカル・フォーマットであり、あなたのダイアグラムがどのようなズーム・レ ベルでもその品質を維持することを保証し、最適な印刷結果を提供します。このガイドでは、PlantUML で SVG 生成を有効にする方法を掘り下げ、SVG 出力 を強化するさまざまな設定やディレクティブを探ります。
PlantUML は、SVG 生成を有効にするための複数の手段を提供し、それぞれが異なる 環境に対応しています。
コマンドラインPlantUML コマンドラインで-tsvg フラグを利用し、SVG 生成を有効にします。
AntタスクAntタスク定義にformat="svg" 設定を組み込み、SVG生成を容易にします。詳しくはAntタスクガイドをご覧ください。
JavaJavaから直接SVGを生成することもできます。JavaのAPIガイドで設定方法をご覧ください。 |
Scalable Vector Graphics (SVG) is a graphical format renowned for its scalability, ensuring that your diagrams maintain their quality at any zoom level, providing an optimal printing result. In this guide, we delve into how you can enable SVG generation with PlantUML, exploring various settings and directives that enhance your SVG output.
PlantUML offers multiple avenues to enable SVG generation, each catering to different environments. Here, we outline the methods available:
Command LineUtilize the-tsvg flag with the PlantUML command line to enable SVG generation. Learn more about this in our command line guide.
Ant TaskIncorporate theformat="svg" setting in your Ant task definition to facilitate SVG generation. Find detailed instructions in our Ant task guide.
JavaYou can also generate SVG directly from Java. Discover how to set this up in our Java API guide. |
||||
SVG のための特定のスキン・パラメータ |
Specific Skin Parameters for SVG |
||||
|
|||||
出力の様々な側面をカスタマイズできる特定のスキン・パラメータで SVG 図を強化しましょう。
svgLinkTargetsvgLinkTarget 設定によって、SVG 出力で生成されるハイパーリンクのtarget 属性を変更することができ、それによってクリックされたときにリンクがどのように開くかを制御できます。
HTML 仕様を参照すると、次のオプションがあります:
_top で、svgLinkTarget が空の場合に適用されます。
pathHoverColorskinparam pathHoverColor 設定を利用して、マウス・ポインタをリンクに置いたときに適用される色を指定し、ユーザーとダイアグラムのインタラクションを強化します。
[参照:QA-5453] svgDimensionStyleSVG出力ヘッダーにstyle ,width ,height 属性を含めたくない場合は、skinparam svgDimensionStyle をfalse に設定してください。 これにより、ダイアグラムの本質的な要素だけに焦点を当てた、すっきりとした出力が得られます。
[参照QA-7334]。 |
Enhance your SVG diagrams with specific skin parameters that allow you to customize various aspects of the output. Here we delve into some of the parameters you can use:
svgLinkTargetThesvgLinkTarget setting allows you to modify the target attribute in the hyperlinks generated in the SVG output, thereby controlling how the links will open when clicked.
Referencing the HTML specification, you have the following options:
_top , applied when the svgLinkTarget is left empty.
pathHoverColorUtilize the skinparam pathHoverColor setting to specify a color that will be applied to links when hovered over with the mouse pointer, enhancing user interaction with your diagrams.
[Reference: QA-5453] svgDimensionStyleIf you prefer not to include thestyle , width , and height attributes in the SVG output header, set the skinparam svgDimensionStyle to false . This gives you cleaner output, focusing solely on the essential elements of your diagram.
[Reference QA-7334] |
||||
Untitled chapter of svg |
Specifying Pragma for SVGs |
||||
|
|||||
svgSize
S## VG のための Pragma の指定
PlantUML ダイアグラムの特定の SVG 要素のためのカスタムサイズを定義するために、svgSize pragma### ディレクティブを利用します。 !pragma svgSize <U+hhhhh> XX ディレクティブは、PlantUML に <U+hhhhh>
理想的な設定を得るために、このディレクティブを使用できるさまざまな方法を示します:
使用例以下は、svgSize ディレクティブを使用する PlantUML コードの例です:
コマンドラインオプションコマンドラインで-P オプションを使って、svgSize プラグマを指定することができます。
例
参考文献 |
Leverage the
svgSize pragma directive to define custom sizes for specific SVG elements in your PlantUML diagrams.
Using the
The |
||||