JPS613281A - Graphic processor - Google Patents

Graphic processor

Info

Publication number
JPS613281A
JPS613281A JP59121799A JP12179984A JPS613281A JP S613281 A JPS613281 A JP S613281A JP 59121799 A JP59121799 A JP 59121799A JP 12179984 A JP12179984 A JP 12179984A JP S613281 A JPS613281 A JP S613281A
Authority
JP
Japan
Prior art keywords
data
line segment
graphic
line
graphic data
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.)
Pending
Application number
JP59121799A
Other languages
Japanese (ja)
Inventor
Hiroshi Saotome
弘 早乙女
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP59121799A priority Critical patent/JPS613281A/en
Publication of JPS613281A publication Critical patent/JPS613281A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To compress the quantity of graphic data by drawing auxiliary lines which are less than a half as many as segments constituting a graphic form without putting them in the graphic data as segment data. CONSTITUTION:The graphic processor is provided with a keyboard 11, the 1st storage device 14 which stores the graphic data, the 2nd storage device 15 which stores graphic data editing programs, a central processor 12 which executes those programs, a display device 13 which displays the graphic data, and a circuit 16 which paints out a closed area of an optional graphic form on the display 13 by specifying one point in the area. A segment which is retrieved is rearranged as the 1st segment of the graphic data. Consequently, an auxiliary segment 57 is set.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は図形処理装置に関し、特に部分閉領域の図形塗
りつぶし処理に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a graphic processing device, and more particularly to graphic filling processing for a partially closed area.

〔発・明の背景〕[Background of the invention]

図形の塗りつぶしは、図形全体でなく対角線で区切った
部分領域に対して要求されることが多い。
Filling of a figure is often required not for the entire figure but for partial areas separated by diagonal lines.

従来は、このような対角線で区切られる部分領域の塗]
つぶしを計算機内で表現するために、該当対角線(補助
線)をデータとして管理した。その丸め以下の様な欠点
があった。
Conventionally, painting of partial areas separated by diagonal lines like this]
In order to express the crushing within the computer, the corresponding diagonal line (auxiliary line) was managed as data. There were shortcomings such as rounding.

従来の図形塗シつぶしは、第2図(a)の図形21に対
して第2図の)の図形22の様な塗シつぶしだけを行っ
ていた。そのため、図形21では第2図(d)の図形2
4の様な図形内部分閉領域を塗シつぶせない。このため
図形24の様な塗りつぶしは、第2図(C)の図形23
の様に補助線25を加えることによって行なった。
In conventional figure filling, only the figure 21 in FIG. 2(a) is filled in like the figure 22 in FIG. 2(a). Therefore, in figure 21, figure 2 in figure 2(d)
It is not possible to fill in a partially closed area inside a figure like 4. For this reason, the filling like figure 24 is the same as figure 23 in Figure 2 (C).
This was done by adding an auxiliary line 25 as shown in the figure.

そして、その補助線25を図形データとして管理した。Then, the auxiliary line 25 was managed as graphic data.

その結果、塗りつぶしを行うために、余分な線分データ
線分を持たなければならないという欠点があった。
As a result, there is a drawback that an extra line data line segment must be provided in order to perform filling.

また、従来方式では、線分25をデータとして管理した
ために、図形24の様な塗りつぶし解除後、オペレータ
に線分25を消去させる。という複雑な手順を行なわせ
る欠点があった。
Further, in the conventional method, since the line segment 25 is managed as data, the operator is required to erase the line segment 25 after the filling of the graphic 24 is canceled. The disadvantage was that it required a complicated procedure.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、図形データ量を増加させることなく、
図形内の部分閉領域の塗りつぶしができる図形処理装置
を提供することにある。
The purpose of the present invention is to
An object of the present invention is to provide a graphic processing device capable of filling in a partially closed area within a graphic.

〔発明の概要〕[Summary of the invention]

