図形
図形は、4D フォームに設置することのできる スタティックオブジェクト です。
次の基本の図形が提供されています:
- 四角
- 線
- 楕円
四角
フォーム上に四角を配置することで、視覚的な効果が得られます。 四角で描画できるのは長方形に限られます。
四角のグラフィック属性 (線カラー、線幅、点線タイプ等) やリサイズオプションはプロパティリストにて指定できます。 角の 丸み を指定することもできます。
JSON 例:
"myRectangle": {
"type": "rectangle", //define the type of object
"left": 60, //left position on the form
"top": 160, //top position on the form
"width": 100, //width of the object
"height": 20, //height of the object
"borderRadius": 20 //define the roundness of the corners
}
プロパティ一覧
Bottom - Class - Corner radius - Dotted Line Type - Fill Color - Height - Horizontal Sizing - Left - Line Color - Line Width - Object Name - Right - Top - Type - Vertical Sizing - Visibility - Width
線
フォーム上に線を配置することで、視覚的な効果が得られます。 線は水平、垂直のほか、あらゆる角度で描画することができます。
線のグラフィック属性 (線カラー、線幅、点線タイプ等) やリサイズオプションはプロパティリストにて指定できます。
startPoint プロパティ
startPoint
JSON プロパティは、線の始点を定義します (JSON例参照)。
フォームエディター上では線の始点があきらかなため、プロパティリストにおいて
startPoint
プロパティは非表示です。
JSON 例:
"myLine": {
"type": "line",
"left": 20,
"top": 40,
"width": 100,
"height": 80,
"startPoint": "topLeft", //first direction
"strokeDashArray": "6 2" //dashed
}
Result:
"myLine": {
"type": "line",
"left": 20,
"top": 40,
"width": 100,
"height": 80,
"startPoint": "bottomLeft", //2nd direction
"strokeDashArray": "6 2" //dashed
}
Result:
プロパティ一覧
Bottom - Class - Dotted Line Type - Height - Horizontal Sizing - Left - Line Color - Line Width - Object Name - Right - startPoint - Top - Type - Vertical Sizing - Visibility - Width
楕円
フォーム上に楕円を配置することで、視覚的な効果が得られます。 楕円を使って円を描くことができます (幅 と 高さ を同じ値に設定します)。
JSON 例:
"myOval": {
"type": "oval", //define the type of object
"left": 60, //left position on the form
"top": 160, //top position on the form
"width": 100, //width of the object
"height": 20, //height of the object
"fill": "blue" //define the background color
}
プロパティ一覧
Bottom - Class - Dotted Line Type - Fill Color - Height - Horizontal Sizing - Left - Line Color - Line Width - Object Name - Right - Top - Type - Vertical Sizing - Visibility - Width