JPS61241880A - Paint-out device for closed graphic form - Google Patents

Paint-out device for closed graphic form

Info

Publication number
JPS61241880A
JPS61241880A JP8242785A JP8242785A JPS61241880A JP S61241880 A JPS61241880 A JP S61241880A JP 8242785 A JP8242785 A JP 8242785A JP 8242785 A JP8242785 A JP 8242785A JP S61241880 A JPS61241880 A JP S61241880A
Authority
JP
Japan
Prior art keywords
dot
memory
filling
section
paint
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
JP8242785A
Other languages
Japanese (ja)
Inventor
Susumu Tsuhara
津原 進
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 JP8242785A priority Critical patent/JPS61241880A/en
Publication of JPS61241880A publication Critical patent/JPS61241880A/en
Pending legal-status Critical Current

Links

Landscapes

  • Digital Computer Display Output (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE:To paint out an optional closed pattern by carrying out a paint-out action up to a boundary line in the right or left horizontal direction based on a present dot according to the result obtained from a paint-out deciding part. CONSTITUTION:A dot train of a closed graphic form is already developed on a VRAM 165 and a paint-out action is started. A dot generating part 5 for closed graphic form produces again the same dot string in the clockwise direction. Here the positional relation among the latest three dots is always checked out of the dot string produced from the part 5 on the VRAM 165. Then the picture elements to be painted out are decided for repetition of the paint-out actions. The picture element right adjacent to a present dot Pk is defined as a start point to perform a paint-out action in the right direction on the form up to a boundary line. Hereafter, the same action is repeated and the part 5 produces the final dot to complete the action to the dot. Thus the paint-out action is over. In such a way, a closed graphic form can be painted out at a high speed.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、二次元閉図形の境界線ドツト列を入力とし、
その閉図形の内部を塗りつぶして出力する閉図形塗りつ
ぶし装置に関し、特に、ラスタ・スキャン型CRTを用
いたカラー・グラフィック・ディスプレイなどに適用で
きる閉図形塗)つぶし装置忙関するものである。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention takes as input a row of boundary line dots of a two-dimensional closed figure,
The present invention relates to a closed figure filling device that fills in the inside of the closed figure and outputs the result, and particularly to a closed figure filling device that can be applied to a color graphic display using a raster scan type CRT.

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

従来の閉図形塗)つふし法としては。 As for the conventional closed figure painting) Tsubushi method.