本発明は、前記の補助線データを図形データとして含ま
せることなく、下記の規則によって描写することによ9
部分閉領域の塗りつぶしを行うものである。この規則を
第3図で説明する。例示した図形データは、線分51〜
54のデータを含んでいる。このどき、線分の配列は組
み合せでよい。
The present invention does not include the above-mentioned auxiliary line data as figure data, but by drawing according to the following rules.
This is used to fill in a partially closed area. This rule will be explained with reference to FIG. The illustrated graphic data is line segment 51~
Contains 54 data. Nowadays, the arrangement of line segments can be a combination.

そして各線分の始点、終点を矢印の向きに変えて線分を
連続させる。その後、補助線の各端点を始点とする線分
を検索して、該当線分データを図形内線分データの先頭
から再配置する。補助線57の場合は、補助線57の端
点を始点とする線分51と線分53を先頭から再配置す
る。故に、図形データ内での線分データは線分51.5
3゜52.54の順で配置される。すると、先頭から2
つの線分の各始点を端点とする線分を補助線とする。以
上が補助線を描写する規則である。
Then, change the starting and ending points of each line segment in the direction of the arrow to make the line segments continuous. Thereafter, line segments starting from each end point of the auxiliary line are searched for, and the corresponding line segment data is rearranged from the beginning of the line segment data within the figure. In the case of the auxiliary line 57, line segments 51 and 53 starting from the end point of the auxiliary line 57 are rearranged from the beginning. Therefore, the line segment data within the figure data is line segment 51.5.
They are arranged in the order of 3°52.54. Then, 2 from the beginning
A line segment whose end point is the starting point of each line segment is an auxiliary line. The above are the rules for drawing auxiliary lines.

また、補助線をデータとして持たずに規則で描写するた
め、塗シつぶし解除後、ユーザに補助線を意識させるこ
となく補助線の消去が行なえる。
Furthermore, since the auxiliary lines are drawn according to rules without having them as data, the auxiliary lines can be erased without making the user aware of the auxiliary lines after the filling is canceled.

従って本発明は、指定された図形を構成する各線分の向
きを設定して線分を連続させる手段と、カーソル位置に
始点をもつ線分を検索して該当線分データを図形データ
の先頭から再配置する手段と、再配置された図形データ
の第1.第2番目の線分の各始点を端点とする補助線デ
ータを発生させる手段を設け、これらの線分データによ
って描画される閉領域を塗りつぶすようにしたことを特
徴とするう 〔発明の実施例〕 以下、本発明になる図形処理装置のブロック回路を第1
図によシ説明する。この実施例における図形処理装置は
、入力装置としてキーボード11゜プログラムを実行す
るCPt12.データを表示するディスプレイ13、デ
ータを記憶する第1記憶装置14、図形編集を制御する
プログラムを記憶する第2記憶装置15、ディスプレイ
上の任意の閉領域において領域内の1点を指定すること
により閉領域の塗シつぶしを行う回路16から構成され
ている。
Therefore, the present invention provides a means to set the direction of each line segment constituting a specified figure to make the line segments continuous, and a means to search for a line segment having a starting point at the cursor position and to extract the corresponding line segment data from the beginning of the figure data. means for rearranging the rearranged graphic data; [Embodiment of the invention ] Hereinafter, the block circuit of the graphic processing device according to the present invention will be described as the first block circuit.
This will be explained with the help of a diagram. The graphic processing device in this embodiment includes a keyboard 11 as an input device, and a CPt12 for executing a program. By specifying a point within an arbitrary closed area on the display, a display 13 for displaying data, a first storage device 14 for storing data, a second storage device 15 for storing a program for controlling figure editing, It is composed of a circuit 16 that fills in closed areas.

次に、操作方法を第5図、第6を参照して説明する。オ
ペレータは、塗りつぶしす閉領域を含む図形の近くにカ
ーソル41を移動させ、塗シつふしを行う図形を指定す
る(処理ステップ31)。
Next, the operating method will be explained with reference to FIGS. 5 and 6. The operator moves the cursor 41 near a figure that includes a closed area to be filled in, and specifies the figure to be filled in (processing step 31).

