履歴: ソフトウェア/pukiwiki/uml.inc.php
各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 11 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます
| 日時 | タイトル | 文字数 | 追加 | 削除 | 内容 | 差分 | 基準 |
|---|---|---|---|---|---|---|---|
| 2023/6/26 15:42:39 | ソフトウェア/pukiwiki/uml.inc.php 最新版 | 8,013 | +1 | -29 | 表示 | 差分 | — |
| 2023/6/26 15:42:39 | ソフトウェア/pukiwiki/uml.inc.php | 8,952 | +1 | -1 | 表示 | 差分 | 選択 |
| 2023/6/23 5:02:03 | ソフトウェア/pukiwiki/uml.inc.php | 8,618 | +14 | -0 | 表示 | 差分 | 選択 |
| 2016/7/1 14:17:25 | ソフトウェア/pukiwiki/uml.inc.php | 8,347 | +3 | -0 | 表示 | 差分 | 選択 |
| 2016/7/1 14:17:25 | ソフトウェア/pukiwiki/uml.inc.php | 8,256 | +1 | -1 | 表示 | 差分 | 選択 |
| 2016/7/1 14:17:25 | ソフトウェア/pukiwiki/uml.inc.php | 8,252 | +2 | -1 | 表示 | 差分 | 選択 |
| 2016/7/1 14:17:25 | ソフトウェア/pukiwiki/uml.inc.php | 8,165 | +16 | -0 | 表示 | 差分 | 選択 |
| 2016/2/19 10:49:07 | ソフトウェア/pukiwiki/uml.inc.php | 7,797 | +263 | -14 | 表示 | 表示中 | 選択 |
| 2016/2/19 8:45:33 | ソフトウェア/pukiwiki/uml.inc.php | 3,728 | +74 | -28 | 表示 | 差分 | 基準 |
| 2016/2/19 3:01:56 | ソフトウェア/pukiwiki/uml.inc.php | 2,876 | +118 | -1 | 表示 | 差分 | 選択 |
| 2016/2/18 15:24:17 | ソフトウェア/pukiwiki/uml.inc.php | 273 | — | — | 表示 | — | 選択 |
基準: ソフトウェア/pukiwiki/uml.inc.php (2016/2/19 8:45:33) → 比較: ソフトウェア/pukiwiki/uml.inc.php (2016/2/19 10:49:07)
@@ -1,5 +1,7 @@
[[公開メモ]]
+#contents
+
* UML を貼るためのプラグインです [#w0b69192]
このように書くと、
@@ -32,6 +34,23 @@
結果送信 --> コマンド待ち : rready
);
+先頭に "skinparam handwritten true" という行を加えると、
+手書き風にもできます。
+
+¨(
+skinparam handwritten true
+
+[*] -> コマンド待ち
+コマンド待ち: rready = 1
+コマンド待ち: rvalid = 0
+コマンド待ち --> 読み出し: arvalid & \narready
+読み出し: rready = 0
+読み出し: rvalid = 0
+読み出し-right--> 結果送信: 読み出し終了
+結果送信: rready = 0
+結果送信: rvalid = 1
+結果送信 --> コマンド待ち : rready
+);
* 謝辞 [#yde90f7f]
図の作成には PlantUML を利用させていただきました
@@ -42,16 +61,14 @@
表示には、
-851手書き雑フォント~
-http://www39.atpages.jp/yagoinienie/851fontpage.html
+ダーツフォント~
+http://www.p-darts.jp/font/dartsfont/
-を
+を使わせていただきました。
-http://www.hirok-k.com/blog/751.html
+cdn.rawgit.com で公開されているようでしたので、そちらを参照するようにしています。
-を参考に Web フォント化して使わせていただきました。
-
* ソースファイル [#s0919acf]
cache/uml_svg/ というフォルダの下に .svg ファイルをキャッシュします。
@@ -67,16 +84,24 @@
{
$tmp = tempnam("/tmp", "plantuml");
- $source = <<<"EOS"
+ if (preg_match('/skinparam\s+handwritten\s+true/', $source)) {
+ $source = <<<"EOS"
@startuml
- skinparam defaultFontName TegakiZatsu
+ skinparam defaultFontName dartsfont
skinparam defaultFontStyle bold
- skinparam handwritten true
skinparam monochrome true
skinparam shadowing false
$source
@enduml
EOS;
+ } else {
+ $source = <<<"EOS"
+ @startuml
+ skinparam defaultFontName umldefault
+ $source
+ @enduml
+ EOS;
+ }
$handle = fopen($tmp, "w");
fwrite($handle, preg_replace("/\\r?\\n/","\r\n",$source));
@@ -114,7 +139,7 @@
return $svg;
}
- function plugin_uml_inline()
+ function plugin_uml_header()
{
$style = '';
global $plugin_uml_initialized;
@@ -122,22 +147,32 @@
$style = <<<'EOS'
<style type="text/css">
@font-face {
- font-family: "TegakiZatsu";
- src: url("/~takeuchi/851tegaki_zatsu.woff") format('woff');
+ font-family: "dartsfont";
+ src: url("https://cdn.rawgit.com/3846masa/japont/master/fonts/dartsfont/dartsfont.woff") format('woff');
}
- svg text[font-family="TegakiZatsu"] {
- font-family: "TegakiZatsu";
+ svg text[font-family="dartsfont"] {
+ font-family: "dartsfont";
}
+
+ svg text[font-family="umldefault"] {
+ font-family:Arial,Helvetica,'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック',sans-serif;
+ }
</style>
EOS;
$plugin_uml_initialized = true;
}
+ return $style;
+ }
+ function plugin_uml_inline()
+ {
$aryargs = func_get_args();
$source = join(",", $aryargs);
$source = rtrim($source, ","); //remove extra comma at the end.
$source = str_replace("<br>", "\n",$source);
+
+ $style = plugin_uml_header();
return $style . plantuml_convert($source);
}
@@ -174,6 +209,220 @@
まだうまくいってません。
+* 使用例 [#u1c9b03d]
+
+http://ja.plantuml.com/ の例をいくつか。
+
+ skinparam handwritten true
+
+ actor Foo1
+ boundary Foo2
+ control Foo3
+ entity Foo4
+ database Foo5
+ Foo1 -> Foo2 : To boundary
+ Foo1 -> Foo3 : To control
+ Foo1 -> Foo4 : To entity
+ Foo1 -> Foo5 : To database
+
+¨(
+skinparam handwritten true
+
+actor Foo1
+boundary Foo2
+control Foo3
+entity Foo4
+database Foo5
+Foo1 -> Foo2 : To boundary
+Foo1 -> Foo3 : To control
+Foo1 -> Foo4 : To entity
+Foo1 -> Foo5 : To database
+);
+
+handwritten true が無ければ次のようになります。
+
+¨(
+actor Foo1
+boundary Foo2
+control Foo3
+entity Foo4
+database Foo5
+Foo1 -> Foo2 : To boundary
+Foo1 -> Foo3 : To control
+Foo1 -> Foo4 : To entity
+Foo1 -> Foo5 : To database
+);
+
+ skinparam handwritten true
+
+ :Main Admin: as Admin
+ (Use the application) as (Use)
+
+ User -> (Start)
+ User --> (Use)
+
+ Admin ---> (Use)
+
+ note right of Admin : This is an example.
+
+ note right of (Use)
+ A note can also
+ be on several lines
+ end note
+
+ note "This note is connected\nto several objects." as N2
+ (Start) .. N2
+ N2 .. (Use)
+
+¨(
+skinparam handwritten true
+
+:Main Admin: as Admin
+(Use the application) as (Use)
+
+User -> (Start)
+User --> (Use)
+
+Admin ---> (Use)
+
+note right of Admin : This is an example.
+
+note right of (Use)
+ A note can also
+ be on several lines
+end note
+
+note "This note is connected\nto several objects." as N2
+(Start) .. N2
+N2 .. (Use)
+);
+
+ package "Classic Collections" #DDDDDD {
+ abstract class AbstractList
+ abstract AbstractCollection
+ interface List
+ interface Collection
+ }
+
+ List <|-- AbstractList
+ Collection <|-- AbstractCollection
+
+ Collection <|- List
+ AbstractCollection <|- AbstractList
+
+ AbstractList <|-- ArrayList
+
+ class ArrayList {
+ Object[] elementData
+ size()
+ }
+
+ enum TimeUnit {
+ DAYS
+ HOURS
+ MINUTES
+ }
+
+ annotation SuppressWarnings
+
+¨(
+package "Classic Collections" #DDDDDD {
+abstract class AbstractList
+abstract AbstractCollection
+interface List
+interface Collection
+}
+
+List <|-- AbstractList
+Collection <|-- AbstractCollection
+
+Collection <|- List
+AbstractCollection <|- AbstractList
+
+AbstractList <|-- ArrayList
+
+class ArrayList {
+ Object[] elementData
+ size()
+}
+
+enum TimeUnit {
+ DAYS
+ HOURS
+ MINUTES
+}
+
+annotation SuppressWarnings
+);
+
+ start
+ :ClickServlet.handleRequest() ;
+ :new page;
+ if (Page.onSecurityCheck) then (true)
+ :Page.onInit() ;
+ if (isForward?) then (no)
+ :Process controls;
+ if (continue processing?) then (no)
+ stop
+ endif
+
+ if (isPost?) then (yes)
+ :Page.onPost() ;
+ else (no)
+ :Page.onGet() ;
+ endif
+ :Page.onRender() ;
+ endif
+ else (false)
+ endif
+
+ if (do redirect?) then (yes)
+ :redirect process;
+ else
+ if (do forward?) then (yes)
+ :Forward request;
+ else (no)
+ :Render page template;
+ endif
+ endif
+
+ stop
+
+¨(
+start
+:ClickServlet.handleRequest() ;
+:new page;
+if (Page.onSecurityCheck) then (true)
+ :Page.onInit() ;
+ if (isForward?) then (no)
+ :Process controls;
+ if (continue processing?) then (no)
+ stop
+ endif
+
+ if (isPost?) then (yes)
+ :Page.onPost() ;
+ else (no)
+ :Page.onGet() ;
+ endif
+ :Page.onRender() ;
+ endif
+else (false)
+endif
+
+if (do redirect?) then (yes)
+ :redirect process;
+else
+ if (do forward?) then (yes)
+ :Forward request;
+ else (no)
+ :Render page template;
+ endif
+endif
+
+stop
+);
+
* 質問・コメント [#y0f6fa29]
#article_kcaptcha