JPH01166275A - Production of paint-out image data utilizing parallel processing - Google Patents

Production of paint-out image data utilizing parallel processing

Info

Publication number
JPH01166275A
JPH01166275A JP32621587A JP32621587A JPH01166275A JP H01166275 A JPH01166275 A JP H01166275A JP 32621587 A JP32621587 A JP 32621587A JP 32621587 A JP32621587 A JP 32621587A JP H01166275 A JPH01166275 A JP H01166275A
Authority
JP
Japan
Prior art keywords
pixel
line segment
flag
line
value
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
JP32621587A
Other languages
Japanese (ja)
Inventor
Masayuki Tanimori
谷守 正行
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Dainippon Screen Manufacturing Co 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 Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP32621587A priority Critical patent/JPH01166275A/en
Publication of JPH01166275A publication Critical patent/JPH01166275A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To improve the availability of a memory and to perform paint-out processing at a high speed in an inside or outside area of a contour by carrying out the expansion of picture elements of the contour and the generation of a paint-out instruction flag in parallel with each other. CONSTITUTION:An input device 11 forming an image paint-out data producing device 10 consists of a digitizer or a keyboard and outputs segment data SP on an image to be painted out to a polygon processing circuit 12. A circular pattern is inputted to a circle processing circuit 13 and the coordinate value of segment expressing picture elements received from the circuit 13 is given to a frame memory 15 and a flag storing memory 16 respectively via a selector 14. Furthermore, main and secondary scanning directions on a screen 23a of a CRT 23 are defined by memory spaces stored in both memories 15 and 16. At the same time, color information CI showing a specific color in which a pattern is painted out is outputted from the device 11 and registered in a color information register 18. Then an address is sent to the memory 15 and an address generating circuit 21 is controlled by both memories 15 and 16. Thus the paint-out processing is carried out.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明は、所定の画面上における図形の輪郭線の位置
と形状とを表現した輪郭線情報に基いて、当該輪郭線の
内部領域または外部領域を塗り潰した塗り潰し画像デー
タを得るための方法に関する。
Detailed Description of the Invention (Industrial Field of Application) The present invention is based on outline information expressing the position and shape of the outline of a figure on a predetermined screen. The present invention relates to a method for obtaining filled image data in which a region is filled.

(従来の技術とその問題点) グラフィックデイスプレィの画面に対応したビットマツ
プ上において、与えられた図形の内部領域または外部領
域を塗り潰す技術が種々提案されている。このような技
術として代表的なもののひとつにおいては、第31図に
示すように、図形1の輪郭線2で囲まれた内部領域に輪
郭線検索原点(シード)3を設定する。そして、この検
索原点3から出発して上下左右に画像データ追跡を行な
い、輪郭線2に到達するまでの範囲を塗り潰して行く。
(Prior Art and its Problems) Various techniques have been proposed for filling in the internal or external area of a given figure on a bitmap corresponding to the screen of a graphic display. In one of the typical such techniques, as shown in FIG. 31, a contour line search origin (seed) 3 is set in an internal area surrounded by a contour line 2 of a figure 1. Then, starting from this search origin 3, image data is traced up, down, left and right, and the range until reaching the contour line 2 is filled in.

ただし、第31図において、Xは主走査座標を示し、Y
は副走査座標を示す。
However, in FIG. 31, X indicates the main scanning coordinate, and Y
indicates sub-scanning coordinates.

また、他の従来方法としては、第32図に示す方法(ス
キャンラインアルゴリズム法)がある。
Another conventional method is the method shown in FIG. 32 (scan line algorithm method).

この方法では、まず、輪郭線2の各頂点4a〜4fを、
それらのY座標に基いてソートし、それによって輪郭線
2を形成する各線分5a〜5fの位置関係を把握する。
In this method, first, each vertex 4a to 4f of the contour line 2 is
They are sorted based on their Y coordinates, and thereby the positional relationships of the line segments 5a to 5f forming the contour line 2 are grasped.

そして、X方向への主走査を行ないつつ(−Y)方向へ
の副走査を行ない、それによって各走査線と輪郭線2と
の交点を求める。
Then, while performing main scanning in the X direction, sub-scanning is performed in the (-Y) direction, thereby finding the intersection between each scanning line and the contour line 2.

ただし、各主走査において、どの線分を参照しなければ
ならないかは、上記のソートの結果によって知ることが
できる。このようにして各主走査線と輪郭線2との交点
の座標が求められることにより、各走査線において、ひ
とつの交点6aから次の交点6bまでの間の区間が、ビ
ットマツプ上で塗り潰される。
However, which line segment should be referred to in each main scan can be known from the result of the above sorting. By determining the coordinates of the intersection between each main scanning line and the contour line 2 in this way, the section from one intersection 6a to the next intersection 6b in each scanning line is filled out on the bitmap.

また、このような技術の変形として、第32図中に示す
主走査方向の分割線7によって図形1を複数の台形およ
び/または三角形に分割し、各台形や三角形の内部領域
ごとに塗り潰しを行なう技術も提案されている。
Further, as a modification of such a technique, the figure 1 is divided into a plurality of trapezoids and/or triangles by the dividing line 7 in the main scanning direction shown in FIG. 32, and the internal area of each trapezoid or triangle is filled. Techniques have also been proposed.

(発明が解決しようとする問題点) これらの従来技術のうち、第31図に示した技術におい
ては、画像メモリから画像データを画素ごとに読出して
輪郭線検索を行なわねばならない。
(Problems to be Solved by the Invention) Among these conventional techniques, in the technique shown in FIG. 31, image data must be read out pixel by pixel from the image memory to perform a contour line search.

このため、塗り潰し処理に必要とされる時間が良いとい
う問題がある。
Therefore, there is a problem in that the time required for the filling process is insufficient.

また、図形1に凹部が存在すると、ひとつの検索原点3
から出発して図形1の内部領域のすべてを塗り潰すこと
はできず、たとえば第31図の斜線領域8に対しては別
の検索原点を設定しなければならない。そして、このよ
うな斜線領域8の塗り潰しが検索原点3からの検索では
実行できなかったことを示すために、たとえば頂点4の
座標を所定のスタックエリアに退避させておかねばなら
ない。ところが、このような退避を必要とする頂点の数
は図形の形状によって異なるため、どの程度の容量を持
ったスタックエリアを準備しておかねばならないかが特
定できない。その結果、スタックエリアは大きめに設定
しておかねばならず、記憶エリアの利用が非効率的とな
る。
Also, if there is a concave part in figure 1, one search origin 3
It is not possible to fill in all of the internal area of figure 1 starting from .For example, another search origin must be set for shaded area 8 in FIG. 31. In order to indicate that the shaded region 8 could not be executed by searching from the search origin 3, for example, the coordinates of the vertex 4 must be saved in a predetermined stack area. However, since the number of vertices that require such evacuation differs depending on the shape of the figure, it is not possible to specify how much capacity the stack area should have. As a result, the stack area must be set to be relatively large, which results in inefficient use of the storage area.

一方、スキャンラインアルゴリズム法では、頂点4a〜
4fのソート処理が必要であるが、一般にソート処理は
かなりの時間を要する。このため、塗り潰し処理全体と
しての処理時間がやはり長くなってしまう。また、図形
1を台形および/または三角形に分割する技術では、台
形および/または三角形の頂点座標を求めるプロセスが
必要である。このため、この場合にも処理時間が長くな
らざるを得ないという問題がある。
On the other hand, in the scan line algorithm method, vertices 4a to
4f sorting processing is required, but sorting processing generally takes a considerable amount of time. For this reason, the processing time for the entire filling process also becomes long. Further, the technique of dividing the figure 1 into trapezoids and/or triangles requires a process of determining the coordinates of the vertices of the trapezoids and/or triangles. Therefore, in this case as well, there is a problem that the processing time inevitably increases.

さらに、スキャンラインアルゴリズム法では、輪郭線2
に右まわりまたは左まわりの方向性を付与し、それによ
って輪郭線2の内部領域を塗り潰すのか、それとも外部
領域を塗り潰すのかを指示している。このため、たとえ
ば第33図のように、方向性が特定できない図形が与え
られると、塗り潰しが困難になるという問題もある。
Furthermore, in the scan line algorithm method, the contour line 2
A clockwise or counterclockwise direction is given to the contour line 2, thereby instructing whether to fill in the inner area or the outer area of the contour line 2. For this reason, when a figure whose directionality cannot be specified, as shown in FIG. 33, is given, there is a problem that it becomes difficult to fill it in.

(発明の目的) この発明は、従来技術における上述の問題の克服を意図
しており、処理時間が短く、かつメモリの使用効率も高
いとともに、塗り潰し可能な図形の制限も少ない画像塗
り潰しデータ生成方法を提供することを目的とする。
(Object of the Invention) The present invention is intended to overcome the above-mentioned problems in the prior art, and is an image filling data generation method that has short processing time, high memory usage efficiency, and fewer restrictions on the shapes that can be filled. The purpose is to provide

(目的を達成するための手段) 上述の目的を達成するため、この発明は、所定の画面に
対応した記憶空間を有するフレームメモリの中で、所望
の図形の内部領域または外部領域を塗り潰した塗り潰し
画像データを生成する方法として、前記画面上における
前記図形の輪郭線の位置と形状とを表現した輪郭線情報
を入力する第1ステップと、前記輪郭線を画素展開する
ことにより画素表現された輪郭線を求め、前記画素表現
された輪郭線を前記フレームメモリ中にビットマツプ形
式で書込む第2ステップと、前記画素表現された輪郭線
と前記フレームメモリの記憶空間における走査線との交
差関係に基いて、前記フレームメモリの記憶空間の走査
における塗り潰し端点画素の位置を特定し、前記画面に
対応した記憶空間を有するフラグ格納メモリ中に、前記
塗り潰し端点画素の位置を指示する塗り潰し指示フラグ
をビットマツプ形式で書込む第3ステップと、前記フラ
グ格納メモリ中の前記塗り潰し指示フラグの読出し走査
と、前記塗り潰し指示フラグに基づく前記フレームメモ
リ中の前記輪郭線の内部領域または外部領域の塗り潰し
走査とを同期して行ない、それによって塗り潰し画像デ
ータを生成する第4ステップとを有しており、前記第2
ステップと前記第3ステップとを並行して実行する。
(Means for Achieving the Object) In order to achieve the above-mentioned object, the present invention provides a method for filling in the internal area or external area of a desired figure in a frame memory having a storage space corresponding to a predetermined screen. The method for generating image data includes the first step of inputting contour information representing the position and shape of the contour of the figure on the screen, and the step of inputting contour information representing the position and shape of the contour of the figure on the screen, and the step of inputting contour information expressed in pixels by pixel expansion of the contour. a second step of determining a line and writing the pixel-represented contour line in a bitmap format in the frame memory; and based on the intersecting relationship between the pixel-represented contour line and a scanning line in the storage space of the frame memory. specifies the position of the filled end point pixel in scanning the storage space of the frame memory, and writes a fill instruction flag indicating the position of the filled end point pixel in bitmap format in a flag storage memory having a storage space corresponding to the screen. synchronizing the third step of writing, the reading scan of the fill instruction flag in the flag storage memory, and the fill scan of the inner area or the outer area of the outline in the frame memory based on the fill instruction flag. and a fourth step of generating filled-in image data by performing the filling-in image data.
Step and the third step are executed in parallel.

(実施例) A、実施例の概略 第2図は、この発明の一実施例に使用される画像塗り潰
しデータ生成装置の全体ブロック図であり、第1図はこ
の実施例における処理の概念を示す図である。第2図に
おいて、この画像塗り潰しデータ生成装置10はCRT
デイスプレィ23におけるグラフィクディスプレイ処理
を行なうためのものであり、デジタイザやキーボードな
どによって構成された入力装置11を有している。この
入力装置11からは、たとえばCRTデイスプレィ23
の画面23a上における第1図(a)の図形50の輪郭
線Cの位置と形状とを表現する輪郭線情報が任意に入力
される。図形50が多角形である場合には、この輪郭線
情報は、輪郭線Cを形成する各線分L −L3の画面上
の位置を特定する情報によって形成されている。具体的
には、画面23a上における各線分し1〜L3の両端点
の主走査座標(X座標)および副走査座標(Y座標)を
含んだベクトルデータ(線分データ)によってこれらの
線分L  −13が次のように特定される。
(Embodiment) A. Outline of the embodiment FIG. 2 is an overall block diagram of an image filling data generation device used in an embodiment of the present invention, and FIG. 1 shows the concept of processing in this embodiment. It is a diagram. In FIG. 2, this image filling data generation device 10 is a CRT.
It is used to perform graphic display processing on the display 23, and has an input device 11 composed of a digitizer, a keyboard, and the like. From this input device 11, for example, a CRT display 23
Outline information expressing the position and shape of the outline C of the figure 50 of FIG. 1(a) on the screen 23a of FIG. 1(a) is arbitrarily input. When the figure 50 is a polygon, this outline information is formed by information specifying the position of each line segment L-L3 forming the outline C on the screen. Specifically, these line segments L are calculated using vector data (line segment data) including the main scanning coordinates (X coordinates) and sub-scanning coordinates (Y coordinates) of both end points of each line segment 1 to L3 on the screen 23a. -13 is specified as follows.

L :始点C1(x  、yl)。L: Starting point C1 (x, yl).

終点C2(x  、y  ) L :始点C2(x  、y  )。End point C2 (x, y) L: Starting point C2 (x, y).

終点C3(X  、y ) L :始点C3(x  、y3)。End point C3 (X, y) L: Starting point C3 (x, y3).