次に、図形の部分閉領域を構成する補助線の2端点を指
定する(処理ステップ32)。指定はカーソルをカーソ
ル42.43の順に移動して、その位置に最も近い頂点
を検索することで行なう。指定後線分45が描写される
。次に、部分閉領域をカーソル44で指定する(処理ス
テップ33)。
Next, two end points of the auxiliary line forming the partially closed region of the figure are specified (processing step 32). The designation is performed by moving the cursor in the order of cursors 42 and 43 and searching for the vertex closest to that position. After designation, line segment 45 is drawn. Next, a partially closed region is specified with the cursor 44 (processing step 33).

次KCPU12によるデータ処理の詳細なフローを第1
図より説明する。処理ステップ701で指定図形が閉図
形であるかを第7図に示すデータ構造の領域602から
調べ、閉図形でない場合はエラーメツセージを表示して
処理を終了する。閉図形の場合には処理ステップ702
で指定図形を構成している線分データが、図形データ内
で連続になるように組み変える。例えば、第3図の多角
形では第7図の6Aの様なデータ配置・になる。っまシ
、線分51,52,53,54の各始点・終車を矢印の
向きに修正して、線分51の終点と線分52の始点が一
致する様に線分データを配置する。同様に線分53.5
4を配置する。処理ステップ703ではmbつぶしのた
めに補助線が必要かどうかをキー人力から判断する。補
助線が必要な場合は、処理ステップ704で補助線の端
点を指すカーソル位置(Xi、YI Jを読む。処理ス
テップ705ではカーソル位置(XI、Yl)に最も近
い端点な始点に持つ線分を、図形データ内より検索する
。この検索で、該当線分が存在しない場合と、2本以上
存在、した場合は、エラーとして処理する。つまシ、始
点を共有する線分が存在する図形では、その始点を端点
とする補助線を禁止する。この制約を設けることによっ
て、任意の閉図形で設定しうる補助線の本数は、その閉
図形を構成する線分の半分以下になる。処理ステップ7
06では検索された線分を図形データのg;i目の線分
として再配置する。処理ステップ707と708で、最
大設定可能な補助線分について処理ステップ704,7
05と706を繰シ返し実行するよう制御する。
NextThe detailed flow of data processing by the KCPU 12 is explained in the first part.
This will be explained from the diagram. In processing step 701, it is checked whether the specified figure is a closed figure from the area 602 of the data structure shown in FIG. 7, and if it is not a closed figure, an error message is displayed and the process is terminated. In the case of a closed figure, process step 702
Recombines the line data that makes up the specified shape so that it is continuous within the shape data. For example, the polygon in FIG. 3 has a data arrangement like 6A in FIG. 7. First, correct the start and end points of line segments 51, 52, 53, and 54 in the direction of the arrows, and arrange the line segment data so that the end point of line segment 51 and the start point of line segment 52 match. Similarly, line segment 53.5
Place 4. In processing step 703, whether or not an auxiliary line is necessary for crushing the MB is determined based on the key power. If an auxiliary line is required, the cursor position (Xi, YI J) pointing to the end point of the auxiliary line is read in processing step 704. In processing step 705, the line segment having the starting point that is the end point closest to the cursor position (XI, Yl) is read. , searches within the figure data. If the corresponding line segment does not exist, or if two or more lines exist, it will be treated as an error. For figures that have line segments that share a starting point, Auxiliary lines whose end points are the starting point are prohibited.By setting this restriction, the number of auxiliary lines that can be set for any closed figure is less than half of the line segments that make up the closed figure.Processing step 7
In step 06, the retrieved line segment is rearranged as the g;i-th line segment of the graphic data. In processing steps 707 and 708, processing steps 704 and 7 are performed for the maximum settable auxiliary line segment.
05 and 706 are controlled to be executed repeatedly.

処理ステップ704〜708を第3図、第7図用いて詳
細に説明する。第3図の補助線57を引くために、カー
ノルを参照符号59の位置に移動する。その位置(XI
、Yl)を読み、第7図のデータ6A内での線分データ
605〜608から、(XI、Yl)を始点として持つ
線分データを検索する。そして、該当線分は線分51(
データ605)だけなので、線分51(データ605)
を図形データ内の第i(j =o)線分位置610に再
配置する。その後1==lとなるため、次の参照符号5
8のカーソルの位置(X2.Y2 )t”読み、同様に
第i線分以降から該当線分を検索する。
Processing steps 704 to 708 will be explained in detail using FIGS. 3 and 7. To draw the auxiliary line 57 in FIG. 3, the kernel is moved to the position 59. Its position (XI
, Yl) and searches for line segment data having (XI, Yl) as a starting point from line segment data 605 to 608 in data 6A in FIG. Then, the corresponding line segment is line segment 51 (
Since there is only data 605), line segment 51 (data 605)
is relocated to the i-th (j=o) line segment position 610 in the graphic data. After that, 1==l, so the next reference number 5
8, the cursor position (X2.Y2)t'' is read, and the corresponding line segment is similarly searched from the i-th line segment onwards.

つまシ、データ611〜613内の線分から検索する。Search from line segments in the data 611 to 613.

モして該当線分の再配置後1==2となるため、次の補
助線(NEXTL iNE>が必要であるかを選択させ
る。必要な場合は、上記と同様な制御を行う。以上が、
処理ステップ704〜708までの説明である。
Since 1 = = 2 after rearranging the corresponding line segment, the user is asked to select whether the next auxiliary line (NEXTL iNE> is necessary. If necessary, the same control as above is performed. ,
This is an explanation of processing steps 704 to 708.

各線分データが、第7図のデータ6Bの様に配置された
後、処理ステップ709で塗シっぷし情報l(データ6
09A)をセットする。塗シっぷし情報1(データ60
9A)は、図形内に設定された補助線の本数を記憶する
。第3図の場合は、2塗りつぶし情報1=2とセットさ
れる。
After each line segment data is arranged as shown in data 6B in FIG.
09A). Painting ship information 1 (data 60
9A) stores the number of auxiliary lines set within the figure. In the case of FIG. 3, 2 fill information 1=2 is set.

次に、塗りつぶす領域をオペレータに指定させる。オペ
レータは、塗りつぶす領域内の任意の1点を、カーソル
を使って指定する。処理ステップ710ではそのカーソ
ル位置を読み込む。処理ステップ711でその位置が図
形内に含まれるか、を調べる。含まれる場合は、その位
置を塗シっぷし回路16にその位置を渡して塗シっぷす
。含まれない場合は、処理ステップ712で塗シっぷし
情報2.3をセットする。塗シつぶし情報2(データ6
09B)は、塗シつぶしデープルへのポインタである。
Next, the operator is asked to specify the area to be filled. The operator uses a cursor to specify an arbitrary point within the area to be filled. Processing step 710 reads the cursor position. In processing step 711, it is checked whether the position is included in the figure. If it is included, the position is passed to the paint ship circuit 16 to paint the ship. If it is not included, the paint ship information 2.3 is set in processing step 712. Fill information 2 (data 6
09B) is a pointer to a filled daple.

塗りつぶし情報3(データ609C1は、図形内に設定
された塗りつぶし領域数である。
Filling information 3 (data 609C1 is the number of filling areas set within the figure.

以上のようにして、補助線を含む塗シつぶし情報が構・
成される。
As described above, fill information including auxiliary lines is configured.
will be accomplished.

次に、それらの情報でどの様に塗シつぶし図形が表示さ
れるかを、第8図のフローで説明する。
Next, how a fill-in figure is displayed using such information will be explained using the flowchart of FIG. 8.

処理ステップ81で変数jに塗シつぶし情報1をセット
する。つまシ、変数i(第6図のデータ609A)に補
助線の本数をセットする。処理ステップ82で、設定す
る補助線を監視する。処理ステップ83で第に番目の補
助線の始点(Xl。
In processing step 81, filling information 1 is set in variable j. Set the number of auxiliary lines to the variable i (data 609A in FIG. 6). In process step 82, the auxiliary line to be set is monitored. In processing step 83, the starting point of the second auxiliary line (Xl.

Yl)を図形データ内の第に番目の線分データの始点と
する。処理ステップ84で第に番目の補助線の終点(X
2.Y2 )を、図形データ内の第に+1番目の線分デ
ータの始点とする。処理ステップ85で、2点(XI、
Yl)、(X2.Y2)を両端点とする線分を描写する
。以上で補助線が設定される。次に、処理ステップ87
で変数量に塗りつぶし情報3をセットする。つまり、塗
りつぶし領域数をセットすることである。そして、処理
ステップ88と89で塗シつぶし管理テーブル(データ
6C)よシ、塗シつぶし領域数分だけの情報を塗シつぶ
し回路16に渡す。これによって、図形塗りつぶしが表
示される。
Let Yl) be the starting point of the th line segment data in the graphic data. In processing step 84, the end point (X
2. Y2) is the starting point of the +1st line segment data in the graphic data. In processing step 85, two points (XI,
Draw a line segment whose end points are Yl) and (X2.Y2). The auxiliary line is now set. Next, processing step 87
Set the fill information 3 to the variable amount. In other words, it sets the number of filled areas. Then, in processing steps 88 and 89, the fill-in management table (data 6C) and information corresponding to the number of fill-in areas are passed to the fill-in circuit 16. This will display the shape fill.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、任意の図形に対して、先に説明した規
則を適用することによシ、その図形を構成する線分の半
分以下の補助線を図形データ内に線分データとして含ま
せることなしに描写可能なため、図形データ量の圧縮に
なる、という効果がある。
According to the present invention, by applying the above-described rules to any figure, auxiliary lines that are less than half of the line segments constituting the figure are included as line segment data in the figure data. This has the effect of compressing the amount of graphic data because it can be depicted without any problems.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明のハードフェア構成、第2図は従来の塗
9つぶし図形の表示図、第3図は本発明の操作フロー、
第4.第5図は本発明の実施例図、第6図はデータ構造
、第7,8図は本発明の詳細なフロー、第1図および第
8は本発明になる図形処理装置データ処理フローチャー
ト、第2図(a)〜(d)は従来装置の塗りつぶし図形
表示例、第3図および第6に′i本発明装置の塗シつぶ
し図形表示例、第4図は本発明になる図形処理装置のブ
ロック図、第5図はその操作フローチャート、第7図は
図形データ構造図である。 11・・・キーボード、12・・・CPU、13・・・
ディスプレイ、14・−・第1記憶装置、15・・−第
2記憶装置、16・・・塗りつぶし回路、83〜85・
・・補助線データを発生する処理ステップ、702・・
・指定図形を構成している線分が連続するようにデータ
を組み変える処理ステップ、704〜708・・・補助
線指示に従って線分データを再配置する処理ステップ。
FIG. 1 is a hard fair configuration of the present invention, FIG. 2 is a display diagram of a conventional 9-filled figure, and FIG. 3 is an operation flow of the present invention.
4th. FIG. 5 is an embodiment diagram of the present invention, FIG. 6 is a data structure, FIGS. 7 and 8 are detailed flows of the present invention, FIGS. 1 and 8 are data processing flowcharts of a graphic processing device according to the present invention, 2(a) to (d) are examples of filled-in graphic display of the conventional device, FIGS. 3 and 6 are examples of filled-in graphic display of the device of the present invention, and FIG. 4 is an example of the filled-in graphic display of the device of the present invention. A block diagram, FIG. 5 is an operation flowchart, and FIG. 7 is a graphic data structure diagram. 11...Keyboard, 12...CPU, 13...
Display, 14...-First storage device, 15...-Second storage device, 16... Filling circuit, 83-85.
...Processing step for generating auxiliary line data, 702...
Processing step of rearranging the data so that the line segments constituting the specified figure are continuous, 704 to 708...Processing step of rearranging the line segment data according to the auxiliary line instructions.

Claims (1)

【特許請求の範囲】[Claims] 1、データを入力する入力装置としてのキーボードと、
図形データを記憶する第1記憶装置と、図形データを編
集するためのプログラムを記憶する第2記憶装置と、そ
れらプログラムを実行する中央処理装置と、図形データ
を表示するビットマップディスプレイと、ディスプレイ
上の任意の図形の閉領域において、該領域内の1点を指
定することにより、該閉領域の塗りつぶしを行う回路を
具備した図形処理装置において、前記中央処理装置は、
指定された図形を構成する各線分の向きを設定して線分
を連続させる手段と、カーソル位置に始点をもつ線分を
検索して該当線分データを図形データの先頭から再配置
する手段と、再配置された図形データの第1、第2番目
の線分の各始点を端点とする補助線データを発生する手
段とを備えたことを特徴とする図形処理装置。
1. A keyboard as an input device for inputting data;
A first storage device that stores graphic data, a second storage device that stores programs for editing graphic data, a central processing unit that executes these programs, a bitmap display that displays graphic data, and a display screen. In the figure processing device, the central processing unit includes a circuit that fills in a closed area of an arbitrary figure by specifying one point in the area.
A method for setting the direction of each line segment constituting a specified figure to make the line segments continuous, and a means for searching for a line segment having a starting point at the cursor position and rearranging the corresponding line segment data from the beginning of the figure data. , means for generating auxiliary line data whose end points are the starting points of the first and second line segments of the rearranged graphic data.
JP59121799A 1984-06-15 1984-06-15 Graphic processor Pending JPS613281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59121799A JPS613281A (en) 1984-06-15 1984-06-15 Graphic processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59121799A JPS613281A (en) 1984-06-15 1984-06-15 Graphic processor

Publications (1)

Publication Number Publication Date
JPS613281A true JPS613281A (en) 1986-01-09

Family

ID=14820205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59121799A Pending JPS613281A (en) 1984-06-15 1984-06-15 Graphic processor

Country Status (1)

Country Link
JP (1) JPS613281A (en)

Similar Documents

Publication Publication Date Title
JPH0723994B2 (en) Document creation method
JPH0723995B2 (en) Document adjustment method
JPH06223147A (en) Graphic display processing system
JPS613281A (en) Graphic processor
JPH03167625A (en) Menu display system
JP2585311B2 (en) How to create a program
JPS58163036A (en) Automatic numbering device
JPS61128325A (en) Picture control system
JP2000122770A (en) Graphic display method for sorted file group
JPH01266602A (en) Generating method for production process schedule
JPH0850602A (en) Method and device for automatically generating three dimensional shape
JP3978173B2 (en) Form creation method
Cullen et al. OLDAS: An On-Line Digital Analog Simulator
JP2928858B2 (en) Multi-window display control apparatus and method
JP3977874B2 (en) Document output method and apparatus
JPH0696145A (en) Processing system for character string/graphic
JPS605955B2 (en) Display control method
JPS60181977A (en) Line drawing processing system
Al-Hashemy Development of an interactive computer graphics system with application to data fitting
JPH01246673A (en) Graphic processor
JPS63214831A (en) Control method for file in work station
Ratcliffe Interface design with TBK
Lewis Solutions of Partial Differential Equations using Graphical Display Systems
JPH10232948A (en) Device and method for editing cad character string, and computer-readable recording medium where cad character string editing program is recorded
JPH01303572A (en) Menu producing device