messyなkitchenなブログ

ただひたすらに散らかった台所や人生やその他を晒す。

MENU

脱W〇rd, 脱E×cel, 脱@st@h : #10

PlantUMLで、ちょっとしたアイコンを表示できます。

こんな感じ。

[<size:24><&folder> folder icon] as foldericon
note right of foldericon : Open Iconic

もうちょっと今風に、マテリアルデザインなアイコンも使えるようです。
→組み込みのライブラリに含まれているデータを使えます。

$ma_アイコン名 を指定することで、スプライトと同じような感じでアイコンを描画できます。

!include <material/clipboard_text>
!include <material/alert>
!include <material/cloud>
!include <material/folder_lock>
!include <material/folder_move>
!include <material/music_box>
[<$ma_clipboard_text>] --> [<$ma_alert>]
[<$ma_music_box>] --> [<$ma_cloud>]
[<$ma_folder_lock>] --> [<$ma_folder_move>]

マクロも使えるみたい。でも引数がよくわからない。

!include <material/common>
!include <material/folder_move>

MA_FOLDER_MOVE(Red, 1, dir, rectangle, "A label")

こんなのも描けますw

!include <material/emoticon_poop>
rectangle "<color:#brown><$ma_emoticon_poop>" as pp
note right of pp : poop

マテリアルデザインのアイコンは、以下のサイトを参照。
materialdesignicons.com

最後に、いつものように、ソースコード

title Test of Material Icons

/'========================================================================
 ' マテリアルデザインのアイコン
 ' https://materialdesignicons.com/
 '========================================================================'/

/'いずれかを選択 Choose one of them'/
!define CASE1
'!define CASE2
'!define CASE3
'!define CASE4

/'========================================================================
 ' CASE 1
 '========================================================================'/
!ifdef CASE1
[<size:24><&folder> folder icon] as foldericon
note right of foldericon : Open Iconic
!endif  /'CASE1'/

/'========================================================================
 ' CASE 2
 '========================================================================'/
!ifdef CASE2
!include <material/clipboard_text>
!include <material/alert>
!include <material/cloud>
!include <material/folder_lock>
!include <material/folder_move>
!include <material/music_box>

[<$ma_clipboard_text>] --> [<$ma_alert>]
[<$ma_music_box>] --> [<$ma_cloud>]
[<$ma_folder_lock>] --> [<$ma_folder_move>]
!endif  /'CASE2'/

/'========================================================================
 ' CASE 3
 '========================================================================'/
!ifdef CASE3
!include <material/common>
!include <material/folder_move>

MA_FOLDER_MOVE(Red, 1, dir, rectangle, "A label")
!endif  /'CASE3'/

/'========================================================================
 ' CASE 4
 '========================================================================'/
!ifdef CASE4
!include <material/emoticon_poop>
rectangle "<color:#brown><$ma_emoticon_poop>" as pp
note right of pp : poop
!endif  /'CASE4'/

/'skinparam 設定'/
skinparam componentBorderColor  #gray
skinparam packageFontStyle  plane
skinparam noteBackgroundColor   #white
skinparam backgroundColor   #fdfbf4
scale   5/5