(11Paint法(J、D、 FOLEY and 
A、 VAN DAM 。
(11Paint method (J, D, FOLEY and
A.VAN DAM.

THE SYSEMS PROGRAMMING 5E
RIES Punda −menta18 of In
teraotive Computer Graphi
08+pp、41B−450) (215oan Line法(同上−PP、457−4
60)(31FAge Flag法(B、D、 Aak
land and N、H,Weste+// The
 Edge Flag Algorithm−A Fi
ll Methodfor Ra5ter 5can 
Displa)’szz、 rggg Trans。
THE SYSTEM PROGRAMMING 5E
RIES Punda-menta18 of In
teraative Computer Graphics
08+pp, 41B-450) (215oan Line method (same as above-PP, 457-4
60) (31FAge Flag method (B, D, Aak
land and N,H,Weste+//The
Edge Flag Algorithm-A Fi
ll Method for Ra5ter 5can
Displa)'szz, rggg Trans.

Canput、 Vol、 C−50、pp、 41−
48 。
Canput, Vol, C-50, pp, 41-
48.

Jan、1981) (4)反転点法(特開昭59−85573号公報)など
がある。
Jan, 1981) (4) Inversion point method (Japanese Unexamined Patent Publication No. 85573/1983).

(1)は、検力つぶしを始める出発点として、閉図形の
内部の1点を与える必要がある。しかしながら、たとえ
ば、閉図形の形状を変更するような場合5前に与えられ
た塗りつぶしの出発点が、形状変更後も必らず、閉図形
の内部[6ることけ保証できない。従って、形状変更の
都度、塗りつぶしの出発点を与えなければならず、操作
がわずられしいという欠点がある。
In (1), it is necessary to give one point inside the closed figure as the starting point for starting the power crushing. However, for example, when changing the shape of a closed figure, it cannot be guaranteed that the starting point for filling given previously will always be inside the closed figure even after the shape is changed. Therefore, each time the shape is changed, a starting point for filling must be provided, making the operation cumbersome.

(21a、多角形の頂点を結ぶ線分の始点及び終点座標
(以下、始終点という。)を作業用メモIJ K記憶し
、線分をソーティングする必要がある。このため、閉図
形がスプライン曲線であるような場合には、大量の微小
線分を記憶しなければならず、膨大な作業用メモIJ 
’に必要とする。また、ソーティングにも時間がかかシ
、塗りつぶしの高速化が期待できないなどの問題もある
(21a, It is necessary to memorize the coordinates of the starting and ending points of the line segments connecting the vertices of the polygon (hereinafter referred to as starting and ending points) and sort the line segments. In such cases, it is necessary to memorize a large number of minute line segments, and a huge amount of work memo IJ is required.
'to require. There are also other problems, such as sorting takes time and filling speed cannot be expected.

(3)は、境界線から特異点を除いた始終点を記憶する
必要があ夛、通常はVideo RAMと同サイズの始
終点プレーンを作業用に用意する。このため、大量の作
業メモリが必要となる。
In (3), it is necessary to memorize the start and end points of the boundary line excluding the singular point, so usually a start and end point plane of the same size as the Video RAM is prepared for work. This requires a large amount of working memory.

(4)は、閉領域を定義する反転点を記憶する必要があ
る。単純な閉図形では、反転点の数は少ない(例えば、
矩形では1反転点け4頂点)が、スプライン曲線などの
一般の閉図形になると1反転点の数は膨大なものとなシ
、大量の作業用メモリを必要とする。
(4) requires storing the inversion points that define the closed region. In simple closed shapes, the number of reversal points is small (e.g.
In the case of a rectangle, there is one inversion point and four vertices), but in the case of a general closed figure such as a spline curve, the number of one inversion point is enormous, and a large amount of working memory is required.

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

本発明の目的は、上記したような従来技術の欠点をなく
シ、操作性がよく、大量の作業用メモリが不要で、しか
も高速に閉図形の検力つぶしが行なえる閉図形塗)つぷ
し装置を提供することにある。
The object of the present invention is to eliminate the above-mentioned drawbacks of the prior art, provide a closed shape painting method that has good operability, does not require a large amount of working memory, and can quickly crush the power of closed shapes. The goal is to provide equipment.

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

上記目的を達成するために、本発明では、閉図形のドツ
ト列発生部により順次発生されるドツト列のうち、常に
最新の3ドツトのドツト間水平。
In order to achieve the above object, in the present invention, among the dot rows sequentially generated by the closed figure dot row generator, the dot-to-dot distance of the latest three dots is always horizontal.

垂直変位量を保持するメモリと、該メモリ内容の符号を
反転させる反転部と、前記メモリ内容を読み出し現ドッ
トヲ基準として右水平方向(または左水平方向)に塗)
つぶすか否かを、また前記符号反転部によって符号が反
転されたメモリ内容を読み出し現ドツトを基準として左
水平方向(または右水平方向)K塗りつぶすか否かを、
それぞれト°ット間位置関係によ勺判定する検力つぶし
判定部と、その判定結果に基づいて、現ドツトを基準と
して右水平方向または左水平方向に境界線まで達するま
で塗りつぶしを実行する塗力つぶし部と、で構成し、そ
れにより任意の閉図形について塗シつぶすことを可能に
した。
a memory that holds the amount of vertical displacement; an inverter that inverts the sign of the memory content; and a memory that reads out the memory content and paints it in the right horizontal direction (or left horizontal direction) with the current dot as a reference).
Whether to fill in the left horizontal direction (or right horizontal direction) with the current dot as a reference by reading out the memory contents whose sign has been inverted by the sign inverting section,
There is a power filling judgment section that makes a judgment based on the positional relationship between dots, and a filling section that executes filling in the right horizontal direction or left horizontal direction from the current dot based on the judgment result until it reaches the boundary line. It is made up of a fill part and a fill part, which makes it possible to fill in any closed figure.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を図面を用いて説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例を示すブロック図であるO 先ず、本実施例における概略的な動作について説明する
FIG. 1 is a block diagram showing one embodiment of the present invention. First, the general operation of this embodiment will be explained.

塗りつぶしを行なう最初の状態では、第1図に示すT/
RAM (’/1dea RAM ) 165上にはす
でに第2図に示すような閉図形のドツト列(図中・印が
展開されているものとする。この状態で塗力つぶしが開
始される。
In the initial state of filling, the T/
It is assumed that a closed figure dot row (marked in the figure) has already been developed on the RAM ('/1dea RAM) 165 as shown in FIG. 2. In this state, filling force is started.

まず、閉図形のドツト列発生部5は、再度、第2図に示
すのと同じドツト列を、時計回シの方向に発生する。こ
の時、VRAM165上では、境界線が書き込まれるの
ではなく、つぎのような操作により、前述の如く展開さ
れている閉図形の内部が検力つぶされる。
First, the closed figure dot train generating section 5 again generates the same dot train as shown in FIG. 2 in the clockwise direction. At this time, the boundary line is not written on the VRAM 165, but the interior of the closed figure developed as described above is destroyed by the following operation.

即ち、ドツト列発生部5よ多発生されるドツト列のうち
、常に最新の3ドツトのドツト間位置関係を調べ、塗多
つぶし画素を決め、塗りつぶしを実行する。という操作
が繰シ返されるのである。
That is, among the many dot rows generated by the dot row generating section 5, the positional relationship between the latest three dots is always checked, the pixels to be filled are determined, and the filling is executed. This operation is repeated.

ここで、3ドツトのドツト間位置関係によって、塗)つ
ぶしを行うべき場合は次の如く予め定められている。
Here, depending on the positional relationship between the three dots, cases in which filling should be performed are determined in advance as follows.

第3図は、現ドツトPk(図中・印)の隣接右画素(図
中×印)を出発点として、境界線に達するまで紙面右向
きに塗りつぶしを行なうべき、5つのケースと、その判
定条件とを示す説明図である。第3図において、−)け
y方向単調増加、う)/I′iy方向極小、(clFi
7方向極大、(dl、 lslけドツトPkのX座標が
ドラ)Pk−1またはドツトpi(+1のX座標と同じ
場合、である。
Figure 3 shows five cases in which the pixel to the right of the current dot Pk (marked in the figure) (marked with an x in the figure) should be used as a starting point, and filling should be done in the right direction on the paper until the boundary line is reached, and the criteria for determining the same. FIG. In FIG.
7-direction maximum, if (dl, lsl) the X coordinate of dot Pk is the same as the X coordinate of dot Pk-1 or dot pi (+1).

また、第4図は、現ドッ)Pk(図中・印)の隣接左画
素(図中×印)を出発点として、境界線に達するまで紙
面左向きに塗りつぶしを行なうべき。
In addition, in FIG. 4, starting from the adjacent left pixel (x mark in the figure) of the current dot Pk (marked in the figure), filling should be performed to the left of the page until the boundary line is reached.

5つのケースと、その判定条件とを示す説明図である。It is an explanatory diagram showing five cases and their judgment conditions.

第4図において、−1はy方向単調減少、(blけy方
向極大、(C1けy方向極小、ldl、 (alけドツ
トPkのX座標がドラ)Pk−1またけドラ) p l
(+1のX座標と同じ場合、である。
In Fig. 4, -1 is a monotonous decrease in the y direction, (Blow is a maximum in the y direction, (C1 is a minimum in the y direction, ldl, (the X coordinate of the dot Pk is a dot) Pk-1 is a dot) p l
(If it is the same as the X coordinate of +1, then

第3図及び第1図において、3ドツトは、時間的には前
述のドツト列発生部5からPk−1,Pk。
In FIG. 3 and FIG. 1, three dots are temporally Pk-1 and Pk from the above-mentioned dot train generating section 5.

Pk+lの順に発生されるものであシ、即ち、各ドツト
間の矢印の方向く発生されるものである。従って、矢印
の方向は前述した時計回ルの方向と一致している。又、
これらのドツトのX座標、X座標は、それぞれ、Pk−
1=(X k−1,Y k−1) 。
The dots are generated in the order of Pk+l, that is, in the direction of the arrow between each dot. Therefore, the direction of the arrow corresponds to the direction of the clockwise wheel described above. or,
The X coordinates and X coordinates of these dots are Pk-
1=(X k-1, Y k-1).

Pk=(Xk、Yk)、p l(+1 : 0(1(+
l、 Yl(+I)、である。
Pk = (Xk, Yk), p l(+1 : 0(1(+
l, Yl(+I).

淘、第4図−)〜letの各ケースの判定条件は、第3
図−)〜(elの各ケースの判定条件と対応してお)。
The judgment conditions for each case of TA, Fig. 4-) to let are as shown in the third
Figure-) to (corresponding to the judgment conditions for each case of el).

第3図の各ドツト変位量DX1、DYl、DX2.DY
2゜DX3、DY5の符号を反転した後、第3図−)〜
lelと同一の判定条件を用いることにより、第4m−
)〜(slの各ケースの判定を行なうことができる。
Each dot displacement amount DX1, DYl, DX2 . D.Y.
2゜After reversing the signs of DX3 and DY5, Figure 3-) ~
By using the same judgment conditions as lel, the 4th m-
) to (sl).

さて、この様な第3図及び第4図に示す判定条件を用い
ながら、前述した動作によって、例えば、第2図に示し
た閉図形の内部を塗ヤつぶすとすると、以下の如くKな
る。
If, for example, the inside of the closed figure shown in FIG. 2 is filled in by the above-described operation while using the determination conditions shown in FIGS. 3 and 4, the result will be K as follows.

第5図は閉図形を塗シつぶす過程を説明する丸めの説明
図である。
FIG. 5 is an explanatory diagram of rounding to explain the process of filling in a closed figure.

第5図において、ドツト列発生の出発点をドラ)p+と
する。出発点は任意の一点を決めればよい。
In FIG. 5, the starting point for the generation of dot rows is taken as p+. Any single point can be chosen as the starting point.

ドラ)P+、Pl、PS の3点を発生した時、これら
3点の位置関係を調べる。この場合、第3図−)のケー
スに該当するので、現ドッ)Plの隣接右画素Q2e塗
〕つふしの出発点と定め、右方向に境界線に達するまで
塗)つぶす。すなわち、画素Q2を検力つぶす。
When the three points P+, Pl, and PS are generated, check the positional relationship of these three points. In this case, since it corresponds to the case in FIG. 3-), the adjacent right pixel Q2e of the current dot Pl is set as the starting point of filling, and is filled in the right direction until it reaches the boundary line. That is, the power of pixel Q2 is destroyed.

つぎに5点P4を取シ込み、ドラ) Pz、 ps、P
nの位置関係を調べる。この場合、第3図及び第4図の
いずれのケースにも該当しないので何もしない。
Next, take 5 points P4 and dora) Pz, ps, P
Check the positional relationship of n. In this case, neither of the cases in FIGS. 3 and 4 apply, so nothing is done.