終点C1(X  、V  ) 1ま ただし、端点C1〜C3は輪郭線Cを形成する多角形(
図示例では三角形)の頂点となっており、連続する2本
の線分(たとえば[と12)の接読点ともなっている。
End point C1 (X, V) 1 However, end points C1 to C3 are polygons (
In the illustrated example, it is the vertex of a triangle), and also serves as a tangential reading point for two consecutive line segments (for example, [ and 12).

このため、以下では、これらの端点C1〜C3を「頂点
」または「接続点」とも呼ぶ。さらに、各線分し1〜L
3のうちの任意のものを、 線分LJ:始点C5(X  、 V5 )。
Therefore, below, these end points C1 to C3 are also referred to as "vertices" or "connection points." Furthermore, each line segment 1 to L
Line segment LJ: Starting point C5 (X, V5).

終点C(X  、V  ) EE によって表現する(第3図)。End point C (X, V) EE It is expressed by (Figure 3).

三角形以外の他の多角形についても同様である。The same applies to polygons other than triangles.

このようにして与えられた線分データは、後述する制御
信号とともに、輪郭線情報の一態様としての多角形特定
情報SPとして第2図の多角形処理回路12へ与えられ
る。この多角形処理回路12の内部構成と動作とは後に
詳述するが、その基本的礪能は、各線分り、の画素展開
と、それに基づく塗り潰し領域の特定である。これらの
うち、塗り潰し領域の特定は、各走査線上における塗り
潰し開始画素と塗り潰し終了画素とに対して塗り潰し指
示フラグを立てることにより実行される。
The line segment data thus provided, together with a control signal to be described later, is provided to the polygon processing circuit 12 in FIG. 2 as polygon specifying information SP as one form of contour information. The internal structure and operation of this polygon processing circuit 12 will be described in detail later, but its basic functions are pixel expansion of each line segment and identification of a filled area based on this. Among these, the filling area is specified by setting a filling instruction flag for a filling start pixel and a filling end pixel on each scanning line.

第1図(b)、 (c)はそれぞれ、このような画素展
開と塗り潰し領域の特定とを概念的に示している。
FIGS. 1(b) and 1(c) conceptually illustrate such pixel development and specification of a filled area, respectively.

ただし、第1図中の白丸は線分を展開して得られる画素
(線分表現画素)を示し、黒丸は塗り潰し端点画素(塗
り潰し開始画素と終了画素との総称)を示している。こ
れらの画素が線分り、上に完全に乗っていないのは、画
素のサイズがゼロでないために、線分り、が近似的に展
開されていることに起因している。なお、「線分表現画
素」は、「輪郭線表現画素」の−態様である。
However, the white circles in FIG. 1 indicate pixels obtained by expanding line segments (line segment representation pixels), and the black circles indicate filling end point pixels (general term for filling start pixels and end pixels). The reason why these pixels do not completely lie on the line segment is that the line segment is expanded approximately because the pixel size is not zero. Note that the "line segment expressing pixel" is a form of the "contour line expressing pixel".

線分表現画素の座標値(X、8.Y、8)の値は、第2
図のセレクタ14を介して1画素あたり4ビツトのフレ
ームメモリー5(15a〜15d)と、1画素あたり1
ビツトのフラグ格納メモリ16とに、それぞれのアドレ
ス信号として与えられる。
The coordinate values (X, 8.Y, 8) of the line segment representation pixel are the second
The frame memory 5 (15a to 15d) with 4 bits per pixel and 1 bit per pixel are connected via the selector 14 in the figure.
The address signal is applied to the bit flag storage memory 16 as respective address signals.

ただし、第2図中ではセレクタ14から出力される座標
値を(X、Y、)で表現している。これらのフレームメ
モリー5a〜15dのそれぞれと、フラグ格納メモリ1
6とは、ともにCRTデイスプレィ23の画面の1フレ
一ム分の画素数と同一の記憶空間を持っている。また、
これらのメモリ15.16の記憶空間では、画面23a
における走査方向との対応において、主走査方向Xと副
走査方向Yとが定義されている。
However, in FIG. 2, the coordinate values output from the selector 14 are expressed as (X, Y,). Each of these frame memories 5a to 15d and the flag storage memory 1
6 have the same storage space as the number of pixels for one frame of the screen of the CRT display 23. Also,
In the storage space of these memories 15 and 16, the screen 23a
In correspondence with the scanning direction in , a main scanning direction X and a sub-scanning direction Y are defined.

一方、図形50の内部をどのような色で塗り潰すかを示
す色情報CIは、入力装置11から入力されて色情報レ
ジスタ18に登録されている。そして、フレームメモリ
15のうち、X座標値X。
On the other hand, color information CI indicating with what color the inside of the figure 50 is to be filled is inputted from the input device 11 and registered in the color information register 18 . Then, the X coordinate value X in the frame memory 15.

およびY座標値Y、をそれぞれ列アドレスおよび行アド
レスとする記憶領域にこの色情報CIが書込まれる。こ
の実施例では書込み優先の条件を採用しており、フレー
ムメモリ15の対応するアドレスに既に書込まれた色情
報があっても、そのアドレスに新たな色情報CIが書込
まれるようになっている。既に書込まれた色情報と新た
な色情報CIとの相互関係によって定まる第3の色情報
をフレームメモリ15中に書込みたいときには、たとえ
ば排他的論理和回路を用いたリードモディファイライト
(RMW)回路を使用すればよい。
This color information CI is written in a storage area having the column address and the row address as the Y coordinate value Y and Y coordinate value Y, respectively. In this embodiment, a writing priority condition is adopted, so that even if color information has already been written to a corresponding address in the frame memory 15, new color information CI is written to that address. There is. When it is desired to write third color information determined by the mutual relationship between the already written color information and new color information CI into the frame memory 15, for example, a read modify write (RMW) circuit using an exclusive OR circuit is used. You can use .

このような書込み処理が線分表現画素のそれぞれに対し
て行なわれるため、輪郭線Cを形成するすべての線分し
、につき、線分表現画素(輪郭線表現画素)の座標値X
、、Y、が生成された後には、第1図(b)の空間的画
素分布(画素表現された輪郭線)をフレームメモリ15
のピットマツプ上で表現した状態が得られることになる
Since such writing processing is performed for each line segment expressing pixel, the coordinate value X of the line segment expressing pixel (contour line expressing pixel)
, ,Y, are generated, the spatial pixel distribution (contour expressed by pixels) in FIG. 1(b) is stored in the frame memory 15.
The state expressed on the pit map will be obtained.

このようなフレームメモリ15への層込み処理と並行し
て、フラグ格納メモリ16(初期状態においてオール“
OIIにクリアされている。)への塗り潰し指示フラグ
Fの書込みが行なわれる。このフラグFは、多角形処理
回路12で7ラグF8として発生された後に、セレクタ
14を介して排他的論理和ゲート17へ与えられる(セ
レクタ14を通った後のフラグは、フラグFと表現され
ている)。排他的論理和ゲート17の他方の入力として
は、フラグ格納メモリ16のうち、座標値X、、Y、を
それぞれ列アドレスおよび行アドレスとする記憶領域か
ら読出されたデータF。(フラグ値)が読出される。そ
して、この排他的論理和ゲート17の出力が、データF
。が格納されていたアドレスと同じアドレスに書込まれ
る。
In parallel with such layering processing to the frame memory 15, the flag storage memory 16 (in the initial state, all
Cleared by OII. ) is written. This flag F is generated as a 7-lag F8 in the polygon processing circuit 12, and then is given to the exclusive OR gate 17 via the selector 14 (the flag after passing through the selector 14 is expressed as flag F). ing). The other input of the exclusive OR gate 17 is data F read from a storage area of the flag storage memory 16 whose column and row addresses are coordinate values X, Y, respectively. (flag value) is read. Then, the output of this exclusive OR gate 17 is the data F
. is written to the same address where it was stored.

この書込みにおいて、排他的論理和によるRMW形式が
用いられているのは、次のような事情による。すなわち
、この実施例ではフラグFtfi″1″であるときに塗
り潰し端点画素であることが指示されるが、このフラグ
Fの書込みにあたっては次の3つの条件を満足させるこ
とが必要である。
The reason why the RMW format using exclusive OR is used in this writing is as follows. That is, in this embodiment, when the flag Ftfi is ``1'', it is specified that the pixel is a filled end point pixel, but when writing this flag F, it is necessary to satisfy the following three conditions.

(1)  既に書込まれているフラグ値F。が“0″で
あるときには、新たなフラグF1の値がそのまま書込ま
れること。
(1) Flag value F that has already been written. When is "0", the value of the new flag F1 is written as is.

(2)  既に書込まれているフラグ値Foが“1″で
あり、新たなフラグF1が“O”であるときには、元の
フラグ値F。= ll I IIが消去されないこと。
(2) When the already written flag value Fo is "1" and the new flag F1 is "O", the original flag value F. = ll I II is not erased.

(3)  フラグIF、F1の双方が“1”であるとき
には、塗り潰し開始画素と終了画素とが重なっているた
めに、書込み後のフラグ値を“0”とすること。
(3) When both flags IF and F1 are "1", the flag value after writing is set to "0" because the filling start pixel and the end pixel overlap.

これらの(1)〜(3)の条件を満足する論理演算は排
他的論理和であるために、排他的論理和回路17が使用
されている。
The exclusive OR circuit 17 is used because the logical operation that satisfies these conditions (1) to (3) is an exclusive OR.

以上の処理によって、フラグ格納メモリ16へのフラグ
Fの書込みが完了した時点では、第1図(C)の空間的
画素分布をフラグ格納メモリ16のビットマツプ形式で
表現した状態が得られる。
Through the above processing, when writing of the flag F to the flag storage memory 16 is completed, a state in which the spatial pixel distribution shown in FIG. 1(C) is expressed in the bitmap format of the flag storage memory 16 is obtained.

第2図の多角形処理回路12における座標値X、Y、お
よびフラグFの生成が並行して行なわれ、また、フレー
ムメモリー5への色情報CIの書込みとフラグ格納メモ
リー6への7ラグFの書込みとが並行して行なわれるた
め、これらの各処理全体としての必要時間は短いものと
なる。
The generation of coordinate values X, Y, and flag F in the polygon processing circuit 12 of FIG. Since writing is performed in parallel, the time required for each of these processes as a whole is short.

フレームメモリー5とフラグ格納メモリ16とのそれぞ
れに対する書込みが完了した後、アドレス発生回路21
は、フレームメモリー5の各アドレスを走査線順次にア
クセスするアドレス信号ADを発生する。このようなア
クセスにおいて「走査線順次」という概念が適用可能で
あるのは、フレームメモリー5および格納メモリ16が
、CRTデイスプレィ23の画面と1対1に対応したビ
ットマツプ形式とされているからである。したがって、
ここで言う「走査線順次」とは、CRTデイスプレィ2
3の画面23aにおける走査順序と対応したアクセス順
序であるということを意味している。
After writing to each of the frame memory 5 and flag storage memory 16 is completed, the address generation circuit 21
generates an address signal AD for sequentially accessing each address of the frame memory 5 in scanning line order. The concept of "scanning line sequential" is applicable to such access because the frame memory 5 and storage memory 16 are in a bitmap format that corresponds one-to-one with the screen of the CRT display 23. . therefore,
"Scanning line sequential" here means CRT display 2
This means that the access order corresponds to the scanning order on the screen 23a of No. 3.

このアドレス信号ADはまた、フラグ格納メモリ16に
も供給される。このときには、フラグ格納、メモリ16
は読出し能動化状態とされており、各画素についてのフ
ラグFの値が走査線順次に読出される。ただし、フラグ
格納メモリー6からの読出しが完了した画素については
、フラグ格納メモリ16中の当該画素についてのフラグ
が0”にクリアされる。そして、このフラグFの値を示
す信号は、第2図中に示すように結線されたJK−7リ
ツプ70ツブ(JK−FF)20に与えられる。
This address signal AD is also supplied to flag storage memory 16. At this time, flag storage, memory 16
is in a readout enabled state, and the value of the flag F for each pixel is read out sequentially in scanning line order. However, for a pixel for which reading from the flag storage memory 6 has been completed, the flag for that pixel in the flag storage memory 16 is cleared to 0''.The signal indicating the value of this flag F is as shown in FIG. It is applied to a JK-7 lip 70 tube (JK-FF) 20 connected as shown inside.

したがって、たとえば第4図に示すように、ひとつの走
査線lに沿った読出し走査において画素P8.pbが塗
り潰し端点画素である場合には、フラグFはこれらの画
素P、P、で“1″となす、JK−FF20の出力は画
素P  、Pゎ間で“1″となる。このJK−FF20
の出力は、フレームメモリー5の書込み能動化信号WE
となっている。そして、これらのアクセスが持続してい
る間は、色情報レジスター8から色情報CIがフレーム
メモリー5に与えられている。
Therefore, as shown in FIG. 4, for example, in readout scanning along one scanning line l, pixel P8. When pb is a filled end point pixel, the flag F is set to "1" between these pixels P and P, and the output of the JK-FF 20 is set to "1" between pixels P and P. This JK-FF20
The output of is the write enable signal WE of the frame memory 5.
It becomes. While these accesses continue, color information CI is provided to the frame memory 5 from the color information register 8.

このため、フラグ格納メモリ16からの読出しとフレー
ムメモリ15への書込みとを同期して行なうことにより
、フレームメモリ15上において、X方向に沿って2個
の塗り潰し端点画素ではさまれた区間内の画素に、色情
報CIが付与される。
Therefore, by synchronizing reading from the flag storage memory 16 and writing to the frame memory 15, data in the section sandwiched between two filled end point pixels along the X direction on the frame memory 15 is Color information CI is given to the pixel.

このような塗り潰し処理によって新たに色情報Crが付
与された画素を、第1図(d)内ではX印を付した白丸
で示している。
Pixels to which color information Cr is newly added through such filling processing are indicated by white circles marked with an X in FIG. 1(d).

以上のようにしてフレームメモリ15内で生成された画
像データ(第1図(d))は、第1図(a)の輪郭線C
の内部領域を塗り潰した画像データとなっている。この
ため、フレームメモリ15からこの塗り潰し画像データ
を走査線順次に読出し、RAMなどで構成されたカラー
パレット回路22でその色コードを解読すれば、画素ご
との色画像信号が得られる。そして、CRTデイスプレ
ィ23の画面23aの電子ビーム走査と同期して色画像
信号に基<CRTデイスプレィ23上の画像表示を行な
えば、第1図(d)に相当する画像が得られる。
The image data (FIG. 1(d)) generated in the frame memory 15 as described above is based on the contour line C in FIG. 1(a).
This is image data with the internal area filled in. Therefore, by sequentially reading out the filled image data from the frame memory 15 in scanning line order and decoding the color code using a color palette circuit 22 composed of a RAM or the like, a color image signal for each pixel can be obtained. If an image is displayed on the CRT display 23 based on the color image signal in synchronization with the electron beam scanning of the screen 23a of the CRT display 23, an image corresponding to FIG. 1(d) is obtained.

第2図の装置10にはまた、多角形ではなく円の内部領
域または外部領域を塗り潰す際に使用される円処理回路
13も設けられている。この円処理回路13では、画面
23a上における円の大きさや位置を表現するパラメー
タを、円特定情報SCとして入力装@11から入力する
。そして、後述する動作によって、円の画素展開とフラ
グ生成とを行なう。したがって、この円処理回路13か
らは、円表現画素の主走査座標値X、。および副走査座
標値Y、。と、塗り潰し端点指示フラグF。とがセレク
タ14に与えられる。
The apparatus 10 of FIG. 2 is also provided with a circle processing circuit 13 which is used to fill in the interior or exterior regions of circles rather than polygons. In this circle processing circuit 13, parameters expressing the size and position of a circle on the screen 23a are inputted from the input device @11 as circle specifying information SC. Then, pixel expansion of the circle and flag generation are performed by operations described below. Therefore, from this circle processing circuit 13, the main scanning coordinate value X of the circle-expressing pixel. and sub-scanning coordinate value Y,. and the fill end point instruction flag F. is given to the selector 14.

セレクタ14は、円処理時において入力装置11から与
えられる切換信号SWに応答して、円処理回路13から
入力された座標値xpc、’l’p。およびフラグF。
The selector 14 selects coordinate values xpc, 'l'p input from the circle processing circuit 13 in response to a switching signal SW given from the input device 11 during circle processing. and flag F.

を、座標値X、、Y、およびフラグFとして、メモリ1
5.16および排他的論理和ゲート17にそれぞれ出力
する。
, as coordinate values X, , Y, and flag F, memory 1
5.16 and exclusive OR gate 17, respectively.

以後の処理は多角形の処理の場合と基本的には同一であ
る。すなわち、上記の説明における線分表現画素を、円
表現画素と読替えればよい。そして、多角形処理回路1
2と円処理回路13とは同時に動作することはなく、多
角形特定情報SPが与えられたときには前者が、また円
特定情報SCが与えられたときには後者がそれぞれ動作
する。
The subsequent processing is basically the same as the polygon processing. That is, the line segment representation pixels in the above description may be replaced with circle representation pixels. And polygon processing circuit 1
2 and the circle processing circuit 13 do not operate at the same time; the former operates when polygon specifying information SP is given, and the latter operates when circle specifying information SC is given.

また、第2図のセレクタ14よりも後段側のエレメント
における処理は、図形が多角形であるか円であるかとは
無関係に実行される。そして、任意の個数の図形の入力
順序に沿ってメモリ15゜16への書込みが行なわれ、
同一の色によって塗り潰されるべきすべての図形(任意
個数の多角形と任意個数の円)の入力が完了した後に、
第1図(d)の塗り潰し動作が実行される。異なる色に
ついての塗り潰しをさらに行なう場合には、図形入力か
らの処理を繰返す。
Further, the processing in the elements subsequent to the selector 14 in FIG. 2 is executed regardless of whether the figure is a polygon or a circle. Then, an arbitrary number of figures are written into the memories 15 and 16 in accordance with the input order,
After entering all the shapes (any number of polygons and any number of circles) that should be filled with the same color,
The filling operation shown in FIG. 1(d) is executed. When filling in different colors, the process starting from inputting the figure is repeated.

このため、以下では、まず多角形処理回路12について
詳述し、円処理回路13についてはその後に説明する。
Therefore, in the following, the polygon processing circuit 12 will be explained in detail first, and the circle processing circuit 13 will be explained later.

これらの回路12.13は実質的に互いに独立して動作
を行なうものであるため、一方のみを設けておいてもよ
い。
Since these circuits 12 and 13 operate substantially independently of each other, only one of them may be provided.

8、  3処理回 12の詳細 第5図は、多角形処理回路12の内部構成を示すブロッ
ク図である。第2図の入力装置11から入力される多角
形特定情報SPは、各線分し、についての始点座標(x
、y)および終点座標S (X、V)を含んでいる。これらの線分につE  [ いての座標値の入力は、輪郭線Cに沿って左まわりまた
は右まわりの順序で行なわれる。たとえば、第1図の例
では、最初に線分L1についての始点C1および終点C
2の座標値が入力され、次に線分L2についての始点C
2および終点C3の座標値が入力され、そして最後に線
分L3の始点C3および終点C1の値が入力される。多
角形処理回路12は、各線分についての始点座標および
終点座標が入力されるごとに動作する。すなわち、この
多角形処理回路12は、各線分を直列的に処理するよう
になっている。なお、各線分についての情報を右まわり
に入力するか左まわりに入力するかは任意であり、それ
によってどの領域が塗り潰されるかが指示されるわけで
はない。
8. Details of 3 Processing Times 12 FIG. 5 is a block diagram showing the internal configuration of the polygon processing circuit 12. The polygon specifying information SP input from the input device 11 in FIG. 2 includes the starting point coordinates (x
, y) and the end point coordinates S (X, V). The input of coordinate values for these line segments is performed along the contour line C in the order of counterclockwise or clockwise rotation. For example, in the example of FIG. 1, first the starting point C1 and the ending point C
2 coordinate values are input, and then the starting point C for line segment L2 is input.
2 and the coordinate values of the end point C3 are input, and finally the values of the start point C3 and the end point C1 of the line segment L3 are input. The polygon processing circuit 12 operates every time the start point coordinates and end point coordinates for each line segment are input. That is, this polygon processing circuit 12 processes each line segment in series. Note that it is arbitrary whether the information about each line segment is input clockwise or counterclockwise, and this does not dictate which area is to be filled.

多角形特定情報SPはまた、スタート/エンド信号vS
Eを含んでいる。このスタート/エンド信号vSEは、
入力される線分の座標値が、輪郭線Cに沿って最初の線
分(たとえば線分L1)であるのか、最後の線分(線分
L3)であるのか、それとも中間の線分(線分L2)で
あるのかを識別させるための信号である。このスタート
/エンド信号■SEは、オペレータが入力装置11から
座標値の入力を行なう際に、あわせてスタート/エンド
入力操作を行なうことによって発生する。
The polygon specific information SP also includes a start/end signal vS
Contains E. This start/end signal vSE is
Whether the input line segment coordinate values are the first line segment (for example, line segment L1), the last line segment (line segment L3), or an intermediate line segment (line segment L3) along the contour line C. This is a signal for identifying whether it is the minute L2). This start/end signal SE is generated by the operator simultaneously performing a start/end input operation when inputting coordinate values from the input device 11.

入力された始点座標(x  、y  )、終点座標S (x、y)およびスタート/エンド信号vSEE は、レジスタ101〜103にそれぞれ登録される。こ
れらのうち、レジスタ103は、スタート/エンド信号
VSEが「最初の線分」を指示する際に輪郭線スタート
パルス■3を発生する。また、「最後の線分」であるこ
とが指示されているときには、輪郭線エンドパルスVE
 (=“H″)を発生しつづける。オペレータがスター
ト/エンド信号VSE発生のための入力操作を行なわず
、それによって「中間の線分」であることが指示されて
いるときには、パルスVs、vEのいずれも発生しない
The input start point coordinates (x, y), end point coordinates S (x, y), and start/end signal vSEE are registered in registers 101 to 103, respectively. Of these, the register 103 generates a contour start pulse 3 when the start/end signal VSE indicates the "first line segment". Also, when the "last line segment" is specified, the contour end pulse VE
(="H") continues to be generated. When the operator does not perform any input operation to generate the start/end signal VSE, thereby indicating an "intermediate line segment," neither pulses Vs nor vE are generated.

座標値<x5 、 ’/3 )および(XE 、 yE
)は、レジスタ101,102から前処理部200に与
えられる。前処理部200は、直線発生器300におけ
る直線発生動作(線分の画素展開)のための前処理を行
なうために設けられている。この実施例では、線分の画
素展開を、プレセンハム(Bresenham)のアル
ゴリズムに従って行なう。このプレセンハムのアルゴリ
ズムは、ODA (デジタル微分解析器)の使用される
アルゴリズムのひとつであり、その詳細はたとえば、 Bresenhai J、E、:”Algorithm
 for ComputerControl of a
 Digital Plotter”、 IBM 5y
st、J、 、4(1):25−30.1965に開示
されているが、その概要は次の通りである。
Coordinate values <x5, '/3) and (XE, yE
) is given to the preprocessing section 200 from the registers 101 and 102. The preprocessing unit 200 is provided to perform preprocessing for the straight line generation operation (pixel expansion of a line segment) in the straight line generator 300. In this embodiment, pixel expansion of line segments is performed according to Bresenham's algorithm. Bresenham's algorithm is one of the algorithms used in ODA (digital differential analyzer), and its details can be found in, for example, Bresenhai J, E.: "Algorithm
for ComputerControl of a
Digital Plotter”, IBM 5y
St. J., 4(1):25-30.1965, the outline of which is as follows.

(B−1)プレセンハムアルゴリズムの概略プレセンハ
ムアルゴリズムにおいては、第6図に示すように、線分
L の始点(x、y)J      SS を中心とし、かつ線分り、の長さに等しい半径を持つ円
C8を考える。ただし、線分り、および円C8は2次元
直角座標系において表現されており、この実施例との対
応で言えば、主走査座標軸XおよびD1走査座標軸Yに
よって、゛この2次元直角座標系が形成されている。
(B-1) Overview of the Presenham algorithm In the Presenham algorithm, as shown in Figure 6, the starting point (x, y) J SS of the line segment L is the center, and the radius is equal to the length of the line segment. Consider a circle C8 with . However, the line segment and the circle C8 are expressed in a two-dimensional rectangular coordinate system, and in correspondence with this example, the main scanning coordinate axis X and the D1 scanning coordinate axis Y form this two-dimensional rectangular coordinate system. has been done.

座標軸X、Yによって第6図の2次元平面は第1象限か
ら第4象限までの4つの象限に分割されるが、さらに、
この平面を、X軸およびY軸に対して45°の角度をな
す2本の直線α、βで8個の部分平面PL、〜PL8に
細分割する。これらの部分平面PL  −PL8のうち
、7個の部分平面PL  −PL8は、X軸およびY軸
の交換操作、X軸の符号反転操作(X→−X)および/
またはY軸の符号反転操作(Y→−Y)によって、部分
平面PL1に一致させることができる。
The two-dimensional plane in Fig. 6 is divided into four quadrants from the first quadrant to the fourth quadrant by the coordinate axes X and Y.
This plane is subdivided into eight partial planes PL, ~PL8 by two straight lines α and β that form an angle of 45° with respect to the X and Y axes. Among these partial planes PL-PL8, seven partial planes PL-PL8 are used for exchanging the X-axis and Y-axis, reversing the sign of the X-axis (X→-X), and/or
Alternatively, by reversing the sign of the Y axis (Y→-Y), it can be made to coincide with the partial plane PL1.

すなわち、たとえば線分し、が、第6図中に仮想線で示
すように部分平面PL3に依存していたとしても、あた
かも部分平面PL1中に存在していたかのように想定し
て画素展開を行ない、それによって得られた結果に対し
て上記の交換/反転操作を行なえば、部分平面PL3上
における画素展開結果を得ることができることになる。
That is, even if, for example, a line segment depends on the partial plane PL3 as shown by the virtual line in FIG. 6, the pixel expansion is performed as if it existed in the partial plane PL1. , by performing the above exchange/inversion operation on the result obtained, it is possible to obtain the pixel expansion result on the partial plane PL3.

このため、−膜性を失うことなく、線分り、は部分平面
PL  上に存在するとして、この線分り、の画素展開
を行なえばよい。
Therefore, the pixel expansion of the line segment can be performed on the assumption that the line segment exists on the partial plane PL without losing its membrane properties.

部分平面PL1に着目したとき、この部分平面PL1内
に存在する線分し、とX軸とのなす角度θは、O°≦θ
〈45°の範囲内の値を持っている。つまり、第7図に
示すように画素51がX方向およびY方向のそれぞれに
おいて長さdを有する矩形であるとすると、X座標が長
さdだけ変化したときの線分LJ上のY座標の変化は、
長さd以下である。このため、線分り、を画素展開した
ときには、X座標が長さdだけ変化したときのY座標の
変化は、0画素分または1画素分に限定される。
When focusing on the partial plane PL1, the angle θ between the line segment existing in this partial plane PL1 and the X axis is O°≦θ
<Has a value within the range of 45°. In other words, if pixel 51 is a rectangle with length d in both the X and Y directions as shown in FIG. 7, then the Y coordinate on line segment LJ when the X coordinate changes by length d. The change is
The length is less than or equal to d. Therefore, when the line segment is expanded into pixels, the change in the Y coordinate when the X coordinate changes by the length d is limited to 0 pixels or 1 pixel.

プレセンハムのアルゴリズムは以上のような原理に従っ
て線分の画素展開を行なう方法であって、(1)  線
分L が部分平面(8分円)PL1〜PL8のいずれの
中に存在するかを判定すること(第1プロセス)、 (2)  線分の成分変化率が大きい方向(上記の例で
はX方向)についてはX座標をN l IIずつ変化さ
せ、成分変化率の小さい方向(Y方向)についてはY座
標を“0″または1″だけ変化させつつ、線分L に対
応する部分平面PL1内の線分の画素展開を行なうこと
(第2プロセス)、(3)  上記(1)、 (2)の
結果に基いて、線分り。
Presenham's algorithm is a method of pixel expansion of a line segment according to the above-mentioned principles. (1) Determine which of the partial planes (octants) PL1 to PL8 the line segment L exists in; (1st process), (2) In the direction where the rate of change in the component of the line segment is large (X direction in the above example), change the X coordinate by N l II, and in the direction where the rate of change in the component is small (Y direction) is to perform pixel expansion of the line segment in the partial plane PL1 corresponding to the line segment L while changing the Y coordinate by "0" or 1" (second process), (3) above (1), (2 ) based on the result of line segmentation.

の線分表現画素を特定すること(第3プロセス)、の、
3つのプロセスの組合せによって画素展開が実行される
Identifying line segment representation pixels (third process),
Pixel expansion is performed by a combination of three processes.

(B−2)前処理部200の詳細 前処理部200は、このようなプレセンハムのアルゴリ
ズムのうち、第1プロセスを実行するとともに、各線分
し、のそれぞれに対して線分方向識別データID(後述
する。)を与えるための回路である。この前処理部20
0の内部構成は第8図に示されている。
(B-2) Details of the preprocessing unit 200 The preprocessing unit 200 executes the first process of the Presenham algorithm, and also generates line segment direction identification data ID ( (described later). This pre-processing section 20
The internal structure of 0 is shown in FIG.

第8図において、レジスター’01.102に保持され
ている座標値(x  、y  )、  (XE。
In FIG. 8, the coordinate values (x, y), (XE.

S yE )のうち、X座標X、XEは減算器201に、ま
たY座標値y 、y は減算器202に、SE それぞれ与えられる。このため、減算器201゜202
からは、線分り、のX方向およびY方向の成分(変位)
: X sE= X EX s           ””
 (1)VSE= VE  V3          
 ”12)がそれぞれ出力される。これらの成分XSE
” SEはレジスタ203.204にそれぞれ保持され
る。
Of S yE ), the X coordinates X and XE are given to the subtractor 201, and the Y coordinate values y and y are given to the subtractor 202, respectively. For this reason, the subtractors 201 and 202
From is the component (displacement) in the X and Y directions of the line segment.
: X sE= X EX s ””
(1) VSE= VE V3
”12) are output respectively.These components XSE
” SEs are held in registers 203 and 204, respectively.

X方向成分X3Eは符号判定器205に与えられる。符
号判定器205は、X方向成分xSEの符号が負である
ときに、X方向モードパルスvHXを発生する。同様に
、符号判定器206はy方向成分”SEの符号を判定し
、その符号が負であるときにY方向モードパルスVMY
を発生する。
The X-direction component X3E is provided to the sign determiner 205. The sign determiner 205 generates an X-direction mode pulse vHX when the sign of the X-direction component xSE is negative. Similarly, the sign determiner 206 determines the sign of the y-direction component "SE, and when the sign is negative, the Y-direction mode pulse VMY
occurs.

X方向モードパルスVHxが発生したときには、次段の
符号反転器207においてX方向成分X8E(〈0)の
符号を反転し、それによって得られた値によってX方向
距離dxを定義する。X方向モードパルスvHxが発生
しないときには、X方向成分xSEの値そのものによっ
てX方向路111dxが定義される。したがって、この
符号反転器207では、X方向成分xSEの絶対値lX
5ElによってX方向距離dxを定義していることにな
る。Y方向についての符号反転器208も同様であって
、この符号反転器208からは、Y方向距離dV−IV
3Elの値が出力される。
When the X-direction mode pulse VHx is generated, the sign of the X-direction component X8E (<0) is inverted in the sign inverter 207 at the next stage, and the X-direction distance dx is defined by the value obtained thereby. When the X-direction mode pulse vHx is not generated, the X-direction path 111dx is defined by the value of the X-direction component xSE itself. Therefore, in this sign inverter 207, the absolute value lX of the X direction component xSE
5El defines the distance dx in the X direction. The same applies to the sign inverter 208 in the Y direction, and from this sign inverter 208, the Y direction distance dV-IV
The value of 3El is output.

ところで、X方向モードパルスV。Xが発生することに
より、線分り、が第9図の左半部の部分平面PL  〜
PL6のうちのいずれかに属していることが指示される
。また、Y方向モードパルス■MYが発生したときには
、線分し、が第9図の下半部の部分平面PL  −PL
8のいずれかに属していることが指示される。したがっ
て、これらのパルスv 、■ は、線分LJの方向を判
別するHX    MY 線分方向判別情報の一部をなしていることになる。
By the way, the X direction mode pulse V. Due to the occurrence of X, the line segment becomes the partial plane PL in the left half of FIG.
It is specified that it belongs to one of PL6. Also, when the Y-direction mode pulse ■MY occurs, the line is segmented, and the partial plane PL −PL in the lower half of FIG.
8. Therefore, these pulses v and ■ form part of the HX MY line segment direction determination information for determining the direction of the line segment LJ.

これらのパルス■HX= ■MYは、後述する直線発生
器300(第13図)内に設けられたレジスタ311.
312にも与えられている。レジスタ311.312に
は初期状態において1Nが保持されており、パルスvH
X、vHYがそれぞれ与えられると、それらの保持デー
タは“O″にリセットされるようになっている。すなわ
ち、レジスタ311.312に保持されているff1(
X方向モードデータMXおよびY方向モードデータMY
)は、第9図に示した関係によって、X軸およびY軸に
関する線分し、の方向モードを示していることになる。
These pulses ``HX = ``MY'' are stored in a register 311.
It is also given in 312. Registers 311 and 312 hold 1N in the initial state, and the pulse vH
When X and vHY are respectively given, their held data is reset to "O". In other words, ff1(
X direction mode data MX and Y direction mode data MY
) indicates the directional mode of the line segment with respect to the X-axis and the Y-axis, according to the relationship shown in FIG.

第8図の符号反転器207.208から出力された距離
dx、dyの値は、比較器209に与えられる。比較器
209は、これらの距離dx、dyの値を相互に比較し
、dx<dyのときにはスワップモードパルスVH8を
出力する。dx<dyの条件が満されているということ
は、線分LJが、第9図の部分領tii!PL  、P
L  、PL  、PL7のうちのいずれかに属してい
るということである。この場合には、線分LJとX軸と
のなす角度が45°以上である。そこで、スワップモー
ドパルスVH3が発生したときには、第8図のスワップ
回路210が距離dx、dyの値を互いに交換し、それ
によって得られる値によって、X方向換算距離ΔXおよ
びY方向換算距離ΔYをそれぞれ定義する。また、スワ
ップモードパルスVH3が発生していないとき(つまり
dx≧dyであるとき)には、距離dx、 dyそのも
のによって、換算距離ΔX、ΔYをそれぞれ定義する。
The values of distances dx and dy output from sign inverters 207 and 208 in FIG. 8 are provided to a comparator 209. Comparator 209 mutually compares the values of these distances dx and dy, and outputs swap mode pulse VH8 when dx<dy. The fact that the condition dx<dy is satisfied means that the line segment LJ is the partial region tii! of FIG. P.L., P.L.
This means that it belongs to one of L, PL, and PL7. In this case, the angle between the line segment LJ and the X-axis is 45° or more. Therefore, when the swap mode pulse VH3 is generated, the swap circuit 210 in FIG. 8 exchanges the values of distances dx and dy with each other, and the resulting values are used to calculate the converted distance ΔX in the X direction and the converted distance ΔY in the Y direction, respectively. Define. Furthermore, when the swap mode pulse VH3 is not generated (that is, when dx≧dy), the converted distances ΔX and ΔY are defined by the distances dx and dy themselves, respectively.

つまり、ΔX=d y、ΔY=d X (dx<dyのとき)  ・・・(3)ΔX=dx、Δ
Y−d V (dx≧dyのとき)  ・・・(4)である。
In other words, ΔX=dy, ΔY=dX (when dx<dy)...(3) ΔX=dx, Δ
Y−dV (when dx≧dy) (4).

すなわち、dx<dyのときには、X軸とY軸とを互い
に交換することにより、線分り、とX軸とのなす角度が
常に0°から45°の範囲となるようにする。このため
、以上のような符号反転と座標交換とによって、線分し
、が第9図の部分平面PL、に存在しない場合でも、あ
たかも部分平面PL1内に存在するように考えて、線分
し、の画素展開を行なうことが可能となる。
That is, when dx<dy, the X-axis and Y-axis are exchanged with each other so that the angle between the line segment and the X-axis is always in the range of 0° to 45°. Therefore, by the sign inversion and coordinate exchange as described above, even if the line segment does not exist in the partial plane PL in FIG. 9, the line segment can be treated as if it existed in the partial plane PL1 It becomes possible to perform pixel expansion of .

スワップモードパルスVH3はまた、第13図のレジス
タ313にも与えられている。レジスタ313は、レジ
スタ311.312と同様に、初期状態において1″が
セットされている。そして、スワップモードパルス■H
3が与えられると、レジスタ313の保持値(スワップ
モードデータMS)は“O″へとリセットされる。この
ため、レジスタ311〜313の保持値であるX方向モ
ードデータMX、Y方向モードデータMYおよびスワッ
プモードデータMSを参照すれば、第9図中に示した関
係によって、線分り、が部分平面(8分円)PL  −
PL8のいずれに属しているかがわかるようになってい
る。
Swap mode pulse VH3 is also provided to register 313 in FIG. The register 313, like the registers 311 and 312, is set to 1'' in the initial state.Then, the swap mode pulse ■H
When 3 is given, the value held in register 313 (swap mode data MS) is reset to "O". Therefore, if we refer to the X-direction mode data MX, Y-direction mode data MY, and swap mode data MS, which are the values held in the registers 311 to 313, we can see that the line segment is a partial plane ( 8th circle) PL -
You can see which PL8 it belongs to.

第10図は、前処理回路200をマイクロコンピュータ
を用いてソフト的に構成した場合の、マイクロコンピュ
ータの動作を示すフローチャートである。第10図にお
ける動作は、各処理が直列的に行なわれることを除けば
第8図のハード回路の動作と同じであるため、その説明
は省略する。
FIG. 10 is a flowchart showing the operation of the microcomputer when the preprocessing circuit 200 is configured using software using a microcomputer. The operation in FIG. 10 is the same as the operation of the hardware circuit in FIG. 8, except that each process is performed in series, so a description thereof will be omitted.

なお、第10図のステップS1で実行される換算偏差(
ΔY−ΔX)の演算は、第5図の減算器107における
減算(模達する。)に対応している。
Note that the conversion deviation (
The calculation ΔY−ΔX) corresponds to the subtraction (simulation) in the subtracter 107 in FIG.

第8図の前処理回路200にはまた、線分方向識別デー
タ発生回路250が設けられている。この線分方向識別
データ発生回路250は、線分り、の方向に基いて線分
方向識別データIDを発生する。この線分方向識別デー
タ10は、後述するように、2つの線分の接続点を塗り
潰し端点とするか否かを決定する際に使用される。
The preprocessing circuit 200 in FIG. 8 is also provided with a line segment direction identification data generation circuit 250. The line segment direction identification data generation circuit 250 generates line segment direction identification data ID based on the direction of the line segment. This line segment direction identification data 10 is used, as will be described later, in determining whether or not a connection point between two line segments is to be a filled end point.

線分方向識別データIDの値は、第11図に示した規則
に基いて決定される。すなわち、第6図と同様の円CB
を考えたとき、線分り、がどの方向に向いているかによ
って、次のように、線分方向識別データIDにOII〜
“3″の値を付与する。
The value of the line segment direction identification data ID is determined based on the rules shown in FIG. In other words, the circle CB similar to that in Figure 6
When considering, depending on which direction the line segment is facing, the line segment direction identification data ID is set to OII~
Assign a value of “3”.

(1)  線分り、が、X軸の正の方向に向いたベクト
ルARと一致するどき:ID=“0”、(2)  線分
し、が、Y軸の正の方向に成分を持つとき(すなわち領
域A。に属するとき):ID−“1” 、 (3)線分り、が、X軸の負の方向に向いたベクトルA
、と一致するとき:!D−“2″、(4)  線分り、
が、Y軸の負の方向に成分を持つとき(すなわち領域A
、に凡するとき):ID−3” 。
(1) When the line segment coincides with the vector AR pointing in the positive direction of the X axis: ID = "0", (2) When the line segment has a component in the positive direction of the Y axis (i.e., when belonging to area A): ID-“1”, (3) Line segment is vector A pointing in the negative direction of the X-axis
, when matching: ! D-“2”, (4) line segment,
has a component in the negative direction of the Y axis (i.e. area A
): ID-3".

線分方向識別データ発生回路250は、線分り、が上記
(1)から(4)までのうちのいずれの条件を満足して
いるかどうかを判定するために、Y方向成分”SEの値
を取込むとともとに、第13図のレジスタ311.31
2から方向モードデータMX、MYの値を取込んでいる
。線分方向識別データ発生回路250をソフト的に構成
した場合の動作フローチャートが第12図に示されてい
るが、この第12図の内容は上記の説明と第9図とから
自明であるため、説明は省略する。
The line segment direction identification data generation circuit 250 takes the value of the Y direction component "SE" in order to determine whether the line segment satisfies any of the conditions (1) to (4) above. As well as register 311.31 in FIG.
The values of direction mode data MX and MY are taken in from 2. FIG. 12 shows an operation flowchart when the line segment direction identification data generation circuit 250 is configured in software, and since the contents of FIG. 12 are self-evident from the above explanation and FIG. 9, Explanation will be omitted.

(B−3)直線発生器300の詳細 前処理回路200から出力された換算距離ΔX、ΔYの
値は、第5図のラッチ回路104.105でそれぞれラ
ッチされた後に直線発生器300に与えられる。また、
減算器106では、これらの換算距離ΔX、ΔYの差を
求め、それによって換算偏差(ΔY−ΔX)を出力する
。換算偏差(ΔY−ΔX)の値はラッチ回路107でラ
ッチされた後に、直線発生器300に与えられる。換算
距離ΔX、ΔYは、それらの定義によって、絶対値lx
  1.1y3Elと、 SE ΔX=Max[l x  l 、  l ysEl ]
  ・・・(5)SE △Y=Min[l x  l 、  l y3E1 ]
  −(6)SE の関係にある。ただし、Max[・・・]、Min[・
・・]は、それぞれ最大値、R小値を示している。また
、換算偏差(ΔY−ΔX)はゼロまたは負の値を持って
いる。
(B-3) Details of the linear generator 300 The values of the converted distances ΔX and ΔY output from the preprocessing circuit 200 are respectively latched by the latch circuits 104 and 105 in FIG. 5, and then given to the linear generator 300. . Also,
The subtracter 106 calculates the difference between these converted distances ΔX and ΔY, and outputs the converted deviation (ΔY - ΔX). The value of the converted deviation (ΔY−ΔX) is latched by the latch circuit 107 and then provided to the linear generator 300. By definition, the converted distances ΔX and ΔY are the absolute values lx
1.1y3El and SE ΔX=Max[l x l, lysEl]
...(5) SE △Y=Min[l x l , l y3E1 ]
-(6) There is a relationship of SE. However, Max[...], Min[・
] indicate the maximum value and the R small value, respectively. Further, the conversion deviation (ΔY−ΔX) has a value of zero or a negative value.

直線発生器300の内部構成が第13図に示されている
。この内部構成と動作とを理解する目的で、まず次の間
を定義する。
The internal configuration of the linear generator 300 is shown in FIG. For the purpose of understanding this internal configuration and operation, we will first define the following.

DX:これは第13図のデクリメントカウンタ301内
において、一画素分の処理が完了するごとに1′°ずつ
デクリメントする値である。このデクリメントカウンタ
301には、初期状態において、X方向の換算距離ΔX
の値がロードされている。このため、N画素分の処理が
完了した時点では、 DX−ΔX−N           ・・・(7)と
なっている(第15図参照)。線分し、の全長にわたっ
て画素展開が完了するとDX=Oとなり、それによって
線分り、についての処理完了信号SE1が出力される。
DX: This is a value that is decremented by 1'° each time processing for one pixel is completed in the decrement counter 301 in FIG. In the initial state, this decrement counter 301 has a converted distance ΔX in the X direction.
The value of is loaded. Therefore, when the processing for N pixels is completed, the result is DX-ΔX-N (7) (see FIG. 15). When the pixel expansion is completed over the entire length of the line segment, DX=O, and a processing completion signal SE1 for the line segment is output.

m:これは、線分し、を順次画素展開して行くにあたっ
て、その時点までに、X方向およびY方向の双方に対し
て同時に画素座標を変化させた累積回数を示す。したが
って、たとえば第7図の線分LJについて、画素51ま
での画素展開が完了した時点では、x=x  、x3.
x5の3回だけX方向およびY方向の同時画素座標変化
が行なわれだことになり、m=3となっている。
m: This indicates the cumulative number of times the pixel coordinates have been changed simultaneously in both the X direction and the Y direction up to that point when dividing the line segment and sequentially developing it into pixels. Therefore, for example, regarding line segment LJ in FIG. 7, when pixel development up to pixel 51 is completed, x=x, x3.
Simultaneous pixel coordinate changes in the X and Y directions are to be performed three times x5, so m=3.

n:これは、その時点までの画素展開において、X方向
のみの画素座標変化が生じた累積回数を示す。第7図の
例では、X=X2.X4でこのような変化が生じており
、n−2となっている。
n: This indicates the cumulative number of times that pixel coordinates change only in the X direction in pixel development up to that point. In the example of FIG. 7, X=X2. Such a change occurs in X4, resulting in n-2.

既に説明したように、プレセンハムのアルゴリズムでは
、Y座標は一画素分の画素展開につき、“OI+または
“1″だけ変化する。また、線分り、はX軸に対して4
5°以下の角度をなしているために、X座標は毎回“1
”だけ変化させる。
As already explained, in Presenham's algorithm, the Y coordinate changes by "OI+" or "1" for each pixel expansion.Also, the line segment changes by 4 with respect to the X axis.
Since the angle is less than 5°, the X coordinate is “1” every time.
“Only change.

このため、上記回数値m、nの合計値(m+ n )は
、既に得られている線分表現画素の数(=N)に等しい
Therefore, the total value (m+n) of the above-mentioned number values m and n is equal to the number of line segment representation pixels that have already been obtained (=N).

Xc、Yo:これらはそれぞれ、その時点で発生してい
る画素(たとえば第14図の画素52)と、始点(x、
Y)との間のX方向偏差およ、SS びY方向偏差である。回数値m、nの定義によって、 X c = m + n = N          
 = (8)Yc=m               
・・・(9)の関係がある。
Xc, Yo: These respectively indicate the pixel occurring at that time (for example, pixel 52 in Figure 14) and the starting point (x,
SS and Y). By the definition of the number of times m and n, X c = m + n = N
= (8) Yc=m
...There is the relationship (9).

以上の準備のもとで、既に第14図の画素52まで画素
展開が完了し、画素52の次の線分表現画素を求める場
合について説明する。この時点で判定すべき事項は、次
の線分表現画素として、X方向に隣接する画素54を採
用するのか、それとも斜め方向に隣接する画素53を採
用するのかということである。換言すれば、X方向距離
X。のみを1″だけ増加させるか、それともX方向およ
びY方向の偏差X。、Yoの双方を“1”だけ増加させ
るのかという判定が必要となる。
With the above preparations, a case will be described in which pixel development has already been completed up to pixel 52 in FIG. 14 and the next line segment representing pixel after pixel 52 is determined. The matter to be determined at this point is whether to use the pixel 54 adjacent in the X direction or the pixel 53 adjacent in the diagonal direction as the next line segment representation pixel. In other words, the distance in the X direction is X. It is necessary to determine whether to increase only the deviation by 1'' or to increase both the deviations X and Yo in the X and Y directions by 1.

この判定は、画素54の中心点54a(第16図)のY
座標と、線分り、上の対応する点56のY座標との差f
が、 f ≦ 1/2          ・・・(11)を
満足するならば画素54に進み、 f  >  1/2           ・・・(1
2)を満足するならば画素53へ進むという基準に従っ
て行なわれる。この基準は、次のように具体化される。
This determination is based on Y at the center point 54a of the pixel 54 (FIG. 16).
Difference f between the coordinates and the Y coordinate of the corresponding point 56 on the line segment
If f ≦ 1/2 ... (11) is satisfied, the process proceeds to pixel 54, and f > 1/2 ... (1
This is performed according to the criterion that if the condition 2) is satisfied, the process proceeds to pixel 53. This standard is specified as follows.

一般に、画素展開が斜め方向(つまりX座標とY座標と
が“1″ずつ増加する方向)に進めば、当該画素と線分
LJとの対応点とのそれぞれのY座標の差f。(第16
図では、画素52についての差foが描かれている。)
は、 (ΔY/ΔX)−1・・・(13) だけ変化する。また、画素展開がX方向に進めば、差f
0は、 (ΔY/ΔX)               ・・・
(14)だけ変化する。差f。の初期値は“0″である
Generally, when pixel expansion proceeds in a diagonal direction (that is, in a direction in which the X and Y coordinates increase by "1"), the difference f in the Y coordinates of the corresponding pixel and the corresponding point on the line segment LJ. (16th
In the figure, the difference fo for pixel 52 is depicted. )
changes by (ΔY/ΔX)-1...(13). Also, if the pixel expansion advances in the X direction, the difference f
0 is (ΔY/ΔX)...
(14) changes. Difference f. The initial value of is "0".

このため、判定パラメータeを、 e=ΔX−fo−ΔX / 2      ・(15)
によって定義すれば、この判定パラメータeの値は、(
−Δx/2)を初期値として、画素展開が斜め方向に進
むごとに(ΔY−ΔX)を累算するとともに、画素展開
がX方向に進むごとにΔYを累算することによって得る
ことができる。そして、画素52における差f。と画素
54における差fとが、 f=fo+(ΔY/ΔX)−(1G) の関係にあることから、(12)式の判定条件は、(1
5)、 (16)式を用いることにより、e 〉 −Δ
Y          ・・・(11)となる。つまり
、判定パラメータeと(−ΔY)との大小関係に基いて
、進むべき画素を決定すればよい。なお、回数値m、n
を用いれば、e=m(ΔY−ΔX)+nΔY−(ΔX/
2)・・・(18) と表現することもできる。
Therefore, the determination parameter e is set as: e=ΔX-fo-ΔX/2 (15)
If defined by, the value of this judgment parameter e is (
-Δx/2) as the initial value, it can be obtained by accumulating (ΔY - ΔX) each time the pixel expansion advances in the diagonal direction, and by accumulating ΔY each time the pixel expansion advances in the X direction. . and the difference f at pixel 52. Since the difference f at the pixel 54 and the relationship f = fo + (ΔY/ΔX) - (1G), the judgment condition for equation (12) is (1
5), by using equation (16), e 〉 −Δ
Y...(11). That is, the pixel to proceed to can be determined based on the magnitude relationship between the determination parameter e and (-ΔY). In addition, the number of times m, n
If we use e=m(ΔY−ΔX)+nΔY−(ΔX/
2)...(18) It can also be expressed as follows.

