« University of Vienna - OMILAB に戻る

Dynamic PEN Width in GRAPHREP

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Dynamic PEN Width in GRAPHREP
community graphrep documentation
答え
19/01/09 13:51
Some students discovered that in the GRAPHREP of relations under ADOxx 1.3 it does not seem possible to dynamically change the width of lines.
This is illustrated in the following code: when changing the value of variable "wi" there is no effect on the graphical representation, although the PEN statement should influence the width of the following line.

1START
2SET wi:5cm
3PEN color:black w: ((wi))
4LINE x1:0.1cm y1:0.5cm x2:1cm y2:2cm


Are we doing this right way? (we also tried to use an eval expression instead but it did not help either)

RE: Dynamic PEN Width in GRAPHREP
答え
13/06/21 4:48 匿名へのコメント
Currently ADOxx expects a concrete numeric value by the specification of the PEN element, setting these dynamically is not possible. A dynamic view can be implemented using IF ELSE statements and set the PEN for each case.

From the specification of GRAPHREP syntax the following applies

1PEN [ style: PenStyle ] [ w: width ] ...

In this case a width value is expected.

1RECTANGLE [ x: xposExpr ] [ y: yposExpr ] [ w: widthExpr ] [ h: heightExpr ]

In this case a width expression is expected.

We will further investigate this issue and analyse if a change of the behaviour is feasible for the next platform release.