さらに、点P@を取)込み、ドツトps、 Pl、 P
gの位置関係を調べる。乙の場合、第4図−)のケース
に該当し、現ドッ)Plの隣接左画素Q2を出発点とし
て、左方向に塗りつぶしを行なうが、この画素Q、け既
に塗シつぶされているので、この場合は何もしない。
Furthermore, take in the point P@), dot ps, Pl, P
Check the positional relationship of g. In the case of B, it corresponds to the case in Figure 4-), and filling is performed in the left direction starting from the adjacent left pixel Q2 of the current dot Pl, but since this pixel Q has already been filled, , do nothing in this case.

以下、同様(、ドラ)Ps−Paでは、それぞれ左方向
に、ドラ)P+oでは、左右両方向に、ドツトP12〜
P14 では、それぞれ右方向に、ドラ) P+sでは
、左右両方向に、ドラ) P+9では右方向K。
Hereinafter, in the same manner (Dora) Ps-Pa, dots P12 to P12 to the left, respectively, and Dora) P+o, both left and right.
At P14, go to the right, respectively) At P+s, go both left and right, dora) At P+9, go to the right K.

それぞれ塗りつぶしを行なう。なお、ドラ) P2B+
P2S、 P27〜PB(1でも左方向に、ドツトPs
t、 h’6+P4o+ Pl1 でけ右方向にそれぞ
れ塗りつぶしを行なおうとするが、既に検力つぶされて
いるので何、もしない。
Fill in each. In addition, Dora) P2B+
P2S, P27~PB (even in 1, dot Ps to the left)
t, h'6+P4o+Pl1 I try to fill in each to the right, but since the power has already been filled, nothing is done.

以上が、本実施例における概略的な動作の説明である。The above is a general description of the operation in this embodiment.

では5次K、本実施例の構成及びその各構成部の動作に
ついて詳細に説明する。
Now, the fifth-order K, the configuration of this embodiment, and the operation of each of its constituent parts will be explained in detail.

第」図において、閉図形のドツト列発生部5け。In Figure 1, there are 5 dot row generators of closed shapes.

前述した様に任意の一点P1を出発点として1時計回シ
に一巡するようにドツト列を発生し、発生したドツトp
1(=(xl、yl))の直前のドツトPi−+(: 
(xl−+、 yi−+ ) ) K対f ル水平−垂
直方向(x、7方向)の座標変位量D X (=:Xi
  Xi−+)。
As mentioned above, a dot array is generated starting from an arbitrary point P1 and going around once per clock, and the generated dots p
Dot Pi-+(:
(xl-+, yi-+) ) K vs. f Le horizontal-vertical direction (x, 7 directions) coordinate displacement amount D
Xi-+).

D Y (=Y i−Y i−+ )を制御部10に送
出する。
DY (=Yi-Yi-+) is sent to the control unit 10.

制御部10は、この座標変位量DX、DYを受は取シ、
判定制御部15に送出する。判定制御部15は、まず、
ドツト受領部20にこれを送出し、ドツト受領部20に
起動をかける。ドツト受領部20は、この座標変位量D
X、DYを、メモリ25.30もしくは、メモリ35.
40のいずれかに転送する。メモリ25.30および、
メモリ35.40け、ともに5発生したドツトP1の直
前のドラ)Pl−1に対する水平、垂直方向の変位量D
X、DYを保持するメモリでアル、ドツト列発生部5が
最初の3ドツトpHP21 Ps  を発生した時、メ
モリ25゜30にはドツトP2(=(X2.Yl))の
ドツトP+(=(X++ Yl )) K対する。水平
、垂直変位量X2  X1+Y2−Ylが、また、メモ
リ35.40には、ドツトPs (= (Xs、Ys)
 )のドツトp、に対する水平、垂直変位量Xs −X
2 * Ys −Ylが、それぞれ保持される。
The control unit 10 receives and receives these coordinate displacement amounts DX and DY.
It is sent to the determination control section 15. The determination control unit 15 firstly
This is sent to the dot receiving section 20, and the dot receiving section 20 is activated. The dot receiving section 20 receives this coordinate displacement amount D.
X, DY in memory 25.30 or memory 35.
40. Memory 25.30 and
Memory 35.40, the amount of displacement D in the horizontal and vertical directions with respect to Pl-1
When the dot row generating section 5 generates the first three dots pHP21 Ps, the memory 25.30 stores the dot P+ (=(X2. Yl)) against K. The amount of horizontal and vertical displacement X2
) with respect to the dot p, horizontal and vertical displacement Xs −X
2*Ys-Yl are retained, respectively.

以後、ドツト列発生部5が、1ドツト発生するたびに、
サイクリックに、変位量が保持される。すなわち、メモ
リ25.30には、ドツトP4のドラ)PilC対する
変位量が保持され、メモ1755,40には、ドラ)P
sのドラ)P4に対する変位量が保持される。
From then on, each time the dot row generating section 5 generates one dot,
The amount of displacement is maintained cyclically. That is, the memory 25.30 stores the amount of displacement of the dot P4 with respect to the dot PilC, and the memo 1755, 40 stores the amount of displacement of the dot P4
The amount of displacement with respect to the driver (drill s) P4 is held.

従って、メモリ25及びメモリ35には、常K。Therefore, the memory 25 and the memory 35 always have K.

一方に第5図及び第4図に示したDXl(Xi(−Xk
−1)7)i、他方K D X 2 (= Xk++ 
−Xk)d’保持され、又、メモリ30及びメモリ40
には、常に、一方にD Y 1 (= Yk−Ylr−
1)が、他方にDY2(=Yk++ −Ylc)が保持
されることKなる。
On the other hand, DXl(Xi(-Xk
-1)7)i, the other K D X 2 (= Xk++
-Xk) d' is held, and also memory 30 and memory 40
, there is always D Y 1 (= Yk−Ylr−
1), DY2 (=Yk++ -Ylc) is held on the other side.

判定制御部15はつぎに、変位設定部45を起動する。The determination control unit 15 then activates the displacement setting unit 45.

変位設定部45は、メモ!725.30゜35.40の
内容(DXl、DYl、DX2.DY2)を、それぞれ
に対応する作業用メモリ55.60゜65.70に転送
する。
The displacement setting section 45 is a memo! The contents of 725.30°35.40 (DXl, DYl, DX2.DY2) are transferred to the corresponding working memories 55.60°65.70.

判定制御部15け、さらに加算部50を起動する。加算
部50は、メモリ25と35とが保持しているDXlと
DX2とを加算してDX5(=Xk++−Xk−+)を
導びき、その値を作業用メモリ75にセットする。そし
て、又、メモリ30と40とが保持しているDYlとD
Y2とを加算してDY3(= Yk++ −Yk−+ 
)  を導びき、その値を作業用メモリ80にセットす
る。
The determination control section 15 starts up the addition section 50. The adder 50 adds DXl and DX2 held in the memories 25 and 35 to derive DX5 (=Xk++-Xk-+), and sets the value in the working memory 75. Also, DYl and D held in the memories 30 and 40
Y2 and DY3 (= Yk++ −Yk−+
) and set its value in the working memory 80.

判定制御部15は、さらに、加算部95を起動する。こ
こで、メモリ110,125には、予め。
The determination control unit 15 further activates the addition unit 95. Here, the memories 110 and 125 are stored in advance.

ドラ)Pk−+の水平、垂直座標Xk lo Yk−’
がそれぞれ保持されているものとする。そこで、加算部
95は1作業用メモリ55.60もしくは、65.70
に保持されているDXl及びDYlと、メモリ110.
125に保持されているX k−1及びYk−+と。
horizontal and vertical coordinates of Pk-+
It is assumed that each of these is maintained. Therefore, the addition unit 95 has one working memory of 55.60 or 65.70.
DXl and DYl held in memory 110.
125 with X k-1 and Yk-+ held at 125.

