JPH05242195A - Automatic layout device for graph figure - Google Patents

Automatic layout device for graph figure

Info

Publication number
JPH05242195A
JPH05242195A JP3184728A JP18472891A JPH05242195A JP H05242195 A JPH05242195 A JP H05242195A JP 3184728 A JP3184728 A JP 3184728A JP 18472891 A JP18472891 A JP 18472891A JP H05242195 A JPH05242195 A JP H05242195A
Authority
JP
Japan
Prior art keywords
block
blocks
graph
elements
element set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP3184728A
Other languages
Japanese (ja)
Other versions
JP3165180B2 (en
Inventor
Akiko Hiramatsu
明子 平松
Jun Maeda
潤 前田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP18472891A priority Critical patent/JP3165180B2/en
Publication of JPH05242195A publication Critical patent/JPH05242195A/en
Application granted granted Critical
Publication of JP3165180B2 publication Critical patent/JP3165180B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To provide the graph figure layout device which is improved in visibility and made faster. CONSTITUTION:This device consists of an element data holding memory 1 which holds position information on respective elements connected by lines in a graph figure and the master-slave link relation, a data input part 2 which specifies elements at an addition position and a branch source when a figure element is added or a figure element to be deleted when the element is deleted, a position information calculation part 3 which receives a data input from the data input part 2 and calculates the positions of an element set to be redisplayed while referring to the contents of the element data memory, and a display part 4 which displays respective elements at positions calculated by the position information calculation part 3.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はグラフ図形の編集時に分
岐して要素集合を追加する際及び分岐した要素集合を削
除する際の自動レイアウトを行うグラフ図形自動レイア
ウト装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graph graphic automatic layout device for performing automatic layout when a graph graphic is edited to add an element set by branching and when a branched element set is deleted.

【0002】近年、さまざまな産業の発達に伴い、状態
の遷移を記述する状態図等のグラフ図形データが非常に
大規模かつ複雑になってきている。このようなグラフ図
形においては、各要素が人間に理解しやすいようにある
一定の表示規則に基づいてレイアウトされることが望ま
しいが、これを満たすためには、1つの追加や削除で大
幅なレイアウト変更を必要とする場合が生じてくる。こ
のため、グラフ図形の編集時において、自動でレイアウ
ト変更を行うことが要求されている。
In recent years, with the development of various industries, graph graphic data such as a state diagram for describing state transitions has become very large and complicated. In such a graph figure, it is desirable that each element is laid out based on a certain display rule so that it can be easily understood by humans. There may be cases where changes are needed. Therefore, it is required to automatically change the layout when editing the graphic.

【0003】[0003]

【従来の技術】従来のグラフ図形自動レイアウト装置に
おいては、グラフ図形の編集を行う際に、表示するブロ
ック間に余分なスペースができ、見にくくなることがあ
った。また、変更がある場合には、図面全体を表示し直
していた。従って、図形の編集に多くの時間と大容量の
メモリを必要としていた。
2. Description of the Related Art In a conventional graph figure automatic layout apparatus, when a graph figure is edited, an extra space may be formed between blocks to be displayed, which may be difficult to see. Also, when there was a change, the entire drawing was redisplayed. Therefore, it takes a lot of time and a large amount of memory to edit the graphic.

【0004】[0004]

【発明が解決しようとする課題】前述したように、従来
の技術では、グラフ図形の編集時に多くの空きスペース
ができ、横に拡散してグラフ図形全体が見にくくなると
いう問題があった。また、グラフ図形のごく一部の変更
ですむ場合でも、その部分だけを表示しなおすことがで
きず、毎回図面全体を表示し直す分の時間及びメモリを
必要とするという問題があった。
As described above, the conventional technique has a problem in that a large amount of empty space is created when a graph figure is edited and the graph figure is diffused horizontally to make it difficult to see the entire graph figure. Further, even if only a small part of the graph figure is changed, only that part cannot be displayed again, and there is a problem that it takes time and memory to redisplay the entire drawing each time.

【0005】本発明はこのような課題に鑑みてなされた
ものであって、視認性を向上し、より高速なグラフ図形
レイアウト装置を提供することを目的としている。
The present invention has been made in view of the above problems, and an object of the present invention is to provide a graph figure layout apparatus which improves visibility and is faster.

【0006】[0006]

【課題を解決するための手段】図1は本発明の原理ブロ
ック図である。図において、1はグラフ図形において線
で結ばれた各要素の位置情報及び親子のリンク関係を保
持する要素データ保持メモリ、2は図形要素を追加する
場合、その追加位置及び分岐元の要素を、削除する場
合、削除する図形要素を指定するデータ入力部、3はデ
ータ入力部2からのデータ入力を受けて、前記要素デー
タ保持メモリ1の内容を参照しながら、表示し直す必要
がある要素集合の位置を計算する位置情報計算部、4は
位置情報計算部3で計算された位置に各要素を表示する
表示部である
FIG. 1 is a block diagram showing the principle of the present invention. In the figure, 1 is an element data holding memory that holds the positional information of each element connected by a line in a graph figure and the parent-child link relationship, and 2 is the addition position and branch source element when adding a figure element, In the case of deleting, the data input section 3 for designating the graphic element to be deleted receives the data input from the data input section 2, and refers to the contents of the element data holding memory 1 to redisplay the element set. A position information calculation unit for calculating the position of 4 and a display unit 4 for displaying each element at the position calculated by the position information calculation unit 3.

【0007】[0007]

【作用】追加する要素集合及びそれに伴って移動する追
加レベルの要素集合や、削除する要素集合及びそれに伴
って移動する削除レベルの要素集合をそれぞれブロック
として考え、位置情報計算部3は、データ入力部2から
のデータ入力を受けて、要素データ保持メモリ1の内容
を参照しながら、ブロックの幅を考慮することによっ
て、各ブロックが重ならないように、またブロック毎に
余分なスペースができないように、各ブロックの最上位
の要素の座標を決定し、表示部4に追加及び移動するブ
ロック内の全要素の表示を行う。このようにすることに
より、視認性を向上し、より高速なグラフ図形レイアウ
ト装置を提供することができる。
The position information calculation unit 3 receives the data input by considering the element set to be added and the element set at the additional level that moves with it, and the element set to be deleted and the element set at the deletion level that moves with it, respectively. By receiving the data input from the unit 2 and referring to the contents of the element data holding memory 1 while considering the width of the blocks, each block is prevented from overlapping and no extra space is provided for each block. , The coordinates of the highest element of each block are determined, and all the elements in the block to be added and moved to the display unit 4 are displayed. By doing so, it is possible to improve the visibility and provide a higher speed graph graphic layout device.

【0008】[0008]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。図2は本発明の全体の動作を示すフローチ
ャートである。要素集合の位置計算を行う処理1を行っ
た後(S1)、その結果新たに位置情報の登録が行われ
た要素のブロックを表示する(S2)。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 2 is a flowchart showing the overall operation of the present invention. After performing the process 1 of calculating the position of the element set (S1), the block of the element for which position information is newly registered as a result is displayed (S2).

【0009】図3乃至図5は要素集合の位置計算のシー
ケンスを示すフローチャートで、前記図2の処理1の内
容を示している。これら一連のフローチャートを合わせ
て1つのシーケンスを構成している。このシーケンス
は、位置情報計算部3がデータ入力部2から入力された
情報を基に、要素データ保持メモリ1の内容を参照しな
がら行うものである。
3 to 5 are flowcharts showing the sequence of position calculation of the element set, and show the contents of the process 1 of FIG. These sequences of flowcharts are combined to form one sequence. This sequence is performed by the position information calculation unit 3 while referring to the contents of the element data holding memory 1 based on the information input from the data input unit 2.

【0010】ここでは、図17に示す要素集合の例を参
照しながら説明する。図17はブロックAとブロックB
との間にブロックCを挿入する場合を示している。まず
追加要素集合における一番上の要素をc1と定義する。
次に、c1のすぐ左側にくる要素の位置情報を(X,
Y)とし、次にY座標が同じでXの右側にくる位置情報
(x,y)を持つ要素の個数をmとする(S1)。図1
7の例では、(X,Y)はa1であり、a1よりも右側
にくる要素はc1だけであるので、m=1となる。
Here, description will be made with reference to the example of the element set shown in FIG. FIG. 17 shows block A and block B
The case where the block C is inserted between and is shown. First, the top element in the additional element set is defined as c1.
Next, the position information of the element immediately to the left of c1 is (X,
Y), and then the number of elements having the same Y coordinate and having position information (x, y) on the right side of X is m (S1). Figure 1
In the example of 7, since (X, Y) is a1 and the only element on the right side of a1 is c1, m = 1.

【0011】次にm=0であるかどうかチェックする
(S2)。図17の場合にはm=0ではないので、ステ
ップS3に進む。ステップS3では、x>Xでy=Yを
満たす要素のうち一番右からm番目の要素をbmと定義
する。図17の例では、a1より右側の要素で一番右側
より1番目の要素となるのでbm=c1となる。
Next, it is checked whether or not m = 0 (S2). In the case of FIG. 17, since m = 0 is not satisfied, the process proceeds to step S3. In step S3, the m-th element from the rightmost of the elements satisfying x = X and y = Y is defined as bm. In the example of FIG. 17, since the element on the right side of a1 is the first element on the rightmost side, bm = c1.

【0012】次に、c1の下に繋がる要素の集合(c1
を含む)をブロックCと定義し、ブロックCにおける一
番下の要素のY座標をDと定義する(S4)。図17の
例では、c1を含む要素集合はブロックCとなり、一番
下の要素c3,c4のY座標はY=4となる。
Next, a set of elements (c1
Is included in the block C, and the Y coordinate of the bottom element in the block C is defined as D (S4). In the example of FIG. 17, the element set including c1 is block C, and the Y coordinates of the bottom elements c3 and c4 are Y = 4.

【0013】次に、x≦X,y=Yを満たす位置情報
(x,y)の要素の個数をnとし、変数MAX=0とす
る(S5)。図17の例の場合には、a1より左側には
要素は存在しないので、n=1となる。また、変数MA
Xについては後述する。次に、n=0であるかどうかチ
ェックする(S6)。n=0の場合には、図5に示すシ
ーケンスにジャンプする。
Next, the number of elements of position information (x, y) satisfying x≤X, y = Y is set to n, and a variable MAX = 0 is set (S5). In the case of the example in FIG. 17, since there are no elements on the left side of a1, n = 1. Also, the variable MA
X will be described later. Next, it is checked whether n = 0 (S6). If n = 0, jump to the sequence shown in FIG.

【0014】nが0でない場合には、x≦X,y=Yを
満たす位置情報(x,y)の要素のうち一番左からn番
目の要素をanとする。そして、anの下に繋がる各要
素のY座標の最大値をDaとする(S7)。図17の例
の場合には、anはa1であり、a1の下に繋がる要素
のY座標の最大値DaはDa=5となる。
When n is not 0, the n-th element from the leftmost of the elements of the position information (x, y) satisfying x≤X and y = Y is an. Then, the maximum value of the Y coordinate of each element connected under an is set to Da (S7). In the example of FIG. 17, an is a1, and the maximum value Da of the Y coordinate of the elements connected under a1 is Da = 5.

【0015】次に、c1が削除されるかどうかチェック
する(S8)。削除される場合には、c1とanは一体
となるので、c1=anとする(S9)。次に、Da<
Dであるかどうかチェックする。そうである場合には、
anとその下に繋がる要素のうちY座標Daまでの要素
の集合をブロックAと定義する(S12)。図17に示
す例の場合にはDa>Dである。この場合には、anと
その下に繋がる要素のうちY座標がDまでの要素の集合
をブロックAと定義する(S11)。これにより、追加
するブロックCと元のブロックAの一番下の段のY座標
が一致することになる。
Next, it is checked whether or not c1 is deleted (S8). When deleted, c1 and an are integrated, so c1 = an (S9). Next, Da <
Check if it is D. If so,
A block A is defined as a set of elements up to the Y coordinate Da among the elements connected to an and the elements below it (S12). In the case of the example shown in FIG. 17, Da> D. In this case, a block A is defined as a set of elements having an Y coordinate up to D among the elements connected to an and an element thereunder (S11). As a result, the Y coordinate of the lowest stage of the added block C and the original block A will match.

【0016】このようにしてブロックAとブロックCと
のY座標の一致処理を行ったら、今度はブロックAの各
要素のX座標の最大値をWaと定義する(S13)。図
17の例の場合には、Wa=3となる。そして、次にW
aとステップS5で定義したMAXとの大小関係をチェ
ックする(S14)。Wa≦MAXの場合には、n=n
−1の演算を行い(S16)、ステップS6に戻る。図
17の例の場合には、Wa=3でMAX(=0)より大
きいからステップS14において、Wa>MAXの場合
であり、Waの値をMAXとし(S15)、ステップS
16に移行する。次に、ステップn=n−1の演算を行
うが、この演算によりn=0となるので、図5に示すシ
ーケンスにジャンプする。
After the matching process of the Y coordinates of the block A and the block C is performed in this way, the maximum value of the X coordinate of each element of the block A is defined as Wa (S13). In the example of FIG. 17, Wa = 3. And then W
The size relationship between a and MAX defined in step S5 is checked (S14). If Wa ≦ MAX, n = n
-1 is calculated (S16), and the process returns to step S6. In the case of the example in FIG. 17, since Wa = 3 and larger than MAX (= 0), it is the case of Wa> MAX in step S14, and the value of Wa is set to MAX (S15), and step S15 is executed.
Move to 16. Next, the calculation of step n = n-1 is performed. Since n = 0 by this calculation, the sequence jumps to the sequence shown in FIG.

【0017】次に、データ入力部2から入力されるスペ
ースデータをP(>0)と定義する(S17)。ここ
で、スペースデータを入力するに際しては、隣り合うブ
ロック間に必要以上の空きができないように決定する必
要がある。次に、Xc=MAX+P,Yc=Yとし、c
1の新しい位置情報を(Xc,Yc)と登録する。次
に、ブロックCの全要素の新しい位置情報を登録する
(S18)。
Next, the space data input from the data input unit 2 is defined as P (> 0) (S17). Here, when inputting the space data, it is necessary to make a decision so that there is no unnecessary space between adjacent blocks. Next, Xc = MAX + P, Yc = Y, and c
The new position information of 1 is registered as (Xc, Yc). Next, new position information of all elements of block C is registered (S18).

【0018】次に、ブロックCの右隣にブロックBを追
加する処理に入る。c1を新しいXの初期値とするため
にX=Xcとする(S19)。次に、m=0であるかど
うかチェックする(S20)。mが0でなかった場合に
は、新しく追加するブロックの親が異なっている場合に
親もずらす必要があるため、g=1と初期設定した後、
bmの親要素をbpg、c1の親要素をcpgとする
(S21)。
Next, the process of adding the block B to the right of the block C is started. In order to set c1 as a new initial value of X, X = Xc is set (S19). Next, it is checked whether m = 0 (S20). If m is not 0, it is necessary to shift the parent if the parent of the newly added block is different, so after initializing g = 1,
The parent element of bm is bpg, and the parent element of c1 is cpg (S21).

【0019】そして、bmの親要素bpgとc1の親要
素cpgが同じであるかどうかチェックする(S2
2)。双方の親要素が異なる場合には、bpgの親要素
として1個上の要素bp(g+1)を新たな親要素と
し、cpgの1個上の要素cp(g+1)を親要素とす
る(S23)。そして、新たな親要素同志の比較を行う
(S24)。若し、bp(g+1)とcp(g+1)と
が一致すれば、親同志が一致したことになるので、次の
ステップに進む。若し、親同志が一致しない場合には、
g=g+1として(S25)、更に1個上の要素同志の
比較を行う処理を繰り返すことになる。
Then, it is checked whether the parent element bpg of bm and the parent element cpg of c1 are the same (S2).
2). When the two parent elements are different, the element bp (g + 1) that is one element higher than the parent element of bpg is the new parent element, and the element cp (g + 1) that is one element higher than cpg is the parent element (S23). .. Then, the new parents are compared with each other (S24). If bp (g + 1) and cp (g + 1) match, it means that the relatives have matched, and the process proceeds to the next step. If you don't like your relatives,
g = g + 1 is set (S25), and the process of comparing the elements one element higher is repeated.

【0020】次に、x>X,y=Y−gである位置情報
(x,y)の個数をm、x>X,y=Y−gを満たす位
置情報(x,y)のうちの一番右からm番目の要素をb
mとする(S26)。その後、Y=Y−gを演算し(S
27)、c1=bm、m=m−1として(S28)、ス
テップS4(図3参照)に戻り、前述したような動作を
繰り返して、ブロックCの右にブロックBを追加する処
理を行うことになる。
Next, the number of pieces of position information (x, y) satisfying x> X, y = Y-g is m, and among the position information (x, y) satisfying x> X, y = Y-g. The m-th element from the far right is b
m (S26). Then, Y = Y-g is calculated (S
27), c1 = bm, m = m−1 (S28), the process returns to step S4 (see FIG. 3), and the above-described operation is repeated to add the block B to the right of the block C. become.

【0021】図6は決定されたブロック内における最大
X座標maxの求め方を示すフローチャートである。図
では、Y=αからY=α+βまでを調べる場合を示して
いる。この動作は、図1の位置情報計算部3が行う。Y
座標を求める場合も同様である。先ず、Y=αの初期設
定を行う(S1)。次に、対象要素をa1とし、対象要
素のX座標をX1とし,max=X1の設定を行う(S
2)。次に、Y=α+βとなったかどうかをチェックす
る(S3)。
FIG. 6 is a flow chart showing how to obtain the maximum X coordinate max in the determined block. In the figure, the case of checking from Y = α to Y = α + β is shown. This operation is performed by the position information calculation unit 3 in FIG. Y
The same applies when the coordinates are obtained. First, initial setting of Y = α is performed (S1). Next, the target element is a1, the X coordinate of the target element is X1, and max = X1 is set (S
2). Next, it is checked whether Y = α + β (S3).

【0022】次に、a1の子供の数をnu、a1の子供
のうち一番右にあるものをanu、anuのX座標をW
とする(S4)。そして、Wがmaxよりも大きいかど
うかチェックし(S5)、大きい場合にはmax=Wと
し(S6)、大きくない場合又はステップS6の後にY
=Y+1,a1=anuとし(S7)、ステップS3に
戻る。以上の処理を繰り返し行い、Y=α+βとなった
場合には、処理は終了し、その時のmaxに最大X座標
値が入っていることになる。
Next, the number of children of a1 is nu, the rightmost child of a1 is anu, and the X coordinate of anu is W.
(S4). Then, it is checked whether W is larger than max (S5), and if it is larger, max = W is set (S6).
= Y + 1 and a1 = anu (S7), and the process returns to step S3. When the above process is repeated and Y = α + β, the process ends, and the maximum X coordinate value is included in max at that time.

【0023】図7はブロック内における最大Y座標ma
xの求め方を示すフローチャートである。X座標を求め
る場合と同様に、対象要素のY座標をY1,max=Y
1として(S1)、処理2に進む(S2)。処理2を終
えた後のmaxに最大Y座標値が保持されていることに
なる。
FIG. 7 shows the maximum Y coordinate ma in the block.
It is a flowchart which shows how to obtain x. Similar to the case of obtaining the X coordinate, the Y coordinate of the target element is Y1, max = Y
The value is set to 1 (S1), and the process proceeds to 2 (S2). The maximum Y coordinate value is held in max after the processing 2 is finished.

【0024】図8は処理2の具体的シーケンスを示すフ
ローチャートである。先ず、対象要素をa1とする(S
1)。次に、a1には子供がいないかどうかチェックす
る(S2)。子供がいない場合にはY1>maxである
かどうかチェックし(S8)、そうである場合にはma
xの値にY1を代入し(S9)、その後リターンし、そ
うでない場合には即リターンする。
FIG. 8 is a flow chart showing a concrete sequence of the process 2. First, the target element is a1 (S
1). Next, it is checked whether or not a1 has any children (S2). If there are no children, check whether Y1> max (S8), and if yes, ma
Substitute Y1 for the value of x (S9), and then return, otherwise return immediately.

【0025】ステップS2において、a1に子供がいる
場合には、a1の子供の数をnoとする(S3)。そし
て、noが0であるかどうかチェックする(S4)。子
供がいない場合には、リターンする。若し、子供がいる
場合にはa1のn番目の子供をanoとし、そのY座標
をY1とする(S5)。次に、anoを対象として再帰
的に処理2を呼び出す(S6)。次に、no−1を新た
なnoとして(S7)、ステップS4に戻る。以上の処
理が終了した時点のmaxに最大Y座標値が格納されて
いることになる。
In step S2, if there are children in a1, the number of children in a1 is set to no (S3). Then, it is checked whether or not no is 0 (S4). If there are no children, return. If there is a child, the n-th child of a1 is ano and its Y coordinate is Y1 (S5). Next, the process 2 is recursively called for ano (S6). Next, no-1 is set as a new no (S7), and the process returns to step S4. The maximum Y coordinate value is stored in max at the time when the above processing is completed.

【0026】次に、本発明の実際の動作を図面に従って
説明する。図9は要素の配置位置座標を示す図である。
図に示すように第4象限に座標をとり、Y座標は下向き
に正としている。そして、図形の要素は、図に示すよう
なX方向及びY方向に1ずつ変化する離散的な値しかと
りえないものとする。
Next, the actual operation of the present invention will be described with reference to the drawings. FIG. 9 is a diagram showing the arrangement position coordinates of elements.
As shown in the figure, the coordinates are in the fourth quadrant, and the Y coordinate is positive in the downward direction. The elements of the figure are assumed to have only discrete values that change by 1 in the X and Y directions as shown in the figure.

【0027】図10はブロック内の全要素の座標を計算
するシーケンスを示すフローチャートである。(a)は
X座標の割り当てを、(b)はY座標の割り当てをそれ
ぞれ示している。X座標を求める場合には、親のX座標
をWとし(S1)、自分がC番目の子供である場合には
その値をCとし(S2)、W=W+Cを演算し(S
3)、得られた値WがX座標となる。
FIG. 10 is a flow chart showing a sequence for calculating the coordinates of all the elements in the block. (A) shows allocation of X coordinates, and (b) shows allocation of Y coordinates. To obtain the X coordinate, the parent X coordinate is set to W (S1), and if the child is the C-th child, the value is set to C (S2), and W = W + C is calculated (S
3) The obtained value W becomes the X coordinate.

【0028】Y座標を求める場合には、親のY座標をD
とし(S1)、D=D+1を演算し(S2)、演算した
結果DをY座標としている。図11は本発明の動作説明
図で、初期位置の状態を示している。図はブロックAと
ブロックBの間にブロックCを挿入する場合を示してい
る。つまり、同図はa1とb1の間にc1とc1に繋が
る要素集合(ブロックC)を追加する場合を示してい
る。
When obtaining the Y coordinate, the parent Y coordinate is D
(S1), D = D + 1 is calculated (S2), and the calculated result D is used as the Y coordinate. FIG. 11 is an explanatory diagram of the operation of the present invention, showing the state of the initial position. The figure shows the case where the block C is inserted between the block A and the block B. That is, the figure shows a case where an element set (block C) connected to c1 and c1 is added between a1 and b1.

【0029】指定するスペースは、可能な限り隣接して
配置するものとして1と設定する。追加レベル(c1の
座標)はY=2であり、ブロックCの最大Y座標は図
7,図8のフローに従って計算すると4となるため、追
加位置の左側にある要素のうち、追加により影響を受け
るのはY=2からY=4の要素である。
The designated space is set to 1 so as to be arranged as close to each other as possible. The additional level (coordinate of c1) is Y = 2, and the maximum Y coordinate of the block C is 4 when calculated according to the flow of FIG. 7 and FIG. It receives the elements of Y = 2 to Y = 4.

【0030】先ず、追加位置の右側にある要素を検索す
ると、b1のみである。また、追加したいc1とc1に
繋がる要素集合をブロックCと定義する。追加位置の左
側にある要素を検索するとa1のみである。従って、こ
の場合には、図11におけるブロックAの右側にブロッ
クCを配置することになる。
First, when the element on the right side of the added position is searched, only b1 is found. In addition, the element set connected to c1 and c1 to be added is defined as a block C. When the element on the left side of the added position is searched, only a1 is found. Therefore, in this case, the block C is arranged on the right side of the block A in FIG.

【0031】ブロックAの最大X座標を図6のフローに
従って計算すると3であるので、c1のX座標は4、Y
座標は1となる。c1の下に繋がる要素c2,c3,c
4は図10のフローに従って計算され、それぞれの座標
(W,D)が求まる。図12は本発明により決定された
ブロックCの配置を示す図である。ブロックAの右側に
スペース1をおいてブロックCが配置されている。
When the maximum X coordinate of the block A is calculated according to the flow of FIG. 6, it is 3, so the X coordinate of c1 is 4, Y
The coordinates are 1. Elements c2, c3, c connected under c1
4 is calculated according to the flow of FIG. 10, and the respective coordinates (W, D) are obtained. FIG. 12 is a diagram showing the arrangement of the blocks C determined by the present invention. A block C is arranged on the right side of the block A with a space 1 therebetween.

【0032】次に、ブロックCの右側にブロックBを配
置する場合について説明する。要素b1とc1は親が同
じであるので、次にb1とその下に繋がる要素をブロッ
クCの右側に配置することとなる。ここで、要素b1と
その下に繋がる要素の集合をブロックBと定義し、ブロ
ックBをブロックCの右側に追加すると考える。
Next, a case where the block B is arranged on the right side of the block C will be described. Since the elements b1 and c1 have the same parent, the element b1 and the element connected therebelow are arranged on the right side of the block C. Here, it is considered that the set of the element b1 and the elements connected thereunder is defined as a block B, and the block B is added to the right side of the block C.

【0033】この場合も、追加レベルはY=2である
が、ブロックBの最大Y座標は図7,図8のフローに従
って計算すると3となるため、追加位置の左側にある要
素のうち、ブロックBを追加することによって影響を受
けるのは、Y=2からY=3の要素である。
In this case as well, the additional level is Y = 2, but the maximum Y coordinate of the block B is 3 when calculated according to the flow of FIGS. 7 and 8. Therefore, among the elements on the left side of the additional position, the block It is the elements from Y = 2 to Y = 3 that are affected by the addition of B.

【0034】そこで、ブロックCのY=2からY=3の
要素に着目して、その最大X座標を図6のフローに従っ
て計算すると4となる。従って、ブロックBの要素b1
のX座標は5,Y座標は2となる。b1の下に繋がる要
素b2は図10のフローに従って計算され、その座標
(W,D)が求まる。図13は本発明により決定された
最終的なレイアウトを示す図である。ブロックCの右側
にスペース1をおいてブロックBが配置されている。
Then, focusing on the elements of Y = 2 to Y = 3 of the block C, the maximum X coordinate thereof is calculated according to the flow of FIG. Therefore, element b1 of block B
Has an X coordinate of 5 and a Y coordinate of 2. The element b2 connected under b1 is calculated according to the flow of FIG. 10, and its coordinates (W, D) are obtained. FIG. 13 is a diagram showing a final layout determined by the present invention. The block B is arranged on the right side of the block C with a space 1 therebetween.

【0035】次に、図11の(a)において、要素a3
とb2の間に要素d1を追加する場合について説明す
る。図14は、図形の初期配置例を示す図である。指定
するスペースは前の実施例と同様に1とする。要素d1
をブロックDとする。追加レベルはY=3であり、ブロ
ックDの最大Y座標は図7,図8のフローに従って計算
するとY=3となるため、追加位置の左側にある要素の
うち、追加により影響を受けるのはY=3の要素であ
る。
Next, in FIG. 11A, the element a3
A case where the element d1 is added between the line b2 and the line b2 is described. FIG. 14 is a diagram showing an example of initial placement of graphics. The designated space is 1 as in the previous embodiment. Element d1
Is block D. The additional level is Y = 3, and the maximum Y coordinate of the block D is Y = 3 when calculated according to the flow of FIG. 7 and FIG. It is an element of Y = 3.

【0036】先ず、追加位置の右側にある要素を検索す
るとb2のみである。追加位置の左側にある要素を検索
すると、a2とa3のみである。図14におけるブロッ
クA′の右側にブロックDを配置することになる。ブロ
ックA′の最大X座標は2であるので、d1のX座標は
3,Y座標は3となる。図15は図形の配列途中状態を
示す図で、ブロックA′の右隣にブロックDを配置した
状態を示している。
First, when the element on the right side of the added position is searched, only b2 is found. When searching the elements on the left side of the addition position, only a2 and a3 are found. The block D will be arranged on the right side of the block A'in FIG. Since the maximum X coordinate of the block A ′ is 2, the X coordinate of d1 is 3 and the Y coordinate thereof is 3. FIG. 15 is a diagram showing a state in which the figures are being arranged, and shows a state in which the block D is arranged to the right of the block A ′.

【0037】次に、要素d1とb2は親が異なるため、
b1とa1の親が同じであるかどうかチェックする。こ
の場合、同じであるので、a1に繋がるY=2からY=
3の要素の集合を新たにブロックD′とし、b1に繋が
るY=2からY=3の要素の集合を新たにブロック
B′′とする。そして、ブロックB′′をブロックD′
の右側に追加すると考える。
Next, since the elements d1 and b2 have different parents,
Check if the parents of b1 and a1 are the same. In this case, since they are the same, Y = 2 to Y = linked to a1
A set of elements of 3 is newly set as a block D ′, and a set of elements of Y = 2 to Y = 3 connected to b1 is newly set as a block B ″. Then, the block B ″ is replaced with the block D ′.
Think of adding to the right of.

【0038】ブロックD′のY=2からY=3までの要
素に注目して、その最大X座標を図6のフローに従って
計算すると、3となる。従って、b1のX座標は4,Y
座標は2となり、b1の下に繋がる要素b2は図10の
フローに従って計算され、その座標(W,D)が求ま
る。図16は本発明により決定された最終的なレイアウ
トを示す図である。ブロックD′の右側にスペース1を
おいてブロックB′′が配置されている。
Focusing on the elements from Y = 2 to Y = 3 of the block D ', the maximum X coordinate is calculated according to the flow of FIG. Therefore, the X coordinate of b1 is 4, Y
The coordinate is 2, and the element b2 connected under b1 is calculated according to the flow of FIG. 10 to obtain the coordinate (W, D). FIG. 16 is a diagram showing a final layout determined by the present invention. A block B ″ is arranged on the right side of the block D ′ with a space 1 therebetween.

【0039】上述の実施例では、要素集合を追加する場
合を例にとったが、本発明は要素集合を削除する場合に
ついても同様に適用することができる。例えば、図13
のレイアウトからブロックCを削除する場合について考
えると、この場合にはブロックAにブロックBを追加す
る処理と考えて本発明をそのまま適用することができ
る。
In the above embodiment, the case where the element set is added is taken as an example, but the present invention can be similarly applied to the case where the element set is deleted. For example, in FIG.
Considering the case where the block C is deleted from the layout, in this case, the present invention can be applied as it is, considering that it is a process of adding the block B to the block A.

【0040】[0040]

【発明の効果】以上、詳細に説明したように、本発明に
よれば視認性を向上し、より高速なグラフ図形レイアウ
ト装置を提供することができる。本発明によれば、グラ
フ図形の自動レイアウトを行うことによって、グラフ図
形の編集時に、分岐して要素集合を追加する際、追加す
るスペースを手作業で空ける必要があること、また要素
集合を追加及び削除することによって表示規則に従わな
い要素で出てきて見にくくなる等の問題がなくなる。ま
た、本発明によればある一定の表示規則に基づいた各要
素の自動的なレイアウトが可能となる。
As described above in detail, according to the present invention, it is possible to provide a graph figure layout apparatus which has improved visibility and has a higher speed. According to the present invention, by automatically laying out a graph figure, it is necessary to manually make an additional space when branching and adding an element set at the time of editing the graph figure. Also, by deleting it, there is no problem that the element does not follow the display rule and becomes difficult to see. Further, according to the present invention, it is possible to automatically layout each element based on a certain display rule.

【0041】従って、本発明によれば要素間に指定した
スペースを空けることによって、人間に理解しやすいよ
うなグラフ図形を作成することができ、グラフ図形の視
認性の向上に寄与するところが大きい。更に、要素集合
を追加又は削除する際、表示し直す必要がある要素集合
のみを検索し、必要部分のみの再表示が可能となり、よ
り高速なグラフ図形の自動レイアウトを行うことができ
る。
Therefore, according to the present invention, it is possible to create a graph figure that is easy for humans to understand by leaving a designated space between elements, and this greatly contributes to improving the visibility of the graph figure. Furthermore, when adding or deleting an element set, only the element set that needs to be displayed again can be searched, and only the necessary portion can be displayed again, and a faster automatic layout of the graph figure can be performed.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の原理ブロック図である。FIG. 1 is a principle block diagram of the present invention.

【図2】本発明の全体の動作を示すフローチャートであ
る。
FIG. 2 is a flowchart showing the overall operation of the present invention.

【図3】要素集合の位置計算のシーケンスを示すフロー
チャートである。
FIG. 3 is a flowchart showing a sequence of position calculation of an element set.

【図4】要素集合の位置計算のシーケンスを示すフロー
チャートである。
FIG. 4 is a flowchart showing a sequence of position calculation of an element set.

【図5】要素集合の位置計算のシーケンスを示すフロー
チャートである。
FIG. 5 is a flowchart showing a sequence of position calculation of an element set.

【図6】ブロック内における最大X座標maxの求め方
を示すフローチャートである。
FIG. 6 is a flowchart showing how to obtain the maximum X coordinate max in a block.

【図7】ブロック内における最大Y座標maxの求め方
を示すフローチャートである。
FIG. 7 is a flowchart showing how to obtain the maximum Y coordinate max in a block.

【図8】処理2の具体的シーケンスを示すフローチャー
トである。
FIG. 8 is a flowchart showing a specific sequence of processing 2.

【図9】要素の配置位置座標を示す図である。FIG. 9 is a diagram showing arrangement position coordinates of elements.

【図10】ブロック内の全要素の座標を計算するシーケ
ンスを示すフローチャートである。
FIG. 10 is a flowchart showing a sequence for calculating coordinates of all elements in a block.

【図11】本発明の動作説明図である。FIG. 11 is an explanatory diagram of the operation of the present invention.

【図12】本発明により決定されたブロックCの配置を
示す図である。
FIG. 12 is a diagram showing an arrangement of blocks C determined by the present invention.

【図13】最終的なレイアウトを示す図である。FIG. 13 is a diagram showing a final layout.

【図14】図形の初期配置例を示す図である。FIG. 14 is a diagram showing an example of initial placement of graphics.

【図15】図形の配列途中状態を示す図である。FIG. 15 is a diagram showing an intermediate state of arrangement of figures.

【図16】図形の最終的なレイアウトを示す図である。FIG. 16 is a diagram showing a final layout of graphics.

【図17】要素集合の例を示す図である。FIG. 17 is a diagram showing an example of an element set.

【符号の説明】[Explanation of symbols]

1 要素データ保持メモリ 2 データ入力部 3 位置情報計算部 4 表示部 1 Element data storage memory 2 Data input section 3 Position information calculation section 4 Display section

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 グラフ図形において線で結ばれた各要素
の位置情報及び親子のリンク関係を保持する要素データ
保持メモリ(1)と、 図形要素を追加する場合、その追加位置及び分岐元の要
素を、削除する場合、削除する図形要素を指定するデー
タ入力部(2)と、 データ入力部(2)からのデータ入力を受けて、前記要
素データ保持メモリ(1)の内容を参照しながら、表示
し直す必要がある要素集合の位置を計算する位置情報計
算部(3)と、 該位置情報計算部(3)で計算された位置に各要素を表
示する表示部(4)とで構成されたグラフ図形自動レイ
アウト装置。
1. An element data holding memory (1) for holding positional information of respective elements connected by a line in a graph figure and a parent-child link relationship, and when adding a figure element, the addition position and the branch source element When deleting, the data input section (2) for designating the graphic element to be deleted and the data input from the data input section (2) are received, and the contents of the element data holding memory (1) are referred to, A position information calculation unit (3) that calculates the position of an element set that needs to be displayed again, and a display unit (4) that displays each element at the position calculated by the position information calculation unit (3). Automatic graph figure layout device.
【請求項2】 追加する要素集合及びそれに伴って移動
する追加レベルの要素集合をそれぞれブロックとして考
え、ブロックの幅を考慮することによって、各ブロック
が重ならないように、またブロック毎に余分なスペース
ができないように、各ブロックの最上位の要素の座標を
決定して、追加及び移動するブロック内の全要素の表示
を行うようにしたことを特徴とする請求項1記載のグラ
フ図形自動レイアウト装置。
2. An element set to be added and an element set of an additional level that moves along with it are considered as blocks, and the widths of the blocks are taken into consideration so that the blocks do not overlap and an extra space is provided for each block. 2. The graph graphic automatic layout apparatus according to claim 1, wherein the coordinates of the uppermost element of each block are determined so that all the elements in the block to be added and moved are displayed so as to prevent the display. ..
【請求項3】 削除する要素集合及びそれに伴って移動
する削除レベルの要素集合をそれぞれブロックとして考
え、ブロックの幅を考慮することによって、各ブロック
が重ならないように、またブロック間に余分なスペース
ができないように、各ブロックの最上位の要素の座標を
決定して、移動するブロックの全要素の表示を行うよう
にしたことを特徴とする請求項1記載のグラフ図形自動
レイアウト装置。
3. An element set to be deleted and an element set of a deletion level that moves along with the element set are considered as blocks, and the widths of the blocks are taken into consideration so that the blocks do not overlap and an extra space is provided between the blocks. 2. The graph graphic automatic layout apparatus according to claim 1, wherein the coordinates of the uppermost element of each block are determined so that all the elements of the moving block are displayed so as to prevent such a problem.
【請求項4】 要素集合の追加及び削除に伴って移動す
る同じレベルの要素集合と、その上位のレベルの要素集
合との表示位置が表示規則に従わない場合、表示規則に
従うような移動が必要な最上位レベルの要素をもとにし
たブロックを新たに考え、その座標を決定することによ
りブロック内の全要素の表示を行うようにしたことを特
徴とする請求項1記載のグラフ図形自動レイアウト装
置。
4. When the display positions of the element set of the same level that moves with the addition and deletion of the element set and the element set of the higher level do not follow the display rule, it is necessary to move so as to follow the display rule. 2. A graph figure automatic layout according to claim 1, wherein a new block based on the highest level element is newly considered, and all the elements in the block are displayed by determining the coordinates thereof. apparatus.
【請求項5】 追加又は削除する要素集合及びそれに伴
って移動する要素集合をそれぞれブロックとして考え、
ブロックの幅を考慮することによって、各ブロックが重
ならないようにブロック間に任意のスペースを指定し、
各ブロックの最上位の要素の座標を決定することによ
り、追加及び移動するブロック内の全要素の表示を行う
ようにしたことを特徴とする請求項1記載のグラフ図形
自動レイアウト装置。
5. An element set to be added or deleted and an element set moved with it are considered as blocks,
By considering the width of the blocks, specify an arbitrary space between blocks so that each block does not overlap,
2. The graph graphic automatic layout apparatus according to claim 1, wherein all the elements in the block to be added and moved are displayed by determining the coordinates of the highest element of each block.
JP18472891A 1991-07-24 1991-07-24 Graph figure automatic layout device Expired - Fee Related JP3165180B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18472891A JP3165180B2 (en) 1991-07-24 1991-07-24 Graph figure automatic layout device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18472891A JP3165180B2 (en) 1991-07-24 1991-07-24 Graph figure automatic layout device

Publications (2)

Publication Number Publication Date
JPH05242195A true JPH05242195A (en) 1993-09-21
JP3165180B2 JP3165180B2 (en) 2001-05-14

Family

ID=16158330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18472891A Expired - Fee Related JP3165180B2 (en) 1991-07-24 1991-07-24 Graph figure automatic layout device

Country Status (1)

Country Link
JP (1) JP3165180B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5560467A (en) * 1991-10-08 1996-10-01 Kabushiki Kaisha Ace Denken Exchange machine having bank note qualification determining capacity
JP2009169754A (en) * 2008-01-17 2009-07-30 Toshiba Corp Information processor, information processing method, and information processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5560467A (en) * 1991-10-08 1996-10-01 Kabushiki Kaisha Ace Denken Exchange machine having bank note qualification determining capacity
JP2009169754A (en) * 2008-01-17 2009-07-30 Toshiba Corp Information processor, information processing method, and information processing program

Also Published As

Publication number Publication date
JP3165180B2 (en) 2001-05-14

Similar Documents

Publication Publication Date Title
JP4044971B2 (en) Search method using image information
US9445016B2 (en) Features such as titles, transitions, and/or effects which vary according to positions
US9275479B2 (en) Method, system and computer program product for creating collages that visually resemble a particular shape or group of shapes
US20130097552A1 (en) Constructing an animation timeline via direct manipulation
CN103530021B (en) The system of selection of entity and device in drawing
TW201322180A (en) Method and apparatus for rendering overlapped objects
WO2007088827A1 (en) Content display method content display device and program
US8402417B2 (en) Spine selection mode for layout editing
JPH05242195A (en) Automatic layout device for graph figure
JPH076076A (en) Hypermedia system
US5493726A (en) Operation guidance generating unit and method of generating operation guidance
JPH0785099A (en) System for displaying hierarchy
KR20010039555A (en) Layout design system of semiconductor ic device, layout design method of semiconductor ic device and computer-readable recording medium on which programs for allowing computer to execute respective means in the system or respective steps in the method are recorded
JPH06243172A (en) Electronic filing device
JP5100560B2 (en) Information processing apparatus, information processing method, and program
JPH0997268A (en) Image processor and method for image processing
JP4736081B2 (en) Content browsing system, content server, program, and storage medium
JPH0333795A (en) Method and device for displaying enlarged diagram
CN112309232B (en) Method and device for determining lane line
JP3083552B2 (en) Hierarchy editing processor
JPH01220073A (en) Method and device for design aid
JPH04288593A (en) Image display device
JPH08241345A (en) Schedule generation support system
JPH06139225A (en) Method for displaying simulation result
CN117830985A (en) Lane line processing method, lane line processing device, lane line processing product, lane line processing equipment and lane line processing medium

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000418

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20010220

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080302

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090302

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees