基礎編 基本図形

記事作成日: 2020-12-26

mxGraphに組み込まれているスタイルを使って基本図形を描いてみました。draw.ioと違って用意されている図形は少ないです。

基本図形

矩形・長方形

長方形・矩形

graph.insertVertex(parent, null, null, 20, 20, 300, 180 , 'shape=rectangle;');

正方形

正方形

graph.insertVertex(parent, null, null, 20, 20, 250, 250 , 'shape=rectangle;');

楕円形

楕円形

graph.insertVertex(parent, null, null, 20, 20, 300, 180 , 'shape=ellipse;');

円

graph.insertVertex(parent, null, null, 20, 20, 250, 250 , 'shape=ellipse;');

三角形

三角形

graph.insertVertex(parent, null, null, 20, 20, 250, 250 , 'shape=triangle;');

ひし形

ひし形

graph.insertVertex(parent, null, null, 20, 20, 200, 250 , 'shape=rhombus;');

六角形

六角形

graph.insertVertex(parent, null, null, 20, 20, 250, 220 , 'shape=hexagon;');

円柱・円筒

円柱・円筒

graph.insertVertex(parent, null, null, 20, 20, 250, 220 , 'shape=cylinder;');

雲(クラウド)

雲

graph.insertVertex(parent, null, null, 20, 20, 250, 200 , 'shape=cloud;');

アクター

アクター

graph.insertVertex(parent, null, null, 20, 20, 200, 200 , 'shape=actor;');