を加算してXk及びYl(を導き出し、これをメモリ1
10.125に戻して再び保持させる。この動作により
、メモリ110,125には、常に、現ドッ) Pkの
水平、垂直座標Xi(、Yl(が保持されるよう釦なっ
ている。
are added to derive Xk and Yl(, and this is stored in memory 1
Return to 10.125 and hold again. As a result of this operation, the horizontal and vertical coordinates Xi(, Yl() of the current dot) Pk are always held in the memories 110, 125.

判定制御部15け、最後釦、判定部85を起動する。判
定部85け、tず、塗〕つぶしの方向を保持するメモリ
105に+1(右方向)を送出し。
The judgment control section 15 is pressed, and the last button is pressed to start the judgment section 85. The determination unit 85 sends +1 (rightward) to the memory 105 that holds the filling direction.

つぎに1作業用メモリ55,60.65.70、y5.
80(D内容(DXl、DYE、DX2.DY2゜DX
3.DYE)を読み出して、第3図−ト−(elの判定
条件を満足するか否かを調べる。その結果、いずれの条
件をも満足しない事が分ったら、メモリ105にO(N
on Eff’oct )を送出する。また、上記以外
の時、すなわち、いずれかの条件を満足することが分っ
たら、メモリ105には何も送出しない。
Next, 1 working memory 55, 60, 65, 70, y5.
80 (D contents (DXl, DYE, DX2.DY2゜DX
3. DYE) and examines whether the judgment conditions of FIG.
on Eff'oct). Further, in cases other than the above, that is, if it is found that any of the conditions is satisfied, nothing is sent to the memory 105.

判定制御部15は、さらに制御部10に信号を送出し、
塗りつぶしの準備が完了した事を伝達する。制御部10
は、この信号を受けて、塗りつぶし制御部100を起動
する。
The determination control unit 15 further sends a signal to the control unit 10,
Notify that preparation for filling is complete. Control unit 10
receives this signal and starts the filling control section 100.

塗りつぶし制御部100け、まず、メモリ105の内容
を読み出し、それが0の場合は、塗りつぶし不要と判断
し、直ちに、終了信号を制御部10に送出する。また、
メモリ105の内容が+1(右方向)の場合は、まず、
X座標設定部130を起動する。X座標設定部150は
、メモリ110に保持されてるXk t、作業用メモリ
155に転送する。
The filling control section 100 first reads the contents of the memory 105, and if the content is 0, it determines that no filling is necessary and immediately sends an end signal to the control section 10. Also,
If the content of the memory 105 is +1 (towards the right), first,
Activate the X coordinate setting section 130. The X coordinate setting unit 150 transfers the Xkt held in the memory 110 to the working memory 155.

塗りつぶし制御部100は、さらに加算部150を起動
する。加算部150は、メモリ105に保持されている
+1と、メモリ155に保持されているXkとを加算し
てXk+lt”導き出し、それを再びメモリ155に戻
す。これによル、塗)つぶしの出発点のX座標、即ち、
前述の如く現ドッ) Pkの隣接右画素のX座標が、メ
モリ155に保持されることKなる。
The filling control section 100 further activates the addition section 150. The adder 150 adds +1 held in the memory 105 and Xk held in the memory 155 to derive Xk+lt'', and returns it to the memory 155 again. The X coordinate of the point, i.e.
As described above, the X coordinate of the adjacent right pixel of the current dot Pk is held in the memory 155.

塗りつぶし制御部100は、さらに、 VRAM !J
−ドーライト部160に、リード信号を送出する。
The filling control unit 100 further includes VRAM! J
- Send a read signal to the dorite section 160.

VRAMリード−ライト部160は、メモリ155゜1
25の内容が示す水平、垂直座標(Xk++、Yl□に
位置する画素、即ち、現ドッ) Pkの隣接右画素’i
VRAM 165から読み出し、リード・ライトパ、ブ
145に転送する。
The VRAM read-write unit 160 has a memory 155°1.
Horizontal and vertical coordinates indicated by the contents of 25 (pixel located at Xk++, Yl□, that is, the current dot) Adjacent right pixel 'i of Pk
It is read from the VRAM 165 and transferred to the read/write controller 145.

塗りつぶし制御部100け、さらに、比較部135を起
動する。比較部135け、先に読み出され、リード・ラ
イトバッファ145に保持されている該当画素の色と、
メモリ115に保持されている境界線色及びメモリ12
0に保持されている塗)つぶし色とを比較し、いずれと
も一致しないことが分った時、不一致信号を、また、い
ずれかと一致することが分った時一致信号を、それぞれ
塗りつぶし制御部100へ送出する。
The filling control section 100 also starts up the comparison section 135. The comparison unit 135 compares the color of the corresponding pixel that was read out first and is held in the read/write buffer 145,
Border color held in memory 115 and memory 12
The fill color is compared with the fill color held at 0, and when it is found that it does not match with any of them, a mismatch signal is sent, and when it is found that it matches with either, a match signal is sent to the fill control section. Send to 100.

塗りつぶし制御部100け、不一致信号を受けた時、ま
ず、検力つぶし色設定部140を起動する。伺、一致信
号を受けた時については後述する。
When the filling control section 100 receives a mismatch signal, it first activates the power filling color setting section 140. The time when a matching signal is received will be described later.

塗りつぶし色設定部140け、塗)つぶし色を保持する
メモリ120の内容をリード争ライトバッファ145に
転送する。つぎに、塗りつぶし制御部100け、 VR
AMリード・ライト部160にライト信号を送る。VR
AMリード・ライト部160は、VRAM 165の該
当画素の色を、塗多つぶし色に書きかえる。
The fill color setting unit 140 transfers the contents of the memory 120 holding the fill color to the read contention write buffer 145. Next, the fill control section 100, VR
A write signal is sent to the AM read/write section 160. VR
The AM read/write unit 160 rewrites the color of the corresponding pixel in the VRAM 165 to a fill color.

次に、塗りつぶし制御部100け、再び加算部150を
起動する。加算部150は、前述と同様に、メモリ10
5に保持されている+1と、メモリ155に保持されて
いるXk+1とを加算してXk+2を導びき出し、それ
を再びメモリ155に戻す。従って、今度は前述の画素
の更に右隣シの画素について、同様の動作が行なわれる
ことになる。
Next, the filling control section 100 starts up the addition section 150 again. Adding unit 150, as described above,
5 and Xk+1 held in the memory 155 are added to derive Xk+2, which is returned to the memory 155 again. Therefore, the same operation is performed on the pixel further to the right of the aforementioned pixel.

こうして、以下、比較器135から一致信号が送出され
るまで1次々に右隣シの画素について同様の動作が繰シ
返され、即ち、境界MK達するまで右向きに塗)つぶし
が行なわれるわけである。
In this way, the same operation is repeated one after another for the pixels on the right side until a match signal is sent from the comparator 135, that is, the filling is performed in a rightward direction until the boundary MK is reached. .

さて、比較器135から一致信号が送出され、塗りつぶ
し制御部100がそれを受領すると、塗りつぶし制御部
100は、塗)つぶし終了と判断し、終了信号を制御部
10へ送出する。制御部10は、この信号を受けて、塗
りつぶし未完か完了かを判断する。すなわち、塗りつぶ
しは、右方向と左方向の2回に分けて行なわれるため、
塗りつぶし制御部100からの終了信号ft1回しか受
領していない時には、塗りつぶし未完と判断し、2回受
領した時にけ塗)つぶし完了と判断する。塗りつぶし未
完と判断した時、制御部10け1判定制御部15を起動
する。それによ)1判定制御部15け、符号反転部90
を起動する。符号反転部90Vi、メモリ55.60.
65.70.75,80に保持されている値の符号をす
べて反転する。判定制御部15け、さらに判定部85を
起動する。
Now, when a match signal is sent from the comparator 135 and the filling control section 100 receives it, the filling control section 100 determines that filling has ended, and sends an end signal to the control section 10. The control unit 10 receives this signal and determines whether filling is incomplete or complete. In other words, since filling is done twice, once to the right and once to the left,
When the end signal ft from the filling control section 100 is received only once, it is determined that filling is not completed, and only when it is received twice, it is determined that filling is complete. When it is determined that the filling is not completed, the control unit 10 starts the determination control unit 15. Accordingly) 1 judgment control section 15, sign inversion section 90
Start. Sign inversion unit 90Vi, memory 55.60.
65.70.Reverses the sign of all values held in 75 and 80. The determination control section 15 further activates the determination section 85.