以上の原理が第17図に模式的に示されており、e〉−
ΔYならば斜め方向に、またe≦ΔYならばX方向に画
素展開を進める。
The above principle is schematically shown in FIG.
If ΔY, the pixel expansion proceeds in the diagonal direction, and if e≦ΔY, the pixel expansion proceeds in the X direction.

第13図の直線発生器300は、以上の画素展間原理に
従った動作を行なうように構成されている。動作開始時
点において、レジスタ302はX方向換粋距離ΔXの値
を取込み、(−ΔX/2)の値がその中にロードされる
。このレジスタ302の保持値が判定パラメータeの値
となっており、この判定パラメータeの値は符号判定回
路305に与えられる。符号判定回路305は、e〉−
八Yの場合にパルス信号Saを発生し、e≦−ΔYの場
合にパルス信号Sbを発生する。
The straight line generator 300 in FIG. 13 is configured to operate in accordance with the above pixel expansion principle. At the start of operation, register 302 takes the value of the X direction translation distance ΔX and the value of (−ΔX/2) is loaded into it. The value held in this register 302 is the value of the determination parameter e, and the value of this determination parameter e is given to the sign determination circuit 305. The sign determination circuit 305 performs e>−
A pulse signal Sa is generated when 8Y, and a pulse signal Sb is generated when e≦−ΔY.

これらのパルス信号S、Sbはセレクタ303のセレク
ト信号となっており、パルス信号S。
These pulse signals S and Sb serve as select signals for the selector 303;

が発生すると、セレクタ303は、一方の入力(ΔY−
ΔX)側に切換わる。また、パルス信号Sbが発生する
と、セレクタ303は他方の入力ΔY側に切換ねる。そ
して、セレクタ303によって選択された入力が加算器
304に与えられ、この加算器304において判定パラ
メータeの値と加算される。その加算結采はレジスタ3
02に与えられ、このレジスタ302に保持される。こ
のため、レジスタ302.加算器304およびセレクタ
303からなる回路は、判定パラメータeの値を(18
)式に従って計算する機能を有する。
occurs, the selector 303 selects one input (ΔY−
ΔX) side. Further, when the pulse signal Sb is generated, the selector 303 switches to the other input ΔY side. The input selected by the selector 303 is then given to an adder 304, where it is added to the value of the determination parameter e. The result of the addition is register 3
02 and held in this register 302. For this reason, register 302. A circuit consisting of an adder 304 and a selector 303 sets the value of the determination parameter e to (18
) has the function of calculating according to the formula.

パルス信号S、、S、は、X方向偏差X。を求めるため
の7ツプカウンタ306に与えられる。
The pulse signal S, ,S, has an X-direction deviation X. is given to a 7-p counter 306 for determining .

アップカウンタ306は、パルス信号S、Sbのいずれ
かが発生しても、′1”ずつインクリメントするように
なっている。それは、画素展開が1画素分進むごとに、
X方向偏差X。は必ず変化させるようにするためである
。これに対して、Y方向偏差を求めるためのアップカウ
ンタ307はパルス信号Saが発生したときのみに“1
″だけインクリメントする。これは、e〉−ΔYである
ことにより画素展開が斜め方向へと進行するときのみ、
Y方向偏差Y。を変化させるようにするためである。
The up counter 306 is configured to increment by '1' even if either the pulse signal S or Sb is generated.This is because each time the pixel expansion advances by one pixel,
X direction deviation X. This is to make sure that it changes. On the other hand, the up counter 307 for determining the Y direction deviation is set to "1" only when the pulse signal Sa is generated.
is incremented by ''. This is only when the pixel expansion progresses in the diagonal direction due to e〉−ΔY.
Y direction deviation Y. This is to change the

X方向偏差X およびY方向偏差Y。の値は、スワップ
回路308に与えられる。スワップ回路308は、線分
り、が第9図の部分平面Pし2゜PL、PL  または
PL7の中に存在するときに、部分平面PL1内で求め
られた線分表現画素のX座標とY座標とを交換すること
により、当該線分り、そのものに対応する線分表現画素
座標を得るために設けられている。すなわち、スワップ
回路308は、レジスタ313から得られるスワップモ
ードデータMSがO11であるときに、X方向偏差X 
とY方向偏差Y。との値を互いに交換する。スワップモ
ードデータMSが1″であるときにはこのような交換は
行なわない。したがって、スワップ回路308の出力で
あるX方向偏差dX  およびY方向偏差dY、は、d
X  =X  、dY、=Y。
X direction deviation X and Y direction deviation Y. The value of is provided to swap circuit 308. The swap circuit 308 converts the X and Y coordinates of the line segment expression pixel found in the partial plane PL1 when the line segment exists in the partial plane P2°PL, PL or PL7 in FIG. This is provided to obtain the line segment representation pixel coordinates corresponding to the line segment itself by exchanging the lines. That is, when the swap mode data MS obtained from the register 313 is O11, the swap circuit 308 adjusts the X direction deviation
and Y direction deviation Y. exchange values with each other. Such exchange is not performed when the swap mode data MS is 1''. Therefore, the X direction deviation dX and Y direction deviation dY, which are the outputs of the swap circuit 308, are d
X=X, dY,=Y.

C (MS=”1”のとき)   ・・・(19)dX  
=Y  、dY、=X。
C (when MS="1") ... (19) dX
=Y, dY, =X.

C (MS=“O”のとき)   ・・・(20)で与えら
れる。スワップ回路308における交換/非交換規則は
、第1表中に記載されている。
C (when MS="O") ... is given by (20). The swap/non-swap rules in swap circuit 308 are listed in Table 1.

第1表 スワップ回路308から出力された偏差(jX、。Table 1 The deviation (jX,.) output from the swap circuit 308.

dY、の値は、演算器309.310において、始点座
標X3.”Sの値とそれぞれ加算または減算される。こ
こで、加算/減算の切換は、第1表中のdX、、dY、
の列に示す規則に従ってX方向モードデータMXおよび
Y方向モードデータMYの値によって行なわれる。ただ
し、第1表中、「+」は加算を、またr−Jは減算をそ
れぞれ示す。このような加算/@算切換を行なうのは、
線分L が第9図中の部分平面PL1〜PL8のうちの
いずれに属するかによって、始点座標(xs。
The value of dY is determined by the starting point coordinates X3. ” is added or subtracted from the value of S. Here, addition/subtraction can be switched using dX, dY,
This is done using the values of the X-direction mode data MX and Y-direction mode data MY according to the rules shown in the column. However, in Table 1, "+" indicates addition, and r-J indicates subtraction. To perform such addition/@calculation switching,
The starting point coordinates (xs) depend on which of the partial planes PL1 to PL8 in FIG. 9 the line segment L belongs to.

y )からどの方向に線分り、が伸びるかが異なるため
である。たとえば部分平面PL3においては、X方向偏
差dX、をX方向始点座標XSから差引くことによって
線分表現画素のX座標が得られることになるため、(x
  −dX、)の演算がなされる。
This is because the direction in which the line segment extends from ) is different. For example, in the partial plane PL3, the X coordinate of the line segment representation pixel is obtained by subtracting the X direction deviation dX from the X direction starting point coordinate XS, so (x
-dX, ) is calculated.

このようにして演算器309.310から出力される主
走査座標値XPSおよびn1走査座標I Y psは、
既述したように第2図のセレクタ14に与えられ、その
後にメモリ15.16のアドレス信号として使用される
The main scanning coordinate value XPS and the n1 scanning coordinate I Y ps outputted from the computing units 309 and 310 in this way are as follows:
As described above, the signal is applied to the selector 14 in FIG. 2, and is then used as an address signal for the memories 15 and 16.

第13図の直線発生器300にはまた、塗り潰しフラグ
セット回路314が設けられている。この塗り潰しフラ
グセット回路314は、(1)  スワップモードデー
タMSが“1″であり、かつパルス信号Saが発生した
とき、(2)  スワップモードデータMSが“Onで
あり、かつパルス信号s8.Sbのいずれかが発生した
とき、 において、フラグセットパルスF、。1を発生する。
The straight line generator 300 of FIG. 13 is also provided with a fill flag set circuit 314. This filling flag set circuit 314 operates in such a way that (1) when swap mode data MS is "1" and pulse signal Sa is generated, (2) when swap mode data MS is "On" and pulse signal s8.Sb When any of the following occurs, a flag set pulse F, .1 is generated at .

このフラグセットパルスFsetは、第5図の塗り潰し
フラグ0N10FF回路112に与えられ、塗り潰し指
示フラグF8を発生する基礎として使用される。
This flag set pulse Fset is applied to the fill flag 0N10FF circuit 112 in FIG. 5, and is used as a basis for generating the fill instruction flag F8.

このうち、(1)の条件は線分し、とX軸とのなす角度
の絶対値が45°以下であるときには、副走査座標値Y
、。が変化したときのみ、塗り潰し指示フラグF8を立
てることを意味する。つまりこの実施例における線分展
開の場合には、同一の副走査座標Yを有する複数の線分
表現画素57a。
Among these, condition (1) is that when the absolute value of the angle between the line segment and the X axis is 45° or less, the sub-scanning coordinate value Y
,. This means that the filling instruction flag F8 is set only when . In other words, in the case of line segment expansion in this embodiment, a plurality of line segment expressing pixels 57a having the same sub-scanning coordinate Y.

57b(第18A図)が得られることがあるが、それら
の線分表現画素57a、57bのすべてに塗り潰し端点
指示フラグを立てていると、走査線lに沿った走査にお
いて、ひとつの線分り、が二重に「塗り潰し端点」であ
るとみなされてしまう。
57b (Fig. 18A) may be obtained, but if the fill end point indication flag is set for all of these line segment representation pixels 57a and 57b, one line segment, is considered to be a "filled end point" twice.

その結果、たとえば塗り潰し開始画素の次の画素で塗り
潰しが完了してしまい、所望の塗り潰し処理が行なわれ
ない。このため、ひとつ手前の画素59から副走査座標
が変化するような画素57aのみに塗り潰し指示フラグ
F8を立てるようにする。第18A図において、フラグ
を立てる画素は、斜線を付して示されている。
As a result, for example, filling is completed at the next pixel after the filling start pixel, and desired filling processing is not performed. For this reason, the fill instruction flag F8 is set only for the pixel 57a whose sub-scanning coordinates change from the pixel 59 immediately before. In FIG. 18A, flagged pixels are shown with diagonal lines.

また、上記(2)の条件は、第18B図に示すように、
線分LJとX軸とのなす角度の絶対値が45°以上であ
るときは、すべての線分表現画素58にフラグを立てる
ようにする。このような場合には、複数の線分表現画素
が互いに同一の副走査座標を持つことはないためである
Moreover, the condition (2) above is as shown in FIG. 18B.
When the absolute value of the angle between the line segment LJ and the X axis is 45° or more, a flag is set on all line segment expressing pixels 58. This is because in such a case, a plurality of line segment expressing pixels do not have the same sub-scanning coordinates.

以上の処理をソフト的に実行した場合のフローチャート
が第19A図および第198図に示されている。ただし
、第198図は第19A図中のステップ811に対応す
るルーチンである。
Flowcharts when the above processing is executed by software are shown in FIGS. 19A and 198. However, FIG. 198 is a routine corresponding to step 811 in FIG. 19A.

処理中の線分表現画素が線分1− Jの端点(つまり2
本の線分の接続点)に相当する画素でない場合には、第
5図の接続情報テーブル111からの出力信号G1の値
にかかわらず、塗り潰しフラグ0N10FF回路112
は、フラグセットパルスF、。1に基いCvJ作する。
The line segment expression pixel being processed is the end point of line segment 1-J (that is, 2
If the pixel does not correspond to the connection point of the book line segment), the fill flag 0N10FF circuit 112
is the flag set pulse F. Create CvJ based on 1.

そして、この状態においては、塗り潰しフラグセットパ
ルスF、。1が与えられると、塗り泊しフラグ0N10
FF回路112の出力信号F1はH”となる。また、処
理中の線分表現画素が線分しJの終点でないときには、
OR’7’−ト111出力信号G3も’H”l’ある(
その理由は後述)。
In this state, the fill flag set pulse F. If 1 is given, overfill flag 0N10
The output signal F1 of the FF circuit 112 becomes H''.Furthermore, when the line segment expressing pixel being processed is not the end point of the line segment J,
OR'7'-to111 output signal G3 is also 'H'l' (
The reason will be explained later).

したがって、処理中の線分表現画素が線分し。Therefore, the line segment representation pixel being processed is a line segment.