判定部85け、まず、メモリ105に−1(左方向)を
送出し、つぎに、メモリ55.60.65.70.75
.80の内容を読み出して、第3図(at〜telの判
定条件を満足するか否かを調べる。その結果、いずれの
条件をも満足しないことが分ったら。
The determination unit 85 first sends -1 (leftward) to the memory 105, and then sends -1 (leftward) to the memory 105.
.. The contents of 80 are read out, and it is checked whether the judgment conditions shown in FIG. 3 (at to tel) are satisfied.

メモ105KOを送出する。また上記以外の時、メモリ
105には何も送出しない。
Send memo 105KO. Furthermore, in cases other than the above, nothing is sent to the memory 105.

判定制御部15は、さらに、制御部10に信号を送出し
、制御部10はこれを受けて、塗りつぶし制御部100
を起動する。塗りつぶし制御部100は、前記と同様の
検力つぶし制御動作を行ない、塗りつぶし終了時には、
制御部1oに終了信号を送出する。これによって、現ド
ッ)Pkの隣接左画素を出発点として境界線に達するま
で左向きに塗りつぶしが行われたわけである。
The determination control unit 15 further sends a signal to the control unit 10, and upon receiving this, the control unit 10 controls the filling control unit 100.
Start. The filling control unit 100 performs the same power filling control operation as described above, and when filling is completed,
A termination signal is sent to the control unit 1o. As a result, filling is performed to the left starting from the adjacent left pixel of the current dot Pk until reaching the boundary line.

さて、終了信号を受けると、制御部10け、塗りつぶし
が完了したか否かを判断し、完了したと判断した時、ド
ツト列発生部5に終了信号を送出する。ドツト列発生部
5け、これを受けて、次の1ドツトを発生し、制御部1
0に直前のドツトに対する水平、垂直方向の変位量DI
、DYを送出する。
Now, upon receiving the end signal, the control section 10 determines whether or not the filling is completed, and when it is determined that it is completed, sends the end signal to the dot row generating section 5. In response to this, the dot row generating section 5 generates the next dot, and the control section 1
The amount of displacement DI in the horizontal and vertical directions with respect to the dot immediately before 0
, DY is sent.

以下、同様の動作を繰シ返し、ドツト列発生部5が最終
ドツトを発生して、そのドツトに対する前記動作が終了
した時、塗りつぶし終了となる。
Thereafter, the same operation is repeated, and when the dot row generating section 5 generates the final dot and the operation for that dot is completed, the filling is completed.

以上が第1図に示した閉図形塗りつぶし装置の構成及び
その動作の説明である。
The above is an explanation of the structure and operation of the closed figure filling device shown in FIG.

次に、これをソフトウェア処理で実現する場合について
説明を行う。
Next, a case where this is realized by software processing will be explained.

第6図は塗りつぶしをソフトウェア処理で実現する場合
の処理フローチャートである。
FIG. 6 is a processing flowchart when filling is realized by software processing.

尚1本ソフトウェアでは、ドツト列発生部にて新しいド
ツトが1ドツト発生されるたびに、第6図に示すフロー
チャートの開始ステップから処理が開始されるようにな
っている。
In this software, each time a new dot is generated in the dot row generation section, the process is started from the start step of the flowchart shown in FIG.

また、最初のドラ)P+発生時にけ、ドツト列発生部か
らは、最初のドラ)P+である旨の識別フラグとともに
、そのドツトP+のX、Y座標が送出され、又、最初の
ドラ)P+でない時にけ、その旨の識別フラグとともに
、発生されたドラ)Piの直前のドラ)Pi−+lC対
する変位量D1.DYが送出されるよう釦なっている。
Furthermore, when the first dot P+ is generated, the dot row generation section sends out the X and Y coordinates of the dot P+ along with an identification flag indicating that it is the first dot P+. If not, along with an identification flag to that effect, the displacement D1. The button is designed to send out DY.

先ず、ドツト列発生部にて最初のドラ)P+が発生され
たとする。それによル、本ソフトウェアが起動し、処理
が開始される。
First, it is assumed that the first dot (P+) is generated in the dot row generation section. The software will then start up and begin processing.

ステップ200では、先ず発生されたドツトが最初のド
ラ)P+であるか否かを、送出された識別フラグによっ
て判定する。先に述べた様K、発生されたドツトは最初
のドラ)P+であるので1次のステップとしてステップ
205に進む。ステップ205では、送出されたX、Y
座標をメモリMX。
In step 200, it is first determined whether the generated dot is the first dot (P+) or not based on the transmitted identification flag. As mentioned above, since the generated dot is the first dot (P+), the process proceeds to step 205 as the first step. In step 205, the transmitted X, Y
Memory MX coordinates.

MYK初期設定する。Initialize MYK.

つぎに、ステップ210では、第2のドツトP2以降の
発生時に送出されてくる変位量DX、DYの格納用メモ
!JMD1.MDYに対する格納先ポインタNPを1に
初期設定する。
Next, in step 210, a memo for storing the displacement amounts DX and DY sent out when the second dot P2 and subsequent dots occur! JMD1. Initialize the storage pointer NP for MDY to 1.

MDX、MDYけ、長さ2のスタックであシ、変位量D
X、DY’tサイクリックに格納するため、格納するメ
モリはMDI(NP)、MDY(MP)と表わせ、NP
FiO又は1の値を取る。すなわち、第2のドツトP2
を発生した時、MDXIOI、MDYlol Kは、ド
ラ)PlのドツトP1に対する変位量DI%DYが格納
され、第3のドラ)Psを発生した時。
MDX, MDY, stack length 2, displacement D
Since X, DY't is stored cyclically, the storage memory is expressed as MDI (NP), MDY (MP), and NP
Takes a value of FiO or 1. That is, the second dot P2
MDXIOI and MDYlol K are stored with the displacement amount DI%DY of the driver Pl relative to the dot P1, and when the third driver Ps is generated.

M D X (1)、  M D Y 111KFiド
ツトPsOドツトP2に対する変位量DX、DYが格納
される。さらにドラ)P+発生時には、ドツトP4のド
ラ)Psに対する変位量DX、DYがM D Ifol
、 M D Y(01に格納され。
M DX (1), M DY 111 Displacement amounts DX and DY for the KFi dot PsO dot P2 are stored. Furthermore, when Dora) P+ occurs, the displacement amount DX, DY of dot P4 with respect to Dora) Ps is M D Ifol
, M DY (stored in 01).

ドラトルs発生時には、ドツトPtのドツトP4に対す
る変位量D1.DYが、M D Xtll、 M D 
Y(11に格納される。従って、NPは、この格納先(
0又は1)を示すポインタで8フ、変位量DX、DY′
ft受領するたびにその値が反転されるのである。
When the dottle s occurs, the amount of displacement D1. of the dot Pt with respect to the dot P4. DY, M D Xtll, M D
Y(11). Therefore, NP is stored in this storage location (
8 with the pointer indicating 0 or 1), displacement amount DX, DY'
The value is inverted each time ft is received.

次に、ステップ220では、コントロール・フラグl、
TRL  FI、GをOK上セツトる。
Next, in step 220, the control flag l,
Set TRL FI and G to OK.

以上で、ドツト列発生部にて発生された最初のドツトP
1に対するソフトウェア処理は終了する。
With the above, the first dot P generated in the dot row generation section
The software processing for 1 ends.

さて、次K、ドツト列発生部にてtK2のドツトP2が
発生され、ドツト列発生部から識別フラグと。
Next, the dot train generation section generates a dot P2 of tK2, and the dot row generation section generates an identification flag.

ドラ)Plのドラ)P+に対する変位量DX、DYとが
送出される。それKより、再び1本ソフトウェアが起動
し、処理が開始される。
The displacement amounts DX and DY of the driver) Pl with respect to the driver) P+ are sent out. From then on, the software is activated again and processing is started.

先ず、発生されたドツトは第2のドラ)Plであるので
、ステップ200の判定で、ステップ225へ制御が移
る。ステップ225では、CTRLFLG の内容が0
であるか1であるかを判定する。
First, since the generated dot is the second dot (Pl), control is transferred to step 225 based on the determination at step 200. In step 225, the content of CTRLFLG is 0.
or 1.

先に、ステップ220でCTRL  FLG:Oと設定
されているので1次のステップとして、ステップ230
へ進む。ステップ230では、ポインタNPの値を反転
後、すなわち、NP=Oとした後。
First, since CTRL FLG:O was set in step 220, step 230 is set as the first step.
Proceed to. In step 230, after inverting the value of pointer NP, that is, after setting NP=O.

MDI(NP)、MDY(NP)K送出されたDX、D
Yを格納する。即ち、前述した様に、ドラ)Plのドツ
トP+lC対する変位量DX、DYがMDX fil、
 M D Y folK格納されたわけでおる。さらK
MDI (NP), MDY (NP) K sent out DX, D
Store Y. That is, as mentioned above, the displacement amounts DX and DY of the dot P1 with respect to the dot P+lC are MDX fil,
MDY folK has been stored. Sara K
.

ステップ235では、C’l’RL  FLOを1にセ
ットする。
In step 235, C'l'RL FLO is set to one.

以上で、ドツト列発生部にて発生された第°2のドラ)
Plに対するソフトウェア処理は終了する。
With the above, the second dot generated in the dot row generation section)
The software processing for Pl ends.

次に、ドツト列発生部にて第3のドラ)Plが発生され
、ドツト列発生部から識別フラグとドツトpsのドラ)
Plに対する変位量DX、DYとが送出される。それK
より、再び1本ソフトウェアが起動し、処理が開始され
る。
Next, the third driver (Pl) is generated in the dot row generation section, and the identification flag and the dot (PS) are generated from the dot row generation section.
Displacement amounts DX and DY with respect to Pl are sent out. That K
As a result, the software is activated again and processing is started.

先ず1発生されたドツトは第3のドラ)Psであるので
、ステップ200の判定で、ステップ225へ進む。ス
テップ225では、前述した様KC’rRL  FLG
の内容が0であるか1であるかを判定する。先K、ステ
ップ235でCTRL  FLG=1と設定されている
ので、ステップ240へ進む。ステップ240では、ポ
インタNPの値を反転後1MDI(NP)、MDY(N
P)K送出されたDX、DY−を格納する。また、それ
とともにOPを求める。OPはMDX、MDYにおける
最新ドツトの1つ前のドツトのドツト変位量の格納先を
示すポインタであシ、NPを反転することによって求ま
る。
First, since the first dot generated is the third dot (Ps), the process proceeds to step 225 based on the determination at step 200. In step 225, as described above, KC'rRL FLG
Determine whether the content of is 0 or 1. Since CTRL FLG=1 is set in step K, step 235, the process advances to step 240. In step 240, after inverting the value of pointer NP, 1MDI(NP), MDY(N
P) Store K sent out DX, DY-. Also, find the OP along with it. OP is a pointer indicating the storage location of the dot displacement amount of the dot immediately before the latest dot in MDX and MDY, and is found by inverting NP.

ステップ245では、MDI、MDYの内容を作業用メ
モリWDX、WDYK転送する。WDX。
In step 245, the contents of MDI and MDY are transferred to working memories WDX and WDYK. WDX.