上の中間点(つまり[Q以外の点)に対応する画素であ
るならば、塗り潰しフラグセットパルスF、。1が与え
られた場合に塗り潰し指示フラグFSは“1″となる1
、このため、第20図に示す輪郭線(多角形)C8の処
理を行なった場合においては、黒丸で示した線分表現画
素のうち、Y座標が変化する画素(四角形で示している
。)において塗り潰し指示フラグF8 (F)が“1″
とされる。線分111〜L16の接続点C11〜016
の取扱いについては、以下で説明する。
If the pixel corresponds to the upper intermediate point (that is, a point other than [Q), fill flag set pulse F,. If 1 is given, the fill instruction flag FS becomes “1”.
, Therefore, when processing the contour line (polygon) C8 shown in FIG. 20, among the line segment representation pixels shown by black circles, the pixels whose Y coordinates change (shown by squares). The fill instruction flag F8 (F) is “1” in
It is said that Connection points C11-016 of line segments 111-L16
The handling of is explained below.

線分の接続点に対して塗り潰し指示フラグを付与するか
どうかは、画面23a上の走査方向と、その接続点で相
互に接続されている2本の線分の方向との関係に基いて
決定される。すなわち、第21図に示すように、互いに
接続された第1と第2の線分L  、L  の線分方向
識別データIDJI   J2 (第11図参照)が、“0″〜li 311のいずれで
あるかによって、当該接続点に対応する画素に塗り潰し
指示フラグF、を付与するかどうかを決定する。ただし
、第21図において、四角中はF。
Whether or not to assign a fill instruction flag to a connection point of a line segment is determined based on the relationship between the scanning direction on the screen 23a and the direction of two line segments that are mutually connected at that connection point. be done. That is, as shown in FIG. 21, the line segment direction identification data IDJI J2 (see FIG. 11) of the first and second line segments L and L connected to each other is any one of "0" to li 311. Depending on whether there is a connection point, it is determined whether to give a fill instruction flag F to the pixel corresponding to the connection point. However, in Figure 21, the inside square is F.

−″1″となる画素を示す。- Indicates a pixel that is "1".

第21図に示された規則はまた、第2表にも示されてい
る。ただし、第2表中のrlDlJ。
The rules shown in FIG. 21 are also shown in Table 2. However, rlDlJ in Table 2.

rlD2jは線分L  、L  の線分方向識別デーJ
I   J2 夕をそれぞれ示している。
rlD2j is line segment direction identification data J of line segments L and L.
I J2 Shows the evening.

第2表 このような規則を適用することによって、たとえば第2
2図の輪郭線Cbに対しては、四角中が付された接続点
についての塗り潰し指示フラグF3のみが“1″とされ
る。したがって、たとえば走査線lに沿って塗り潰しを
行なうときには、接続点C21においてて塗り潰しが開
始され、接続点C24において塗り潰しが完了する。仮
に接続点022.C23の塗り潰しフラグF、も“1″
としていたならば、接続点C22で塗り潰しがいったん
完了し、接続点C23から新たな塗り潰しが開始されて
しまうであろう。このため、第21図(第2表)の規則
に従って接続点におけるフラグの値を決めることは、塗
り潰し処理の正確性を確保する上で有用な技術となって
いる。
Table 2 By applying such rules, e.g.
For the contour line Cb in FIG. 2, only the filling instruction flag F3 for the connection point marked with a square is set to "1". Therefore, for example, when filling in along the scanning line l, filling starts at the connection point C21 and ends at the connection point C24. If connection point 022. The fill flag F of C23 is also “1”
If it were, the filling would be completed once at the connection point C22, and a new filling would be started from the connection point C23. Therefore, determining the value of the flag at the connection point according to the rules shown in FIG. 21 (Table 2) is a useful technique for ensuring the accuracy of the filling process.

ところで、当然ながら、接続点は2つの線分L  、L
  の双方に属する点である。このため、JI   J
2 接続点に対するフラグの付与を双方の線分り、1゜L 
、2g1lから行なうと、フラグ付与処理が重複してし
まう。このため、この実施例では、当該接続点を始点と
する線分’J2側からのみフラグ付与の判定を行なう。
By the way, naturally, the connection point is the two line segments L and L
This is a point that belongs to both. For this reason, JI J
2 Add a flag to the connection point by dividing both lines, 1°L
, 2g1l, the flag assignment process will be duplicated. Therefore, in this embodiment, flag assignment is determined only from the line segment 'J2 side starting from the connection point.

たとえば第20図の接続点C15においては、線分し1
5の画素展開を行なう際に、この接続点C15について
のフラグの付与判断を行なう。ただし、第20図の輪郭
線C8において線分L11から左まわりに線分情報を入
力する場合には、線分L11が入力された時点ではまだ
線分116の情報は入力されていない。このため、接続
点C11(つまり最後に形成される接続点)については
、最後の線分L16の画素展開を行なう際にフラグの値
の付与を行なう。
For example, at the connection point C15 in FIG.
When performing pixel expansion of C15, it is determined whether to flag this connection point C15. However, when inputting line segment information counterclockwise from line segment L11 on outline C8 in FIG. 20, information on line segment 116 has not yet been input at the time when line segment L11 is input. Therefore, for the connection point C11 (that is, the last connection point formed), a flag value is assigned when performing pixel expansion of the last line segment L16.

このような接続点の処理を行なうために、第5図の前処
理回路200から出力される線分方向識別データIDは
、2つのラッチ回路ios、i。
In order to process such connection points, the line segment direction identification data ID output from the preprocessing circuit 200 in FIG. 5 is processed by two latch circuits ios and i.

9に与えられている。レジスタ103から輪郭線スター
トパルスVsが与えられることによって、第20図の最
初の線分L11についての線分方向識別データIDがラ
ッチ回路108にラッチされる。このラッチ回路108
にラッチされている線分方向識別データ10を、以下r
FIDJと呼、玉。
It is given to 9. By applying the contour start pulse Vs from the register 103, the line segment direction identification data ID for the first line segment L11 in FIG. 20 is latched into the latch circuit 108. This latch circuit 108
The line segment direction identification data 10 latched in is expressed as r
It's called FIDJ and it's a ball.

ラッチ回路109は、新たな線分の処理が開始されるご
とに、入力された線分方向識別データIDの値をラッチ
する。また、このラッチ回路109にラッチされている
線分方向識別データ10の値は、新たな線分の処理が開
始されるごとに次段のラッチ回路110でラッチされる
。このため、新たな線分の処理が開始されるごとに、各
線分についての線分方向識別データ■Dの値が、ラッチ
回路109からラッチ回′18110へと転送されるこ
とになる。このため、任意の時刻においては、その時刻
で処理を行なっている線分(たとえば第20図の線分L
15)の線分方向識別データID(102)と、その直
前に処理を行なった線分L14の線分方向識別データI
D(IDI)とが、ラッチ回路110,109からそれ
ぞれ出力されでいる。
The latch circuit 109 latches the value of the input line segment direction identification data ID every time processing of a new line segment is started. Further, the value of the line segment direction identification data 10 latched in this latch circuit 109 is latched in the next stage latch circuit 110 every time the processing of a new line segment is started. Therefore, each time processing of a new line segment is started, the value of the line segment direction identification data D for each line segment is transferred from the latch circuit 109 to the latch circuit '18110. Therefore, at any given time, the line segment being processed at that time (for example, the line segment L in FIG.
15) line segment direction identification data ID (102) and the line segment direction identification data I of the line segment L14 that was processed immediately before
D(IDI) are output from the latch circuits 110 and 109, respectively.

接続情報テーブルメモリー11には、第2表の規則がル
ックアップテーブル形式であらかじめストアされている
。そして、データID1.ID2の値に応じて、フラグ
F の値を信号G1として出力する。塗り潰しフラグ0
N10FF回路112では、各線分の始点に対応する画
素が発生されたときには、信号G1によってセット/リ
セットされ、その保持内容をその出力信号F1とするよ
うに構成されている。発生された画素が始点に対応する
ものであるかどうかは、各線分の画素展開において最初
に発生された画素であるがどうかを判定することによっ
て知ることができる。
The rules in Table 2 are stored in advance in the connection information table memory 11 in the form of a lookup table. Then, data ID1. Depending on the value of ID2, the value of flag F is output as signal G1. Fill flag 0
The N10FF circuit 112 is configured so that when a pixel corresponding to the starting point of each line segment is generated, it is set/reset by the signal G1, and the held content is set as the output signal F1. Whether the generated pixel corresponds to the starting point can be determined by determining whether it is the first pixel generated in pixel expansion of each line segment.

また、最後の線分116についての処理において、この
線分116の終点に対応する画素が発生されると、接続
情報テーブルメモリ111は、データIDI、ID2の
かわりに、データID2(Era)、FIDをそれぞれ
取込み、第2表のテーブルを参照することによって、こ
れらのデータID2.FIDの値に応じたフラグF8を
信号G1として発生する。このときは、データ101(
PID)は使用されない。
Furthermore, in the processing for the last line segment 116, when a pixel corresponding to the end point of this line segment 116 is generated, the connection information table memory 111 stores data ID2 (Era), FID, instead of data IDI, ID2. These data ID2. are imported by referring to Table 2. A flag F8 corresponding to the value of FID is generated as a signal G1. At this time, data 101 (
PID) is not used.

この処理において、最後の線分L16であることは輪郭
線エンドパルスVEの入力によって知ることができる。
In this process, it can be determined that the last line segment L16 is the last line segment L16 by inputting the contour end pulse VE.

また、終点に対応する画素であることは、第13図のデ
クリメントカウンタ301から出力される処理完了信号
SE1を参照することによって知ることができる。この
ため、第20図の接続点C11についてのフラグ付与判
断は、輪郭線Ca全体の画素展開の最後に実行されるこ
とになる。
Further, whether the pixel corresponds to the end point can be determined by referring to the processing completion signal SE1 output from the decrement counter 301 in FIG. 13. Therefore, the flag assignment determination regarding the connection point C11 in FIG. 20 is executed at the end of pixel expansion of the entire contour line Ca.

一方、直線発生器300から出力される主走査座標XP
Sおよび副走査座標Y、8は、バッファ回路113.1
14にバッファされた後に、第2図のセレクタ14に与
えられている。また、副走査座標YPsは、第5図の比
較器115にも与えられている。比較器115では、こ
の副走査座標Y、8と、当該線分の終点の副走査座標y
、とを比較し、それらが一致したときに゛′シ″となる
信号G2を出力する。この信号G2は、輪郭線エンドパ
ルスV、とともにORゲート116に与えられ、ORゲ
ート116の出力がANDゲート117に与えられてい
る。このため、ANDゲート117の出力であるフラグ
F3は、次のような値を持つことになる。
On the other hand, the main scanning coordinate XP output from the straight line generator 300
S and the sub-scanning coordinate Y, 8 are the buffer circuit 113.1
14 and then provided to the selector 14 in FIG. The sub-scanning coordinate YPs is also given to the comparator 115 in FIG. The comparator 115 calculates this sub-scanning coordinate Y,8 and the sub-scanning coordinate y of the end point of the line segment.
, and when they match, it outputs a signal G2 which becomes "y". This signal G2 is given to the OR gate 116 together with the contour end pulse V, and the output of the OR gate 116 is ANDed. The flag F3, which is the output of the AND gate 117, has the following value.

(1)  中間点についての画素座標が発生したとき:
塗り潰しセットパルスFsetに応じた値。
(1) When pixel coordinates for an intermediate point are generated:
Value according to fill set pulse Fset.

(2)  各線分(最初の線分を除く。)の始点につい
ての画素座標が発生したとき:接続情報テーブルメモリ
111の出力信号G1によって指示される値。
(2) When the pixel coordinates for the starting point of each line segment (excluding the first line segment) are generated: the value indicated by the output signal G1 of the connection information table memory 111.

(3)  各線分の終点のY座標と等しい画素座標が発
生したとき(このとき、比較器115の出力信号G2は
L″となる。):ANDゲート117のORゲート11
6側の入力が′L”となるため、(たとえば、第20図
の接続点C11の左側に存在する黒丸ではフラグF3が
′1″になるべきだが、)フラグF8は0″。
(3) When a pixel coordinate equal to the Y coordinate of the end point of each line segment occurs (at this time, the output signal G2 of the comparator 115 becomes L''): OR gate 11 of AND gate 117
Since the input on the 6 side is 'L', the flag F8 is 0'' (for example, although the flag F3 should be '1' in the black circle on the left side of the connection point C11 in FIG. 20).

(4)  最後の線分の終点に応じた画素座標が発生し
たとぎ(このとき、輪郭線エンドパルスV[が“H″と
なり、信号S〔1が′H″となることによって、AND
ゲート118を介してANDゲート117の一方の入力
G3は” H”となる。):接続点情報テーブルメモリ
111の出力G1゜(B−4)多角形に対する処理のま
とめ以上のようにして、第2図の多角形処理回路12か
らは、線分表現画素の座標XPS、YPSと、その画素
に付与すべきフラグF8の値とが、画素単位で順次出力
される。各線分表現画素に対してフラグF8を立てるか
どうかは、画面23a上における走査線と、画素表現さ
れた輪郭線との交差関係に基いて決定されている。スイ
ッチング信号SWにより選択によって、セレクタ14は
、これらの座標X  、Y  およびフラグF8を、座
標ps    ps x、、y、およびフラグFとして出力する。以後の処理
は既に説明した通りである。
(4) When the pixel coordinates corresponding to the end point of the last line segment are generated (at this time, the contour end pulse V[ becomes "H" and the signal S[1 becomes 'H'), and the AND
One input G3 of the AND gate 117 becomes "H" via the gate 118. ): Output G1° (B-4) of the connection point information table memory 111 Summary of processing for polygons As described above, the polygon processing circuit 12 in FIG. and the value of flag F8 to be given to that pixel are sequentially output pixel by pixel. Whether or not to set the flag F8 for each line segment representation pixel is determined based on the intersecting relationship between the scanning line on the screen 23a and the pixel-represented contour line. Depending on the selection by the switching signal SW, the selector 14 outputs these coordinates X, Y and flag F8 as coordinates ps ps x, y and flag F. The subsequent processing is as already explained.

このため、第20図の輪郭線Caに対しては、第23図
中に矢印で示した塗り潰し走査l  にCAM よって、その内部領域がフレームメモリ15上で塗り潰
される。この塗り潰しを受けた画像がCRTデイスプレ
ィ23の画面23a上において走査線順次に表示される
Therefore, for the contour line Ca in FIG. 20, its internal area is filled out on the frame memory 15 by the filling scan l shown by the arrow in FIG. The filled-in image is displayed on the screen 23a of the CRT display 23 in scanning line sequential order.

00円処理回路13の詳細 一方、第2図の円処理回路13は、円によって表現され
た輪郭線の内部領域または外部領域を塗り潰す際に使用
される。円処理回路13は、(月 輪郭線を画素展開す
ること、 (2)  画素展開と並行して、塗り潰し指示フラグF
Cを発生すること、 の2つの基本的機能において、多角形処理関係12と共
通である。
Details of the 00 yen processing circuit 13 On the other hand, the circle processing circuit 13 shown in FIG. 2 is used to fill in the inner region or the outer region of the contour line expressed by a circle. The circle processing circuit 13 executes ((2) pixel development of the contour line, (2) In parallel with the pixel development, fill-in instruction flag F.
It is common to polygon processing relation 12 in two basic functions: generating C.

しかしながら、この円処理回路13では、(1)  輪
郭線の位置および形状を指定するデータとして、円の中
心点の座標値およびこの円の半径の値が入力装置11か
ら入力されること、(2)  多角形の場合のような線
分の接続点が存在しないこと、 という点において、多角形を輪郭線とする図形と異なっ
た条件で処理を行なう。
However, in this circle processing circuit 13, (1) the coordinate value of the center point of the circle and the value of the radius of this circle are input from the input device 11 as data specifying the position and shape of the contour line; ) Processing is performed under different conditions than for figures whose outlines are polygons in that there are no connection points between line segments as in the case of polygons.

多角形の場合におけるプレセンハムのアルゴリズムに対
応して、円処理回路12においては、Horn、B、に
、P、;”C1rcle Generator for
 0isplay DQvices”、Comput、
 Graphics Image Processin
g、5・280.1976 で開示されているアルゴリズム(以下[ホーン(Hor
n)のアルゴリズムJと言う。)を利用する。
Corresponding to Presenham's algorithm in the case of polygons, in the circle processing circuit 12, Horn,B,P,;"C1rcle Generator for
0isplay DQvices", Compute,
Graphics Image Processin
G, 5.280.1976 (hereinafter referred to as [Hor
n) is called algorithm J. ).

このアルゴリズムも、DDA用のアルゴリズムの一種で
ある。
This algorithm is also a type of algorithm for DDA.

ホーンのアルゴリズムは、かなりの部分においてプレセ
ンハムのアルゴリズムに類似している。
Horn's algorithm is similar to Presenham's algorithm to a large extent.

すなわち、第24図に示す円C3が輪郭線として与えら
れたとき、この円CJを、8つの部分平面PL  〜P
L8にそれぞれ属する8つの部分(円弧)B  −88
に分割する。そして、X軸から0°〜(+45°)の範
囲の部分平面PL1に属する円弧B の画素展開を行な
う。他の円弧B2〜B8の画素展開は、円弧B1の画素
展開の座標符号の反転および/またはX軸とY軸の交換
によって実行する。X方向モードデータMX、Y方向モ
ードデータMYおよびスワップモードデータMSを第9
図のように定義して使用することも、多角形処理の場合
と同様である。
That is, when the circle C3 shown in FIG. 24 is given as an outline, this circle CJ is divided into eight partial planes PL to P
Eight parts (arcs) B-88, each belonging to L8
Divide into. Then, the pixel expansion of the arc B belonging to the partial plane PL1 in the range of 0° to (+45°) from the X axis is performed. The pixel expansion of the other arcs B2 to B8 is performed by reversing the coordinate sign of the pixel expansion of the arc B1 and/or exchanging the X and Y axes. The X direction mode data MX, Y direction mode data MY and swap mode data MS are
Defining and using it as shown in the figure is the same as in polygon processing.

円弧B1上の任意の点における接線E1とX軸とのなす
角度φは、45°≦φ≦90”の範囲内にある。このた
め、円弧B1を展開して得られる第25図の画素(円弧
表現画素)71の連鎖においては、Y座標を順次“1”
ずつ変化させることができる。円弧表現画素71のX座
標の変化は“OF+または1”である。この事情は、多
角形処理の場合とは逆になっている。円処理の場合にお
ける判定パラメータeは、次のような原理に従って定め
られる。
The angle φ between the tangent E1 and the X-axis at any point on the arc B1 is within the range of 45°≦φ≦90''. Therefore, the pixels in FIG. 25 obtained by expanding the arc B1 ( In the chain of circular arc expression pixels) 71, the Y coordinate is sequentially set to “1”.
It can be changed step by step. The change in the X coordinate of the arc expressing pixel 71 is "OF+ or 1". This situation is opposite to the case of polygon processing. The determination parameter e in the case of circle processing is determined according to the following principle.

判定パラメータeは、第26A図の画素72まで画素展
間が完了している時点において、次の円弧表現画素とし
て画素73.74のうちのいずれを採用すべきかを判断
できるように定義しなければならない。そこでまず、円
の中心点(X、。
The determination parameter e must be defined so that it can be determined which of pixels 73 and 74 should be adopted as the next arc expressing pixel at the time when pixel expansion is completed up to pixel 72 in FIG. 26A. It won't happen. So, first of all, the center point of the circle (X,

yJ)を原点としたときの画素72の中心点72aの座
標を、線分の場合と同様に(X、Yo)によって表現す
る。このとき、X座標およびY座標の双方が変化してい
る画素73の中心点73aは、座標: (X、−1,Y、+1 ) で表現される。また、Y座標のみが変化している画素7
4の中心点74aは、座標: (Xo、Yo+1 ) で表現される。このため、点(X、/)からJ 点73aまでの距離Rと、点(x、y、)かJ ら点74aまでの距離R3とは、それぞれ次のように表
現できる。
The coordinates of the center point 72a of the pixel 72 when yJ) is the origin are expressed by (X, Yo) as in the case of a line segment. At this time, the center point 73a of the pixel 73 whose both the X and Y coordinates are changing is expressed by the following coordinates: (X, -1, Y, +1). Also, pixel 7 where only the Y coordinate changes
The center point 74a of 4 is expressed by the coordinates: (Xo, Yo+1). Therefore, the distance R from the point (X, /) to the J point 73a and the distance R3 from the point (x, y,) to the J point 74a can be expressed as follows.

R2’=(X  −1)  +(Yo+1)・・・(2
1) R32c”+(Y  +1)   ・(22)−X  
    。
R2'=(X -1) +(Yo+1)...(2
1) R32c"+(Y +1) ・(22)-X
.

また、点(X、V、)から点72aまでの距離R1は、 R1′o2゜0.(23) =X     +Y で表わされる。Moreover, the distance R1 from the point (X, V,) to the point 72a is R1′o2゜0. (23) =X +Y It is expressed as

このため、画素72から画素73へと進んだ場合の、点
(XJ 、 y、1 )からの距離の二乗の変化分ΔR
2′と、画素74へ進んだ場合の変化分ΔR3とは、(
24)、 (251式によってそれぞれ表現される。
Therefore, when proceeding from pixel 72 to pixel 73, the change in the square of the distance from the point (XJ, y, 1) ΔR
2' and the change ΔR3 when proceeding to pixel 74 are (
24), (251), respectively.

ΔR=R2” −R1 =(2Y  +11(2Xo−1) ・・・(24) ΔR=R−R1 −2Yo+ 1        −(25)このため、
点(x、y、1)と円弧表現画素との距離の二乗は、画
素展開が斜め方向に進むことに、 (2Y  +1)−(2X  −1)   ・・・(2
6)C ずつ、また、画素展開がY方向に進むごとに、(2Yo
+1 )            −C2Dずつ変化す
る。
ΔR=R2" - R1 = (2Y +11 (2Xo-1) ... (24) ΔR=R-R1 -2Yo+ 1 - (25) Therefore,
The square of the distance between the point (x, y, 1) and the arc representation pixel is (2Y +1) - (2X -1) ... (2
6)C, and each time the pixel expansion advances in the Y direction, (2Yo
+1) -C2D changes.

言うまでもなく、円弧B、上の任意の点と中心点(x、
y、1)との距離の二乗は一定値R1である。したがっ
て、(26)、 (27)式の値の累積によって得られ
る累積値eAは、円弧表現画素が円弧B1からどの程度
離れているかを示す誤差となっている。
Needless to say, if any point on the arc B and the center point (x,
The square of the distance to y, 1) is a constant value R1. Therefore, the cumulative value eA obtained by accumulating the values of equations (26) and (27) is an error that indicates how far the arc expressing pixel is from the arc B1.

第26A図の画素72においてこの累積値eAの値がe
Aoであったとする。すると、画素74へ進んだ場合に
は、累積r1e Aは、(27)式によって、e  =
eA1=eAo十 (2Yc +i)   −(28)
へと変化する(第26B図参照)。
At pixel 72 in FIG. 26A, the value of this cumulative value eA is e
Suppose that it is Ao. Then, when proceeding to pixel 74, the cumulative r1e A is calculated as e =
eA1=eAo ten (2Yc +i) −(28)
(See Figure 26B).

一方、画素74で生じる誤差((27)式)と、画素7
3で生じる誤差((2B)式)との差0は、Q = 2
 Xo−1・(29) である。このため、第268図かられかるように、もし
、 e  A1   <    Q/2         
            −(30)であれば、画素7
4の方が円弧B1に近く、e^1 ≧ G/2    
      ・・・(31)であれば、画素73の方が
円弧B1に近い(等号は、便宜的に(31)式に入れで
ある)。このため、(30)式の条件が満足される場合
には画素74に進み、(31)式の条件が満足される場
合には画素73へと進めばよいことがわかる。なお、(
29)式を(31)式に代入すると、 eAl ≧ Xo−(1/2)        ・・・
(32)となるが、座標値が整数値のみをとり得ること
を考えると、(32)式は、 eAl ≧ Xc           、、・(33
)となる。したがって、(26)式と(27)式との累
積値eAによって判定パラメータeの値を定義し、この
判定パラメータeに(2Yo+1)の値を加えて得られ
るパラメータeA1の値とその時点におけるX方向偏差
X。との大小関係から、次に進むべき画素を決定すれば
よいことになる。
On the other hand, the error occurring at pixel 74 (formula (27)) and
The difference from the error caused by 3 (formula (2B)) of 0 is Q = 2
Xo-1.(29). Therefore, as seen from Figure 268, if e A1 < Q/2
-(30), then pixel 7
4 is closer to arc B1, e^1 ≧ G/2
... (31), the pixel 73 is closer to the arc B1 (the equal sign is included in equation (31) for convenience). Therefore, it can be seen that if the condition of equation (30) is satisfied, the process should proceed to pixel 74, and if the condition of equation (31) is satisfied, the process should proceed to pixel 73. In addition,(
Substituting equation 29) into equation (31), eAl ≧ Xo-(1/2)...
(32), but considering that the coordinate values can only take integer values, equation (32) becomes eAl ≧ Xc , ・(33
). Therefore, the value of the judgment parameter e is defined by the cumulative value eA of equations (26) and (27), and the value of the parameter eA1 obtained by adding the value of (2Yo+1) to this judgment parameter e and the value of the parameter eA1 at that time Directional deviation X. The pixel to proceed to next can be determined based on the magnitude relationship between the two pixels.

第27図は以上の原理に対応して形成された円処理回路
13のブロック図であり、第28図は円処理をソフト的
に行なう場合のフローチャートである。第27図の円処
理回路13では、まず、円C4の半径R,がレジスタ4
02を介してダウンカウンタ405にロードされる。ま
た、20″がアップカウンタ406にロードされる。こ
れらのカウンタ405,406は、X方向偏差X。およ
びY方向偏差Y。の値を保持するためのものであり、第
25図の画素75に対応して、偏差X。。
FIG. 27 is a block diagram of the circle processing circuit 13 formed in accordance with the above principle, and FIG. 28 is a flow chart when circle processing is performed by software. In the circle processing circuit 13 of FIG. 27, first, the radius R of the circle C4 is set in the register 4.
02 to the down counter 405. Also, 20'' is loaded into the up counter 406. These counters 405 and 406 are for holding the values of the X direction deviation X and the Y direction deviation Y. Correspondingly, the deviation is X.

Y の初期値がそれぞれ“R″、“OnとされCJ るのである。The initial values of Y are “R” and “On” respectively, and CJ It is.

一方、判定パラメータeの値を保持するレジスタ404
には、その初期値として“0″が与えられる。すなわち
、画素75においては誤差eAの値は“0″であるため
、判定パラメータeの初期値は“OHとしておく。
On the other hand, a register 404 that holds the value of the determination parameter e
is given "0" as its initial value. That is, since the value of the error eA in the pixel 75 is "0", the initial value of the determination parameter e is set to "OH".

Y方向偏差Y。の値は乗算器408に与えられ、ここで
定数設定器410からの定数値“2″と掛合わされる。
Y direction deviation Y. The value is provided to multiplier 408, where it is multiplied by a constant value “2” from constant setter 410.

その結果として得られた値には、加算器409において
、定数設定器407からの定数値“1″が加算される。
Adder 409 adds a constant value "1" from constant setter 407 to the resulting value.

したがって加算器412の一方の入力は(2Yo+1)
となる。この加算器412の他方の入力としては、判定
パラメータeの値が与えられている。このため、加算器
412の出力は(28)式で定義されるパラメータeA
1の値を持つ。
Therefore, one input of adder 412 is (2Yo+1)
becomes. The other input of this adder 412 is given the value of the determination parameter e. Therefore, the output of the adder 412 is the parameter eA defined by equation (28).
It has a value of 1.

パラメータeA1の値は、判定回路403に与えられる
。この判定回路403は、パラメータeA1とのX方向
偏差X。との大小関係を判定するものであり、e^1≧
XcであるときにはパルスS。を発生する。また、e^
1〈xoの場合にはパルスS、を発生する。
The value of parameter eA1 is given to determination circuit 403. This determination circuit 403 determines the deviation X in the X direction from the parameter eA1. It is used to determine the magnitude relationship between e^1≧
When Xc, pulse S. occurs. Also, e^
1. If xo, a pulse S is generated.

これらのパルスS、Sdのうち、パルスS。Among these pulses S and Sd, pulse S.

はセレクタ416にセレクト信号として与えられる。セ
レクタ416の一方の入力としては“0″が、また他方
の入力としてはデータ値(2Xo−1)がそれぞれ与え
られている。これらのうち、データ値(2Xo−1>は
、乗算器411.定数設定器410.414および減算
器415を用いて作成されている。
is given to selector 416 as a select signal. "0" is given to one input of the selector 416, and the data value (2Xo-1) is given to the other input. Of these, the data value (2Xo-1>) is created using a multiplier 411, a constant setter 410, 414, and a subtracter 415.

eA1≧XcであることによってパルスScが発生した
ときには、セレクタ416は、データ値<2Xo−1)
を減算器417に出力する。この減算器417の他方の
入力としては、パラメータeA1が与えられている。こ
のため、画素展開を斜め方向に進めるべきときには、パ
ラメータ”AIからデータ値(2Xo−1)が差し引か
れ、それによって、更新された判定パラメータeが生成
される。パルスSCが発生しないときには、セレクタ4
16は“0″を減算器417に出力する。このため、画
素展開をY方向に進めるべきときには、パラメータeA
1の値自身によって、更新された判定パラメータeが定
義される。更新された判定パラメータeの値は、レジス
タ404に与えられる。
When the pulse Sc is generated due to eA1≧Xc, the selector 416 selects the data value <2Xo−1).
is output to the subtracter 417. The other input of this subtracter 417 is given the parameter eA1. Therefore, when pixel expansion should proceed diagonally, the data value (2Xo-1) is subtracted from the parameter "AI," thereby generating an updated determination parameter e. When the pulse SC does not occur, the selector 4
16 outputs "0" to the subtracter 417. Therefore, when pixel expansion should proceed in the Y direction, the parameter eA
The value of 1 itself defines the updated determination parameter e. The updated value of the determination parameter e is given to the register 404.

したがって、このような構成により、(26)、 (2
7)式の値の累算動作と・、(28)、 (33)式に
よる判定動作とが実現される。
Therefore, with this configuration, (26), (2
7) The operation of accumulating the value of the expression and the judgment operation using the expressions (28) and (33) are realized.

一方、パルスS 、8 はアップカウンタ40c  ′
d 6に与えられ、これらのいずれが発生しても、アップカ
ウンタ406のカウント値としてのY方向偏差Y。の値
は“1″だけインクリメントする。
On the other hand, the pulse S,8 is output by the up counter 40c'
d 6, and the Y direction deviation Y as the count value of the up counter 406, no matter which of these occurs. The value of is incremented by "1".

また、パルスScが与えられたときにはダウンカウンタ
405は1″だけデクリメントし、それによってX方向
偏差X。の値は1”だけ減少する。これによって、eA
1≧Xcのときには画素展開が斜め方向に進み、eAl
〈Xcのときには画素展開がY方向に進むことになる。
Further, when the pulse Sc is applied, the down counter 405 decrements by 1'', thereby decreasing the value of the X direction deviation X. by 1''. By this, eA
When 1≧Xc, pixel expansion progresses diagonally and eAl
<When Xc, pixel expansion proceeds in the Y direction.

カウンタ419は、′111”を初期値とし、図示しな
いクロック信号が与えられることに1″ずつデクリメン
トする3ビツトカウンタである。
The counter 419 is a 3-bit counter that has an initial value of ``111'' and decrements by 1'' when a clock signal (not shown) is applied.

このクロック信号は、判定パラメータeの値の更新サイ
クルの1/8の周期で発生する。そして、そのカウント
値S。の各ビットが、レジスタ421.422,423
にそれぞれ与えられる。レジスタ421,422.42
3の保持値が、X方向モードデータMX、Y方向モード
データMYおよびスワップモードデータMSの値にそれ
ぞれ対応する。このため、モードデータの組(MX、M
Y。
This clock signal is generated at a cycle of ⅛ of the update cycle of the value of the determination parameter e. And the count value S. Each bit of register 421, 422, 423
are given to each. Registers 421, 422.42
The held value 3 corresponds to the values of the X-direction mode data MX, Y-direction mode data MY, and swap mode data MS, respectively. Therefore, a set of mode data (MX, M
Y.

MS)は偏差X。、Yoの値の変化サイクルのそれぞれ
において、 (111)、(110)、・、(000)・・・(34
) の8通りの値をとる。
MS) is the deviation X. , Yo, (111), (110),..., (000)...(34)
) takes eight values.

スワップ回路424および演算器425.426は、第
13図のスワップ回路308および演算器309.31
0と同様の機能を有する。ただし、演算器425.42
6の基準入力としては、円Cの中心点の座標(x、y、
1)が与えられてJ                
 Jいる。このため、演算器425,426からは、円
弧表現画素のX方向座標値X、。およびY方向座標値Y
、。が出力される。
The swap circuit 424 and the arithmetic units 425 and 426 are the same as the swap circuit 308 and the arithmetic units 309 and 31 in FIG.
It has the same function as 0. However, arithmetic unit 425.42
6, the coordinates of the center point of circle C (x, y,
1) given J
There is J. Therefore, the arithmetic units 425 and 426 output the X-direction coordinate value X of the arc-expressing pixel. and Y direction coordinate value Y
,. is output.

偏差X  、Y  が更新されるまでの間に、モーC ドデータの組(MX、MY、MS)が(34)式のそれ
ぞれの値を一巡することにより、たとえば第29図の画
素81〜88の座標値が連続して発生する。他の円弧表
現画素も同様に、各部分平面PL1〜PL8のそれぞれ
においてひとつずつ、合計8個の画素の座標値が1組と
なって発生する。
Until the deviations Coordinate values occur consecutively. Similarly, for the other arc-expressing pixels, one set of coordinate values for a total of eight pixels is generated, one for each of the partial planes PL1 to PL8.

スワップモードデータMSとパルスS。とは第27図の
塗り潰しフラグ0N10FF回路427に与えられてい
る。スワップモードデータMSが“1”であり、それに
よって画素が部分平面P l−1、PL  、PLr、
またはPL8に存在することが指示されたときには、パ
ルスSCが発生したかどうかにかかわらず、塗り潰しフ
ラグ0N10FF回路427からの出力である塗り潰し
指示フラグF。が“1″となる。それは、部分平面PL
1゜PL、PL  およびPL8内の画素展開では、必
ず、Y座標が変化するためである。
Swap mode data MS and pulse S. is given to the fill flag 0N10FF circuit 427 in FIG. Swap mode data MS is “1”, so that pixels are moved to partial planes P l-1, PL, PLr,
Alternatively, when the existence of the fill instruction flag F is specified in PL8, the fill instruction flag F is output from the fill flag 0N10FF circuit 427, regardless of whether the pulse SC is generated or not. becomes “1”. It is the partial plane PL
This is because the Y coordinate always changes in pixel expansion within 1° PL, PL and PL8.

これに対して、MS=“0”であり、それによって画素
が部分平面PL  、PL3.PL6またはPL7に存
在することが指示されたときには、パルスScが発生し
たときのみ、塗り潰し指示フラグF。が“1″となる。
On the other hand, MS="0", so that the pixels are located in the partial planes PL, PL3 . When instructed to exist in PL6 or PL7, the fill instruction flag F is set only when pulse Sc is generated. becomes “1”.

これは、これらの部分平面PL  、PL  、PL 
 およびPL7では、部分平面PL1における処理結果
に対して偏差X とY。との交換が行なわれることと関
係している。つまり、部分平面P[1において画素展開
が斜め方向に進むと、部分平面PL、2 、PL3゜P
L  およびPL7の画素展開ではY座標の変化が生ず
る。そして、この実施例ではY座標変化が生じた画素を
塗り潰し端点とするために、パルスS の発生によって
塗り潰し指示フラグF。を“1”とするのである。
This means that these partial planes PL , PL , PL
And in PL7, deviations X and Y with respect to the processing result in partial plane PL1. It is related to the exchange that takes place. In other words, when the pixel expansion progresses diagonally in the partial plane P[1, the partial planes PL,2, PL3゜P
A change in the Y coordinate occurs in the pixel development of L and PL7. In this embodiment, in order to set the pixel in which the Y coordinate has changed as the filling end point, the filling instruction flag F is set by generating a pulse S.sub.2. is set to "1".

以上の処理を繰返して行き、部分平面PL1における画
素展開が直線α(第29図)の位置まで到達するとX 
≦Yoとなる。ところで、前述したように部分平面PL
  −PL8における画素展開は互いに対応する8個の
画素を組として行なりれる。このため、ひとつの部分平
面PL1における画素展開が完了することによって、残
りの部分平面PL  〜PL8における画素展開も完了
することになる。そこで、比較器418はX。とY。
By repeating the above processing, when the pixel expansion on the partial plane PL1 reaches the position of the straight line α (Fig. 29),
≦Yo. By the way, as mentioned above, the partial plane PL
- Pixel development in PL8 is performed as a set of eight pixels that correspond to each other. Therefore, when the pixel expansion on one partial plane PL1 is completed, the pixel expansion on the remaining partial planes PL to PL8 is also completed. Therefore, comparator 418 outputs "X". and Y.

とを比較し、Xo≦Yoとなると、円CJについての画
素展開の完了を指示する処理完了信号SE2を発生する
When Xo≦Yo is established, a processing completion signal SE2 instructing completion of pixel expansion for circle CJ is generated.

以上のような動作に基いて発生された座標値X、。、Y
、。フラグF。とは第2図のセレクタ14に与えられる
。円処理の場合にはスイッチング信号SWによって、セ
レクタ14は、これらの座標1i1X、Y  およびフ
ラグF。を、座標値x、。
The coordinate value X, generated based on the above operations. ,Y
,. Flag F. is given to the selector 14 in FIG. In the case of circle processing, the selector 14 selects these coordinates 1i1X, Y and flag F by the switching signal SW. , the coordinate value x,.

pc    pc Y、およびフラグFとして出力する。その後の処理につ
いては既述した。
Output as pc pc Y and flag F. The subsequent processing has already been described.

このため、たとえば第29図のような画素展開に対して
は、第30図の塗り潰し走査l  によCAM る塗り潰しが、フレームメモリ15中で行なわれる。
For this reason, for example, for pixel development as shown in FIG. 29, filling by the filling scan l shown in FIG. 30 is performed in the frame memory 15.

なお、円処理の場合には、接続点などの特異点処理のた
めの回路は不要である。それは、円は常にその外側に向
って凸であり、第22図の多角形のような凹部を持たな
いため、ひとつの走査線とひとつの円とが3回以上交わ
ることはないためである。
Note that in the case of circle processing, a circuit for processing singular points such as connection points is not required. This is because a circle is always convex toward the outside and does not have a concave portion like the polygon shown in FIG. 22, so one scanning line and one circle never intersect more than three times.

第28図のフローチャートについては、第27図の説明
から自明であるため、その説明は省略する。ただし、第
28図のステップ821は、第19B図のステップS1
1において(X、V)S を(x、y)に読替えたものに相当している。
Since the flowchart in FIG. 28 is self-evident from the description of FIG. 27, its description will be omitted. However, step 821 in FIG. 28 is replaced by step S1 in FIG. 19B.
1, where (X, V)S is replaced with (x, y).

J D、変形例 上記実施例においては、フレームメモリ15上で塗り潰
された画像をCRTデイスプレィ23の画面上23aで
表示させるために用いているが、塗り潰し画像データは
他の種類の表示装置や記録装置に与えられてもよい。ま
た、この塗り潰し画像データを伯の画像処理装置に与え
ることも可能である。
JD, Modification In the above embodiment, the filled image on the frame memory 15 is used to display on the screen 23a of the CRT display 23, but the filled image data can be displayed on other types of display devices or recording devices. may be provided to the device. It is also possible to provide this filled-in image data to the image processing device.

多角形処理回路12の構成を変形することにより、複数
の線素の接続によって形成された輪郭線一般を取扱うこ
とができる。線素は、曲線であってもよい。また、円処
理回路13の構成を変形することにより、楕円など、接
続点を持たない閉曲線一般を取扱うことも可能である。
By modifying the configuration of the polygon processing circuit 12, it is possible to handle contour lines in general formed by connecting a plurality of line elements. A line element may be a curved line. Furthermore, by modifying the configuration of the circle processing circuit 13, it is also possible to handle closed curves in general that do not have connection points, such as ellipses.

また、第2図のJK−FF20の接設にインバータを設
けるなどの変形を加えれば、輪郭線の外部を塗り潰すこ
とも可能である。
Further, by adding a modification such as providing an inverter to the JK-FF 20 shown in FIG. 2, it is also possible to fill in the outside of the contour line.

この発明における「図形」とは、幾何学的図形のみなら
ず、文字や数字を形成する図形などを含む概念である。
The term "figure" in this invention is a concept that includes not only geometric figures but also figures forming letters and numbers.

(発明の効果) 以上説明したように、この発明によれば、輪郭線の画素
展開と塗り潰し指示フラグの発生とを並行して行なって
いるために、輪郭線の内部領域または外部領域の塗り潰
し処理が高速で行なわれる。
(Effects of the Invention) As explained above, according to the present invention, since the pixel expansion of the outline and the generation of the filling instruction flag are performed in parallel, the filling process of the internal area or external area of the outline is performed. is carried out at high speed.

また、記憶容置が不確定なスタックエリアなどを必要と
しないために、メモリの使用効率も高い。
Furthermore, since a stack area with an uncertain storage capacity is not required, memory usage efficiency is high.

さらに、輪郭線を右まわりに追跡するか、それとも左ま
わりに追跡するかということは無関係に処理を行なうこ
とができるために、取扱うことができる図形の制限も少
ないという効果がある。
Furthermore, since processing can be performed regardless of whether the outline is traced clockwise or counterclockwise, there are fewer restrictions on the types of figures that can be handled.

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

第1図はこの発明の一実施例の概念を示す図、第2図は
実施例に使用される画像塗り潰しデータ生成装置10の
全体ブロック図、 第3図はベクトル形式で表現された線分情報の説明図、 第4図はフラグ格納メモリからのフラグ読出しの説明図
、 第5図は多角形処理回路12の内部構成図、第6図、第
7図および第9図は、線分の画素展開の説明図、 第8図は前処理回路200の内部構成図、第10図は前
処理をソフト的に行なう場合のフローチャート、 第11図は線分方向識別データIDの説明図、第12図
は線分方向識別データIDの生成動作を示すフローチャ
ート、 第13図は直線発生器300の内部構成を示すブロック
図、 第14図から第17図は直線発生器300の動作説明図
、 第18A図および第188図は塗り潰し指示フラグを立
てるべき画素の説明図、 第19A図および第198図は直線発生をソフト的に行
なう場合のフローチャート、 第20図から第23図は接続点の処理と塗り潰し処理と
の説明図、 第24図から第26図は円の処理の説明図、第27図は
円処理回路400の内部構成を示すブロック図、 第28図は円に対する処理をソフト的に行なった場合の
フローチャート、 第29図および第30図は円の塗り潰しの説明図、 第31図および第32図は従来技術の説明図、第33図
は方向性が特定できない図形の例を示す図である。 10・・・画像塗り潰しデータ生成装置、12・・・多
角形処理回路、 13・・・円処理回路、15・・・フ
レームメモリ、 16・・・フラグ格納メモリ、 23・・・CRTデイスプレィ、 C,C,C,・・・輪郭線、 XPS−YPS・Xpc−Ypc・XP・YP・・・画
素座標、 FS、Fo、F・・・塗り潰し指示フラグ、X・・・主
走査方向、    Y・・・副走査方向、l・・・走査
Fig. 1 is a diagram showing the concept of an embodiment of the present invention, Fig. 2 is an overall block diagram of an image filling data generation device 10 used in the embodiment, and Fig. 3 is line segment information expressed in vector format. FIG. 4 is an explanatory diagram of flag reading from the flag storage memory, FIG. 5 is an internal configuration diagram of the polygon processing circuit 12, and FIGS. 6, 7, and 9 are illustrations of line segment pixels. 8 is an internal configuration diagram of the preprocessing circuit 200, FIG. 10 is a flowchart when preprocessing is performed by software, FIG. 11 is an explanatory diagram of line segment direction identification data ID, and FIG. 12 is a flowchart showing the generation operation of line segment direction identification data ID, FIG. 13 is a block diagram showing the internal configuration of the straight line generator 300, FIGS. 14 to 17 are explanatory diagrams of the operation of the straight line generator 300, and FIG. 18A and Fig. 188 is an explanatory diagram of pixels for which a fill instruction flag should be set. Fig. 19A and Fig. 198 are flowcharts when straight line generation is performed by software. Fig. 20 to Fig. 23 are connection point processing and filling processing. FIGS. 24 to 26 are explanatory diagrams of circle processing, FIG. 27 is a block diagram showing the internal configuration of the circle processing circuit 400, and FIG. 28 is a case in which circle processing is performed using software. FIGS. 29 and 30 are explanatory diagrams of filling in circles, FIGS. 31 and 32 are explanatory diagrams of the prior art, and FIG. 33 is a diagram showing an example of a figure whose directionality cannot be specified. 10... Image filling data generation device, 12... Polygon processing circuit, 13... Circle processing circuit, 15... Frame memory, 16... Flag storage memory, 23... CRT display, C , C, C,...contour line, XPS-YPS/Xpc-Ypc/XP/YP...pixel coordinates, FS, Fo, F...filling instruction flag, X...main scanning direction, Y/ ...Sub-scanning direction, l...Scanning line

Claims (2)

【特許請求の範囲】[Claims] (1)所定の画面に対応した記憶空間を有するフレーム
メモリの中で、所望の図形の内部領域または外部領域を
塗り潰した塗り潰し画像データを生成する方法であって
、 前記画面上における前記図形の輪郭線の位置と形状とを
表現した輪郭線情報を入力する第1ステップと、 前記輪郭線を画素展開することにより画素表現された輪
郭線を求め、前記画素表現された輪郭線を前記フレーム
メモリ中にビットマップ形式で書込む第2ステップと、 前記画素表現された輪郭線と前記画面上における走査線
との交差関係に基いて、前記画面上の走査における塗り
潰し端点画素の位置を特定し、前記画面に対応した記憶
空間を有するフラグ格納メモリ中に、前記塗り潰し端点
画素の位置を指示する塗り潰し指示フラグをビットマッ
プ形式で書込む第3ステップと、 前記フラグ格納メモリ中の前記塗り潰し指示フラグの読
出し走査と、前記塗り潰し指示フラグに基づく前記フレ
ームメモリ中の前記輪郭線の内部領域または外部領域の
塗り潰し走査とを同期して行ない、それによって前記フ
レームメモリ中で塗り潰し画像データを生成する第4ス
テップとを有し、 前記第2ステップと前記第3ステップとを並行して実行
することを特徴とする、並行処理を利用した塗り潰し画
像データ生成方法。
(1) A method for generating filled image data in which an internal area or an external area of a desired figure is filled in in a frame memory having a storage space corresponding to a predetermined screen, the outline of the figure on the screen a first step of inputting contour line information expressing the position and shape of the line; obtaining a pixel-expressed contour line by pixel-expanding the contour line; and storing the pixel-expressed contour line in the frame memory. a second step of writing in a bitmap format on the pixel, and specifying the position of the filled end pixel in the scanning on the screen based on the intersecting relationship between the contour line expressed in pixels and the scanning line on the screen; a third step of writing a fill instruction flag indicating the position of the fill end point pixel in a bitmap format into a flag storage memory having a storage space corresponding to the screen; and reading the fill instruction flag from the flag storage memory. a fourth step of synchronously performing scanning and filling scanning of an internal area or an external area of the outline in the frame memory based on the filling instruction flag, thereby generating filled image data in the frame memory; A filled-in image data generation method using parallel processing, characterized in that the second step and the third step are executed in parallel.
(2)輪郭線は複数の線分の組合せによつて形成された
多角形であり、 第3ステップは、前記線分の相互接続点に対応する画素
に対して塗り潰し指示フラグを立てるか否かを、当該接
続点で接続される2本の線分のそれぞれの方向と画面上
の走査方向との関係に基いて決定するプロセスを含む、
特許請求の範囲第1項記載の並行処理を利用した塗り潰
し画像データ生成方法。
(2) The contour line is a polygon formed by a combination of multiple line segments, and the third step is whether to set a fill instruction flag for the pixels corresponding to the interconnection points of the line segments. is determined based on the relationship between the direction of each of the two line segments connected at the connection point and the scanning direction on the screen,
A filled-in image data generation method using parallel processing according to claim 1.
JP32621587A 1987-12-23 1987-12-23 Production of paint-out image data utilizing parallel processing Pending JPH01166275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32621587A JPH01166275A (en) 1987-12-23 1987-12-23 Production of paint-out image data utilizing parallel processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32621587A JPH01166275A (en) 1987-12-23 1987-12-23 Production of paint-out image data utilizing parallel processing

Publications (1)

Publication Number Publication Date
JPH01166275A true JPH01166275A (en) 1989-06-30

Family

ID=18185277

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32621587A Pending JPH01166275A (en) 1987-12-23 1987-12-23 Production of paint-out image data utilizing parallel processing

Country Status (1)

Country Link
JP (1) JPH01166275A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04246790A (en) * 1990-09-14 1992-09-02 Hughes Aircraft Co Vector/conic section/area file primitive generator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04246790A (en) * 1990-09-14 1992-09-02 Hughes Aircraft Co Vector/conic section/area file primitive generator

Similar Documents

Publication Publication Date Title
JP4101275B2 (en) Depth tracking method in scan line based raster image processor
US5278983A (en) Boundary representation solid modeling system
EP0356103B1 (en) Scan-conversion process and processor
JP3885262B2 (en) Method for mixing a plurality of pixels on a texture map, and a plurality of pixel mixing circuit and image processing apparatus using the same
JPH0535913B2 (en)
WO2000002165A1 (en) Method for generating polygon data and image display using the same
JPH04287292A (en) Method and device for rendering trimmed parametric surface
JPH0916806A (en) Stereoscopic image processor
JPH0350679A (en) Method for calculating minkowski&#39;s sum of general polyhedron
US5579461A (en) Method and apparatus for filling polygons
JPH0336668A (en) Shape generating system for cad system
JPH0623989B2 (en) Boundary Representation Solid Modeling System
JPH0714029A (en) Equipment and method for drawing of line
JPH01166275A (en) Production of paint-out image data utilizing parallel processing
EP0486194A2 (en) Memory system
JPH08272984A (en) Description method of pixel position
JPH09311954A (en) Three-dimensional graphic display system and method
JP3522714B2 (en) Image generation method
JP2836617B2 (en) Rendering processor
JPH0822555A (en) Method and device for graphic plotting
JPH0350686A (en) Graphic processing system
JPH1021415A (en) Graphic processor and graphic processing method
JPH0259871A (en) Image processor
JPH09282486A (en) Image processor
JP2001209813A (en) Method and device for generating two-dimensional pattern