WDYは長さ3の作業エリアであF)、MDX(01け
W D X roIに、MDY(01けW D Y (
01に、MDXlllけW D X 111に、MDY
rllけW D Y 111に、それぞれ対応する。
WDY is a work area of length 3. F), MDX (01 digits W D
01, MDX111, MDY
They correspond to Rll W D Y 111, respectively.

ステップ250では、WDXIOIO内容とWDX(1
1の内容とを加算し、その結果tWDX(21にセット
する。また、WDYIOlの内容とWDYlllの内容
とを加算し、その結果をW D Y (21にセットす
る。
In step 250, WDXIOIO contents and WDX(1
The contents of WDYIOl and WDYll are added together, and the result is set to tWDX (21).

ステップ255でけ、メモリMX、MYの内容とWDX
(OP)、WDY(OP)の内容とをそれぞれ加算し、
その結果をそれぞれ再びメモI) liX、MYK戻す
At step 255, the contents of memories MX and MY and WDX
(OP) and the contents of WDY(OP) are added,
Return the results to memo I) liX, MYK.

ステップ260でけ、塗りつぶし制御を行なう。At step 260, filling control is performed.

その詳細なフローを第7図に示す。The detailed flow is shown in FIG.

第7図において、ステップ300では、検力つぶし判定
カウンタCNTt″2にセットする。判定は、右方向と
左方向の2回に分けて行なう必要があるためである。
In FIG. 7, in step 300, a power crushing determination counter CNTt''2 is set. This is because the determination needs to be made twice, one in the right direction and one in the left direction.

ステップ305では、塗りつぶしの方向を指示するメモ
リDIRに+1(右方向)f:セットする。
In step 305, +1 (rightward) f: is set in the memory DIR indicating the filling direction.

ステップ510〜530では、第3図(al〜(elの
各ケースに該当するか否かを判定する。いずれのケース
にも該当しなかった時、ステップ335でメモリDIR
を0にセットする。
In steps 510 to 530, it is determined whether each of the cases in FIG.
Set to 0.

次に、ステップ340では、実際に塗)つぶし処理を行
なう。その詳細なフローを第8図に示す。
Next, in step 340, actual filling processing is performed. The detailed flow is shown in FIG.

第8図において、ステップ400では、メモリDIRの
内容を読み出し、それが0なら、何もしない。また、0
でないなら、ステップ405に進む。ステップ405で
は、現ドツトのX座標を保持するメモリMXの内容をカ
ウンタWxに転送する。次に、ステップ410では、カ
ウンタWXの内容と、メモ!jDIHの内容とを加算し
、その結果を再びカクンタWXK戻す。これによ勺、現
ドツトの右に隣接する画素のX座標が求まる。
In FIG. 8, in step 400, the contents of the memory DIR are read, and if it is 0, nothing is done. Also, 0
If not, proceed to step 405. In step 405, the contents of the memory MX holding the X coordinate of the current dot are transferred to the counter Wx. Next, in step 410, the contents of the counter WX and the memo! The contents of jDIH are added, and the result is returned to Kakunta WXK. As a result, the X coordinate of the pixel adjacent to the right of the current dot is found.

ステップ415では、上記画素iVRAMよ)リードす
る。閏、上記画素のY座標はメモ17 M Y K保持
されている。
In step 415, the pixel iVRAM is read. The Y coordinate of the above pixel is stored in a memo 17 M Y K.

ステップ420,425では、予め保持されている塗り
つぶし色、境界色と、ステップ415にて読み出した画
素の色とを比較する。その結果いずれとも一致しなかっ
た場合、ステップ450に進み、該画素を塗りつぶし色
で書きかえる。また、いずれかと一致した場合、塗りつ
ぶし終了となる。
In steps 420 and 425, the previously held fill color and border color are compared with the pixel color read out in step 415. If the result does not match any of the pixels, the process proceeds to step 450, where the pixel is rewritten with a fill color. Also, if it matches any of them, the filling is finished.

ステップ430での処理の後は、さらK、該画素の隣接
右画素につき、上記と同様の処理を行なうため、ステッ
プ410に進み、ループを形成する。このようにして、
ステップ420またはステップ425で、読み出した画
素の色と、塗りつぶし色または境界色との一致を検出し
た時、ループから脱出し、塗りつぶし終了となる。この
時、第7図に示すステップ345に制御が移る。
After the process in step 430, the process proceeds to step 410 to form a loop in order to perform the same process as above for K pixels on the right adjacent to the pixel. In this way,
In step 420 or step 425, when a match between the read pixel color and the fill color or border color is detected, the loop is exited and the fill is completed. At this time, control moves to step 345 shown in FIG.

ステップ345では、カウンタCNTの内容を1減じ、
その結果が0でない時、未終了と判定し。
In step 345, the contents of the counter CNT are decremented by 1,
If the result is not 0, it is determined that the process has not finished.

ステップ350に進む。すなわち、塗りつぶしは。Proceed to step 350. That is, the fill is.

右方向と左方向の2回に分けて行なう必要が1)、塗ヤ
つぶしを、まだ1回しか行なっていない時、ステップ3
50へ進み、2回とも行なった時、終了となる。
It is necessary to do this in two steps, one to the right and one to the left (1), and if you have only done the filling once, step 3
Proceed to 50 and end when you have done it both times.

ステップ350では、メモリW D X (01、WD
Y(0)、W D X(1)、 W D Yrll、W
 D X 121、WDY(2)+7)符号を反転する
。これは、第4図ら)〜letの判定を行なうためであ
る。
In step 350, the memory W D X (01, WD
Y(0), W D X(1), W D Yrll, W
D X 121, WDY (2) + 7) Invert the sign. This is to perform the determination of FIG.

ステップ355では、DIRに−1(左方向)をナツト
する。
In step 355, -1 (leftward) is added to DIR.

その後、ステップ310に戻シ、ステップ310〜33
0で左方向塗多つぶしの必要性を判定する。以下、前記
と同様の処理を行ない、ステップ345でCNTの内容
を1減じる。その結果、CNTの内容FiOとな飢判定
終了と判定されて、ループを脱出する。制御は、第6図
に示すステップ265に移)、ドツト列発生部にて発生
された第3のドツトPiに対する処理が終了する。
After that, return to step 310 and step 310 to 33.
0 determines the necessity of leftward filling. Thereafter, the same processing as above is performed, and in step 345, the content of CNT is subtracted by 1. As a result, it is determined that the content of CNT is FiO, and the starvation determination is completed, and the loop is exited. The control moves to step 265 shown in FIG. 6), and the processing for the third dot Pi generated by the dot array generation section is completed.

更K、ドツト列発生部にて次のドラ)Paが発生されド
ツト列発生部から識別フラグと変位量とが送出される。
Then, the next dot (Pa) is generated in the dot row generation section, and the identification flag and displacement amount are sent out from the dot row generation section.

それにより、再び1本ソフトウエアが起動し、処理が開
始される。このドツトに対する処理の流れは、前記と同
様に、第6図において。
As a result, one piece of software is activated again and processing is started. The flow of processing for this dot is shown in FIG. 6, as described above.

ステップ200.→ステップ225→ステップ240・
・・・・・→ステップ265となる。
Step 200. →Step 225→Step 240・
...→Step 265.

以下、同様の処理を繰り返し、最終ドラ)K対する処理
が終った時、閉図形の塗りつぶしが終了する。
Thereafter, the same process is repeated, and when the process for the last drum (K) is completed, the filling of the closed figure is completed.

以上が、ン7トウエア処理にて実現する場合の説明であ
る。
The above is an explanation of the case where this is realized by software processing.

なお1本実施例では、ドツト列発生の方向を時計回)と
して説明したが、これに限定されるものではなく、反時
計回ルでありてもよい。この場合くけ、まず、現ドツト
の左方向への塗りつぶしを行ない、次に、右方向への塗
りつぶしを行なう。
In this embodiment, the direction in which the dot rows are generated is clockwise (clockwise), but the direction is not limited to this, and may be counterclockwise. In this case, the current dot is first filled to the left, and then to the right.

左方向塗りつぶし判定条件は、第6図(blにおいて、
DX3>04−DX4S<OK、同図1ot において
、DX 3<O’kDX 5>0rIC1同図1dlに
おいて、DXl>O’tDX1<0に、同図(elにお
いて、DX2(olDX2.>0にそれぞれ変更すれば
よい。また、右方内塗りつぶしの判定は、DXl、0X
2.0X3.DYl、DX2.DX3の符号をすべて反
転した後、第31伝)〜telの変更後の判定条件を用
いればよい。
The left direction filling judgment conditions are shown in Fig. 6 (in bl,
DX3>04-DX4S<OK, in 1ot of the same figure, DX3<O'kDX 5>0rIC1 in 1dl of the same figure, DXl>O'tDX1<0, in el of the same figure, DX2(olDX2.>0, respectively) All you have to do is change it.Also, to judge the right inner fill, use DXl, 0X
2.0X3. DYl, DX2. After inverting all the signs of DX3, the changed determination conditions of Era 31) to tel may be used.

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

以上説明したごとく、本発明によれば、閉図形の形状を
変更するたびK、塗りつぶしの出発点として閉図形内部
の一点を指定する必要がないので操作がわずられしくな
い。また、大量の作業用メモリを必要としないので、装
置が安価に構成できる。また、ソーティングなど時間の
かかる処理は不要であ)、塗夛つぶしが高速に行なえる
利点がある。
As described above, according to the present invention, it is not necessary to designate a point inside the closed figure as the starting point for filling each time the shape of the closed figure is changed, so the operation is not cumbersome. Furthermore, since a large amount of working memory is not required, the device can be constructed at low cost. In addition, there is no need for time-consuming processing such as sorting), and there is an advantage that coating and filling can be performed at high speed.

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

第1図は本発明の一実施例を示すプ四ツク図。 第2図は閉図形の境界線ドツト列を示す説明図、第3図
及び第4図はそれぞれ3ドツトのドツト間位置関係によ
る塗りつぶしを行うべき場合と、その判定条件とを示す
説明図、第5図は閉図形を塗シつぶす過程を説明するた
めの説明図、第6図は塗りつぶし七ノットウェア処理で
実現する場合の処理70−チャー)、!7図は第6図の
検力つぶし制御を説明するだめのフローチャート、第8
図は第7図の塗りつぶし処理を説明するためのフローチ
ャート、である。 5・・・閉図形のドツト列発生部、10・・・制御部、
15・・・判定制御部、20・・・ドツト受領部、25
・・・水平方向ドツト変位を保持する第1のメモリ、3
0・・・垂直方向ドツト変位を保持する第1のメモリ、
35・・・水平方向ドツト変位を保持する@2のメモリ
、40・・・垂直方向ドツト変位を保持する第2のメモ
リ、45・・・ドツト変位設定部、50・・・加算部、
55・・・メモ1J25に対応する作業用メモリ。 60・・・メモリ30に対応する作業用メモリ、65・
・・メモリ35に対応する作業用メモリ、70・・・メ
モリ40に対応する作業用メそす、75・・・メモリ2
5の内容とメモリ35の内容とを加算した結果を保持す
る作業用メモlJ、80・・・メモリ50の内容とメモ
リ4oの内容とを加算した結果を保持する作業用メモリ
、 85・・・塗りつぶし検出部、9o・・・符号反転部、
95・・・加算部、100・・・塗りつぶし制御部。 105・・・塗りつぶし方向を保持するメモリ。 110・・・現ドツトのX座標を保持するメモリ。 115・・・境界線色を保持するメモリ、120・・・
塗夛つぶし色を保持するメモリ、125・・・現ドツト
のY座標を保持するメモリ、150・・・X座標設定部
、135・・・比較部、14o・・・塗)っぷし色設定
部、  145 ・= l/RAM Read Wri
teバッファ。 150・・・加算部、155・・・X座標カウンタ。 160 = VRAM Read Write部、16
5・VRAMVlz図 第3 図 )’9 ) Pre争−f(XkfIIYIlt−ン第
 4図 ト”′−ノドPw+rmcXw+I、Yw++)15図 第 6図 第7図
FIG. 1 is a four-dimensional diagram showing one embodiment of the present invention. FIG. 2 is an explanatory diagram showing a row of boundary line dots of a closed figure, and FIGS. 3 and 4 are explanatory diagrams showing cases in which filling based on the positional relationship between three dots should be performed and the conditions for determining the same. Fig. 5 is an explanatory diagram for explaining the process of filling in a closed figure, and Fig. 6 is a process 70-char) when the filling is realized by the filling process. Figure 7 is a flowchart for explaining the power crushing control in Figure 6;
The figure is a flowchart for explaining the filling process of FIG. 7. 5... Closed figure dot row generation unit, 10... Control unit,
15... Judgment control unit, 20... Dot receiving unit, 25
...first memory holding horizontal dot displacement, 3
0: first memory that holds vertical dot displacement;
35... @2 memory that holds horizontal dot displacement, 40... Second memory that holds vertical dot displacement, 45... Dot displacement setting section, 50... Adding section,
55... Working memory corresponding to memo 1J25. 60... Working memory corresponding to memory 30, 65.
...Working memory corresponding to memory 35, 70...Working memory corresponding to memory 40, 75...Memory 2
A working memory 85 holds the result of adding the contents of the memory 50 and the memory 4o; Fill detection section, 9o... sign inversion section,
95... Addition section, 100... Filling control section. 105...Memory that holds the filling direction. 110...Memory that holds the X coordinate of the current dot. 115...Memory for holding border color, 120...
125: Memory for holding the Y coordinate of the current dot, 150: X coordinate setting section, 135: Comparison section, 14o: Filling color setting section , 145 ・= l/RAM Read Wri
te buffer. 150...Addition unit, 155...X coordinate counter. 160 = VRAM Read Write section, 16
5. VRAMVlz diagram Figure 3)'9) Pre-f(XkfIIYIlt-ton Figure 4 T''-throat Pw+rmcXw+I, Yw++) Figure 15 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】[Claims] 1)閉図形のドット列発生部より発生されるドット列の
うち、常に最新の3ドットのドット間水平、垂直変位量
を保持するメモリと、該メモリ内容の符号を反転させる
符号反転部と、塗りつぶし判定部と、該判定部による判
定結果に基づいて、現ドットを基準として右水平方向ま
たは左水平方向に境界線まで達するまで塗りつぶしを実
行する塗りつぶし部と、から成り、前記塗りつぶし判定
部は、前記メモリ内容を読み出し、現ドットを基準とし
て右水平方向(または左水平方向)に塗りつぶすか否か
を、また前記符号反転部によって符号が反転されたメモ
リ内容を読み出し、現ドットを基準として左水平方向(
または右水平方向)に塗りつぶすか否かを、それぞれド
ット間位置関係により判定するようにしたことを特徴と
する閉図形塗りつぶし装置。
1) A memory that always holds the inter-dot horizontal and vertical displacement amounts of the latest three dots among the dot strings generated by the dot string generating section of the closed figure, and a sign inverting section that inverts the sign of the contents of the memory; It consists of a fill determination section, and a fill section that executes filling in the right horizontal direction or left horizontal direction until reaching the boundary line based on the current dot based on the determination result by the determination section, and the fill determination section includes: The memory contents are read out, and it is determined whether or not to fill in the right horizontal direction (or left horizontal direction) with the current dot as a reference.The memory contents whose sign has been inverted by the sign inversion section are read out, and the left horizontal direction is determined with the current dot as a reference. direction(
2. A closed figure filling device characterized in that whether or not to fill in (or right horizontal direction) is determined based on the positional relationship between dots.
JP8242785A 1985-04-19 1985-04-19 Paint-out device for closed graphic form Pending JPS61241880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8242785A JPS61241880A (en) 1985-04-19 1985-04-19 Paint-out device for closed graphic form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8242785A JPS61241880A (en) 1985-04-19 1985-04-19 Paint-out device for closed graphic form

Publications (1)

Publication Number Publication Date
JPS61241880A true JPS61241880A (en) 1986-10-28

Family

ID=13774282

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8242785A Pending JPS61241880A (en) 1985-04-19 1985-04-19 Paint-out device for closed graphic form

Country Status (1)

Country Link
JP (1) JPS61241880A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01126776A (en) * 1987-11-12 1989-05-18 Fujitsu Ltd Address generating circuit
JPH01196675A (en) * 1988-01-30 1989-08-08 Toshiba Corp Pattern data preparing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01126776A (en) * 1987-11-12 1989-05-18 Fujitsu Ltd Address generating circuit
JPH01196675A (en) * 1988-01-30 1989-08-08 Toshiba Corp Pattern data preparing system

Similar Documents

Publication Publication Date Title
US6268846B1 (en) 3D graphics based on images and morphing
US6985156B2 (en) System and process for optimal texture map reconstruction from multiple views
JPS61241880A (en) Paint-out device for closed graphic form
JPH01296389A (en) Method and device for processing graphic
US6441826B1 (en) Method and apparatus for generating textures for display
JP2747822B2 (en) Graphic display device
JPS63305478A (en) Pattern information restoring device
JPH0285978A (en) Method for processing hidden-surface of solid
JPH061493B2 (en) Image filling device
JPH03233689A (en) Outline data drawing device
JP2806185B2 (en) Polygon filling device
JPH07105404A (en) Stereoscopic image processor and its processing method
JPH0350686A (en) Graphic processing system
JP2836617B2 (en) Rendering processor
JPS5846026B2 (en) Hidden line cancellation method in display devices
JPH02132572A (en) Picture display device
JPH0259871A (en) Image processor
JPH0414190A (en) Painting-out circuit
JPH0431399B2 (en)
JPH0290282A (en) Face painting processing system
JP2641790B2 (en) Vector raster converter
JPS6290772A (en) Three dimentional object display processing system
JPH02236789A (en) Surface paint processing system for trapezoid
JPS61159688A (en) 3-d cursor display circuit for crt display unit
JPH02238581A (en) Closed-area surface painting-out processing system for graphic drawing