JPH0746388B2 - Color painting device - Google Patents

Color painting device

Info

Publication number
JPH0746388B2
JPH0746388B2 JP13598184A JP13598184A JPH0746388B2 JP H0746388 B2 JPH0746388 B2 JP H0746388B2 JP 13598184 A JP13598184 A JP 13598184A JP 13598184 A JP13598184 A JP 13598184A JP H0746388 B2 JPH0746388 B2 JP H0746388B2
Authority
JP
Japan
Prior art keywords
pixel
information
boundary line
color
information storage
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.)
Expired - Lifetime
Application number
JP13598184A
Other languages
Japanese (ja)
Other versions
JPS6115281A (en
Inventor
忠信 神山
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP13598184A priority Critical patent/JPH0746388B2/en
Publication of JPS6115281A publication Critical patent/JPS6115281A/en
Publication of JPH0746388B2 publication Critical patent/JPH0746388B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Digital Computer Display Output (AREA)
  • Image Generation (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はグラフィクス図形の描画処理において、特に閉
領域の色塗りを高速に実行することのできる色塗り描画
装置に関する。
Description: TECHNICAL FIELD [0001] The present invention relates to a color painting drawing apparatus capable of performing color painting of a closed area in a graphics figure drawing process at high speed.

〔発明の技術的背景とその問題点〕[Technical background of the invention and its problems]

エレクトロニクスの発展に伴って情報処理装置の処理能
力が飛躍的に向上し、従来多大な時間と人的労力をかけ
ていた各種情報処理がコンピュータ等により高速度に行
われるようになった。例えば保険,金融,流通業界等に
おいてはデータベーテシステムにより膨大な情報を一括
管理しており、各種業務管理、事務処理システム、更に
は製造業の分野におけるコンピュータによる設計支援シ
ステム等、各種の情報処理に情報処理装置が導入されて
いる。
With the development of electronics, the processing capability of information processing devices has dramatically improved, and various types of information processing, which have conventionally required a great deal of time and human effort, are now performed at high speed by a computer or the like. For example, in the insurance, finance, and distribution industries, a vast amount of information is collectively managed by a data base system, and various information processing such as various business management, clerical processing system, and computer-aided design support system in the field of manufacturing industry. An information processing device is installed in.

ところでこのようなシステムにおいては、コンピュータ
と人間とのマン・マシン・インターフェースが問題とな
っている。この為、コンピュータが高い処理能力を備え
ていても、そのユーザとの対話に多くの時間が費やさ
れ、結果的にその業務が殆んど改善されないと云うこと
が多々見られる。
By the way, in such a system, a man-machine interface between a computer and a human is a problem. For this reason, even if a computer has a high processing capability, it is often seen that much time is spent interacting with the user and, as a result, the business is hardly improved.

そこで最近では、コンピュータによるグラフィクス表示
を積極的に導入し、これによって前記マン・マシン・イ
ンターフェースを改善することが試みられている。
Therefore, recently, it has been attempted to actively introduce a graphics display by a computer and thereby improve the man-machine interface.

然し乍ら、従来、種々の情報を示す簡単な図形をグラフ
ィクス表示している場合にはさほど問題となっていなか
ったが、マン・マシン・インターフェースの効率の向上
を図るべく、画像表示装置の解像度を高めた場合、これ
に伴って上記図形の表示画素数が増大し、且つその描画
処理に要する時間が相対的に増大すると云う問題が生じ
た。例えば、(256×256)の表示画素からなるグラフィ
クス表示を(1024×1024)の表示画素に拡大して、その
グラフィクス表示画素の品質の向上を図るとき、線画の
描画で4倍、色塗りの面描画で16倍もの処理時間が必要
となる。特に上記色塗り面描画にあっては、色塗り領域
の境界判定や境界線処理等が必要であり、ソフトウェア
上でのオーバーヘッドが大きくなって描画速度の実質的
な低下を招来した。この為、現状ではグラフィクス表示
による作業能率の向上を簡易に図ることが望めなかっ
た。
However, in the past, this was not a problem when displaying simple figures showing various information in graphics, but in order to improve the efficiency of the man-machine interface, the resolution of the image display device was increased. In this case, the number of display pixels of the graphic is increased, and the time required for the drawing process is relatively increased. For example, when a graphics display consisting of (256 × 256) display pixels is enlarged to a display pixel of (1024 × 1024) to improve the quality of the graphics display pixel, line drawing is performed four times Surface drawing requires 16 times the processing time. Particularly, in the above-mentioned color-painted surface drawing, it is necessary to judge the boundary of the color-painted area and to perform boundary line processing, and the overhead on the software becomes large and the drawing speed is substantially reduced. For this reason, at present, it is not possible to easily aim to improve work efficiency by displaying graphics.

〔発明の目的〕[Object of the Invention]

本発明はこのような事情を考慮してなされたもので、そ
の目的とするところは、種々の画像情報に対するグラフ
ィクス描画処理のおける色塗り描画処理を簡易に、且つ
高速に実行して画像表示することのできる実用性の高い
色塗り描画装置を提供することにある。
The present invention has been made in consideration of such circumstances, and an object of the present invention is to execute color painting drawing processing in graphics drawing processing for various image information easily and at high speed to display an image. An object of the present invention is to provide a highly practical color painting drawing device.

〔発明の構成〕[Structure of Invention]

本発明による色塗り描画装置は、表示に供される画像を
構成する複数の画素の画素情報を格納すると共に、該画
像中の色塗り処理されるべき閉領域とその他の領域との
境界線上の画素については、該画素情報として該境界線
の種類に応じて異なる複数種類の識別コードからなる境
界線情報を予め格納した画像情報記憶手段と、この画素
情報記憶手段の前記閉領域を含む描画処理対象領域の画
素のアドレスを順次所定の走査方向に走査して発生する
描画アドレス発生手段と、この描画アドレス発生手段か
ら発生されたアドレスで指定される画素の画素情報を前
記画像情報記憶手段から読出す読出し手段と、色塗り描
画状態を示す描画状態情報を保持する保持手段と、前記
読出し手段により前記画像情報記憶手段から読出された
画素情報及び前記保持手段に保持されている直前の画素
の描画状態情報から、新たな描画状態情報を前記保持手
段に出力すると共に、該読出されら画素情報に対応する
画素が前記閉領域内の画素である場合には該画素情報を
所定の色情報からなる画素情報に変換する変換テーブル
と、この変換テーブルによって変換された画素情報を前
記描画アドレス発生手段から発生されるアドレスで指定
される前記画像情報記憶手段の画素に書込むことによ
り、前記閉領域を色塗り描画する手段とを具備すること
を特徴とする。
A color painting drawing apparatus according to the present invention stores pixel information of a plurality of pixels forming an image to be displayed, and stores the pixel information on a boundary line between a closed region to be color-painted and another region in the image. As for the pixel, the image information storage unit that stores in advance the border line information including a plurality of types of identification codes that differ according to the type of the border line as the pixel information, and the drawing process that includes the closed region of the pixel information storage unit. Drawing address generating means for sequentially generating addresses of pixels in a target area in a predetermined scanning direction, and pixel information of pixels specified by the addresses generated by the drawing address generating means are read from the image information storing means. Read-out means for outputting, holding means for holding drawing state information indicating a color-painting drawing state, pixel information read out from the image information storage means by the reading means, and the When new drawing state information is output from the drawing state information of the immediately preceding pixel held in the holding unit to the holding unit, and the pixel corresponding to the read pixel information is a pixel in the closed region. A conversion table for converting the pixel information into pixel information composed of predetermined color information, and the image information storage means for designating the pixel information converted by the conversion table by an address generated by the drawing address generation means. And a means for drawing the closed region by color painting.

また、一つの態様によれば前記複数種類の識別コード
は、前記走査方向の上流側の境界線上の画素を示す第1
のコードと、下流側の境界線上の画素を示す第2のコー
ドと、互いに隣接する前記走査方向の上流側の境界線と
下流側の境界線で形成される、外向きの頂点を示す第3
のコードと、内向きの頂点を示す第4のコードとからな
る。
Further, according to one aspect, the plurality of types of identification codes include a first pixel indicating a pixel on a boundary line on the upstream side in the scanning direction.
Code, a second code indicating a pixel on the downstream boundary line, and a third code indicating an outward vertex formed by the upstream boundary line and the downstream boundary line adjacent to each other in the scanning direction.
Code and a fourth code indicating an inward vertex.

〔発明の効果〕〔The invention's effect〕

本発明によれば、画像情報記憶手段に境界線の種類に応
じて異なる複数の識別コードを境界線情報として予め格
納しておき、色塗り描画時にこの境界線情報と予め保持
しておいた1画素前の画素情報の色塗り描画状態を示す
描画状態情報を参照して、画像情報記憶手段から読出さ
れた画素情報が閉領域内の画素情報か閉領域外の画素情
報かを認識し、閉領域内の画素情報である場合にはそれ
を所定の色情報に変換して画像情報記憶手段に再書き込
みを行うことにより、色塗り描画処理を描画処理対象領
域の走査期間内に高速に実行することができ、またこの
処理を変換テーブルを含む簡単なハードウェアによって
実現できる。従って、グラフィクス図形処理の機能の大
幅な向上を図ることもできる。
According to the present invention, a plurality of identification codes that differ according to the type of boundary line are stored in advance in the image information storage means as boundary line information, and this boundary line information is held in advance during color drawing. By referring to the drawing state information indicating the color-painting drawing state of the pixel information before the pixel, it is recognized whether the pixel information read from the image information storage means is the pixel information inside the closed area or the pixel information outside the closed area, and closed. If it is pixel information in the area, it is converted into predetermined color information and rewritten in the image information storage means, so that the color drawing processing is executed at high speed within the scanning period of the drawing processing target area. This process can be realized by simple hardware including a conversion table. Therefore, it is possible to significantly improve the function of graphics figure processing.

〔発明の実施例〕Example of Invention

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

第1図は実施例装置の概略構成図である。第1図におい
て、1は画像表示に供せられる表示画像情報を格納する
画像情報記憶部である。この各情報記憶部1は、例えば
8ビットのビットプレーンを持ち、(1024×1024)の記
憶容量を有する画像メモリとして実現される。画像情報
読出し部2は上記画像情報記憶部1に描画格納された表
示画像情報を順次読出し、この表示画像情報をCRT等か
らなる画像表示部3に供給して画像表示している。
FIG. 1 is a schematic configuration diagram of the embodiment apparatus. In FIG. 1, reference numeral 1 is an image information storage unit for storing display image information used for image display. Each information storage unit 1 has an 8-bit bit plane, for example, and is realized as an image memory having a storage capacity of (1024 × 1024). The image information reading unit 2 sequentially reads the display image information drawn and stored in the image information storage unit 1 and supplies the display image information to an image display unit 3 such as a CRT to display an image.

しかして描画アドレス発生部4は、前記画像情報記憶部
1に描画すべき図形に応じた描画点アドレスを順に発生
し、或いは指定された描画処理対象領域の画素アドレス
を上記領域内で走査して順に発生している。この描画ア
ドレス発生部4のアドレス制御によって、例えば第2図
に示すように前記画像情報記憶部1に対して、予め色塗
り処理される閉領域つまり領域aの境界線bを示す画素
位置に境界線情報が書込まれる。
Therefore, the drawing address generation unit 4 sequentially generates the drawing point address corresponding to the figure to be drawn in the image information storage unit 1 or scans the pixel address of the specified drawing processing target area in the area. Occur in sequence. By the address control of the drawing address generation unit 4, for example, as shown in FIG. 2, the image information storage unit 1 is bordered at a pixel position indicating a closed region to be color-painted in advance, that is, a border line b of the region a. Line information is written.

しかして描画アドレス発生部5には、前記画像情報記憶
部1上の上記境界線bで示される領域aの色塗り処理を
行うべく、該領域aを含む、例えば四角形状の描画処理
対象領域cが設定される。描画アドレス発生部4は上記
描画処理対象領域c内の画素を、第2図中dに示すよう
に順に走査してアクセスするべく、その描画点アドレス
を順に発生している。この描画点アドレスのアクセスに
よって上記画像情報記憶部1の該当アドレスにそれぞれ
格納された画素情報(境界線情報)が順に読出される。
Therefore, the drawing address generating unit 5 includes, for example, a rectangular drawing processing target region c including the region a in order to perform the color painting process of the region a indicated by the boundary line b on the image information storage unit 1. Is set. The drawing address generation unit 4 sequentially generates drawing point addresses so that the pixels in the drawing processing target area c are sequentially scanned and accessed as shown by d in FIG. By accessing the drawing point address, the pixel information (boundary line information) stored in the corresponding address of the image information storage unit 1 is sequentially read.

そして、この画像情報記憶部1から読出された情報は、
例えば(10ビット×1024ワード)のRAM等によって構成
される画素情報変換テーブル5に入力される。この画素
情報変換テーブル5は、画像情報記憶部1から読出され
た各画素の画素情報が、前記境界線情報と保持手段であ
るラッチ回路6に保持されている1画素前の画素情報の
色塗り描画状態を示す描画状態情報とから閉領域である
領域aの画素情報であることが示されるときに、該画素
情報を所定の色情報からなる画素情報に変換するもので
ある。この変換テーブル5によって変換された画素情報
が描画アドレス発生部4から発生されるアドレスで指定
される画像情報記憶部1の画素に書込まれることによ
り、領域aが色塗り描画されるようになっている。
The information read from this image information storage unit 1 is
For example, it is input to the pixel information conversion table 5 configured by (10 bits × 1024 words) RAM or the like. In the pixel information conversion table 5, the pixel information of each pixel read from the image information storage unit 1 is colored with the boundary line information and the pixel information of the previous pixel held in the latch circuit 6 as a holding unit. When the drawing state information indicating the drawing state indicates that the pixel information is the pixel information of the area a, which is a closed area, the pixel information is converted into pixel information including predetermined color information. The pixel information converted by the conversion table 5 is written in the pixel of the image information storage unit 1 designated by the address generated from the drawing address generation unit 4, so that the area a is color-painted. ing.

尚、上記描画状態情報は、前記画素情報変換テーブル5
を介して求められ、ラッチ回路6を介して1アクセス・
タイミング後に上記画素情報変換テーブル5に帰還され
るようになっている。つまり上記画素情報変換テーブル
5は、画像情報記憶部1から読出された画素情報(境界
線情報を含む)が入力される都度、上記ラッチ回路6を
介して帰還される1アクセス・タイミング前の描画状態
情報を参照して新たな描画状態情報を得ている。
It should be noted that the drawing state information corresponds to the pixel information conversion table 5
1 access via the latch circuit 6
After the timing, it is fed back to the pixel information conversion table 5. That is, the pixel information conversion table 5 is drawn one pixel before the access timing, which is fed back through the latch circuit 6 each time the pixel information (including the boundary line information) read from the image information storage unit 1 is input. New drawing state information is obtained by referring to the state information.

画素情報変換テーブル5は、前記画像情報記憶部1から
アクセスされて入力された情報が前記境界線情報である
とき、または前記描画状態情報からその描画画素アドレ
スが色塗り領域であることが示されるときに描画色情報
を出力し、その他の場合には、前記画像情報記憶部1か
らアクセスされた画素情報をそのまま出力するように構
成されている。そして、この画素情報変換テーブル5を
介して出力された画素情報(描画色情報)が前記画像情
報記憶部1に入力され、前記描画アドレス発生部4によ
りアドレス指定されている描画点に書込まれる(描画)
されるようになっている。尚、上記情報記憶部1からの
情報の読出し、および情報の書込みは、その1アクセス
・タイミング内に実行される。また図中7は、上述した
各部の一連した動作を総合的に制御する制御部である。
In the pixel information conversion table 5, when the information accessed and input from the image information storage unit 1 is the boundary line information, or the drawing state information indicates that the drawing pixel address is a colored area. When the drawing color information is output, the pixel information accessed from the image information storage unit 1 is output as it is in other cases. Then, the pixel information (drawing color information) output via the pixel information conversion table 5 is input to the image information storage unit 1 and written at the drawing point addressed by the drawing address generating unit 4. (drawing)
It is supposed to be done. The reading of information from the information storage unit 1 and the writing of information are executed within one access timing. Reference numeral 7 in the figure denotes a control unit that comprehensively controls a series of operations of the above-described units.

即ち、画像情報記憶部1への描画処理時において、その
アドレス指定によって画像情報記憶部1から読出される
画素情報をp、また変換テーブル5を介して画像情報記
憶部1に描画される画素情報をPとし、ラッチ回路6か
ら出力される1アクセスタイミング前(走査方向の1画
素前)の描画状態情報をq、この描画状態情報qと前記
画素情報pとに従って設定される描画状態情報をQとし
たとき、これらの各情報間の入出力関係は前記画素情報
変換テーブル5の関数をT[ ]として (P,Q)=T[p,q] で示される。ここで上記描画状態情報Qは、次のアクセ
ス・タイミングで前記描画状態情報qとなる。しかし
て、画像情報記憶部1に予め設定される境界線の情報を
E、または色塗りの画素情報をAとすると、前記変換テ
ーブル6に設定される変換関数は、例えば次のように与
えられる。
That is, during the drawing process on the image information storage unit 1, the pixel information read from the image information storage unit 1 by the address designation is p, and the pixel information drawn on the image information storage unit 1 via the conversion table 5. Is P, the drawing state information output from the latch circuit 6 before one access timing (one pixel before in the scanning direction) is q, and the drawing state information set according to the drawing state information q and the pixel information p is Q. Then, the input / output relationship between these respective pieces of information is represented by (P, Q) = T [p, q] where T [] is the function of the pixel information conversion table 5. Here, the drawing state information Q becomes the drawing state information q at the next access timing. Then, assuming that the boundary line information set in advance in the image information storage unit 1 is E or the color painting pixel information is A, the conversion function set in the conversion table 6 is given as follows, for example. .

(P,Q)=(p,S1);p≠E,q=S1 (P,Q)=(A,S2);p=E,q=S1 (P,Q)=(A,S2);p≠E,q=S2 (P,Q)=(A,S1);p=E,q=S2 尚、上記S1は描画アドレスが色塗りの閉領域外であるこ
とを示す描画状態情報であり、S2は描画アドレスが色塗
りの閉領域内であることを示す描画状態情報である。そ
して、前述したように描画処理対象領域cが設定される
ことから、上記描画状態情報はS1に初期設定される。こ
のような変換テーブル構造によって、基本的には前記境
界線bで示される領域a内の画素が前記色塗り画素情報
Aにて順次描画されることになる。すなわち、画像情報
記憶部1から読出された画素情報pが境界線情報Eであ
る場合は、ラッチ回路6から出力される描画状態情報q
が反転(S2→S1、またはS1→S2)されてQとなり、同時
に画素情報pは色塗り画素情報Aに変換されてPとな
る。また、描画状態情報pがS2である場合も、画素情報
pは色塗り画素情報Aに変換されてPとなる。
(P, Q) = (p, S1); p ≠ E, q = S1 (P, Q) = (A, S2); p = E, q = S1 (P, Q) = (A, S2); p ≠ E, q = S2 (P, Q) = (A, S1); p = E, q = S2 The above S1 is drawing state information indicating that the drawing address is outside the closed area for color painting. , S2 is drawing state information indicating that the drawing address is within the closed area of color painting. Since the drawing processing target area c is set as described above, the drawing state information is initialized to S1. With such a conversion table structure, basically, the pixels in the area a indicated by the boundary line b are sequentially drawn with the color-painted pixel information A. That is, when the pixel information p read from the image information storage unit 1 is the boundary line information E, the drawing state information q output from the latch circuit 6 is output.
Is inverted (S2 → S1 or S1 → S2) to become Q, and at the same time, the pixel information p is converted to colored pixel information A and becomes P. Further, even when the drawing state information p is S2, the pixel information p is converted into the color-painted pixel information A and becomes P.

然し乍ら、実際には1走査線上の色塗りがなされる閉領
域が常に2本の境界線によって定義されるとは限らな
い。例えば第3図に示すように2本の境界線が交わる頂
点部Iでは1本の境界線のみによって色塗り領域(画
素)が定義され、また上記頂点の近傍部IIでは2本の境
界線のみによって色塗り領域(画素)が定義される。つ
まり、これらの場合には、境界線間には閉領域内の画素
が存在しないことになる。尚、通常は第3図の状態III
に示すように、2本の境界線に挟まれる画素として1走
査線上の閉領域が定義される。
However, in reality, the closed area in which one scan line is colored is not always defined by two boundary lines. For example, as shown in FIG. 3, a colored area (pixel) is defined by only one boundary line at a vertex I where two boundary lines intersect, and only two boundary lines are defined at a portion II near the vertex. Defines a colored area (pixel). That is, in these cases, the pixels in the closed region do not exist between the boundary lines. Normally, the state III in FIG. 3 is used.
As shown in, a closed area on one scanning line is defined as a pixel sandwiched by two boundary lines.

本発明は境界線によって定義される色塗りの閉領域が、
上述したように数種類の形態として定義されることに着
目し、複数種類の境界線識別コードを用いて上記各境界
線の状態を識別するようにし、これらの境界線識別コー
ドに従ってその色塗り描画を制御するようにしたもので
ある。
In the present invention, the closed area of the color painting defined by the boundary line is
Focusing on the fact that it is defined as several types of forms as described above, the state of each boundary line is identified using a plurality of types of boundary line identification codes, and the color drawing is performed according to these boundary line identification codes. It is designed to be controlled.

次にその一例につき説明する。Next, an example thereof will be described.

本方式では、先ず境界線識別コードとして2種のコード
Ea,Ebを設定し、境界線識別コードEaを検出した後、境
界線識別コードEbを検出するまでを色塗り領域a内であ
ると判定する。そして、逆に境界線識別コードEbを検出
した後、境界線識別コードEaを検出するまでを色塗り領
域aの外であると判定する。これによって前記2本の境
界線間の前記IIの状態をIIIの状態に吸収して、色塗り
制御の単純化を図っている。この場合には、 (P,Q)=(p,S1) ;p≠Ea and p≠Eb,q=S1 (P,Q)=(A,S2a) ;p=Ea,q=S1 (P,Q)=(A,S2a) ;p≠Ea and p≠Eb,q=S2a (P,Q)=(A,S2b) ;p=Eb,q=S2a (P,Q)=(A,S2b) ;p=Eb,q=S1 (P,Q)=(p,S1) ;p≠Ea and p≠Eb,q=S2b (P,Q)=(A,S2a) ;p=Ea,q=S2b なる変換テーブル関数T[ ]を設定すれば良い。但
し、S2aは識別コードEaを検出した後の閉領域内である
ことを示す描画状態情報、S2bは識別コードEbを検出し
た後の閉領域内であることを示す描画状態情報である。
In this method, first, two types of codes are used as the boundary line identification code.
After Ea and Eb are set and the boundary line identification code Ea is detected, it is determined to be within the colored area a until the boundary line identification code Eb is detected. On the contrary, after the boundary line identification code Eb is detected, it is determined that it is outside the colored area a until the boundary line identification code Ea is detected. As a result, the state II between the two boundary lines is absorbed into the state III, and the color painting control is simplified. In this case, (P, Q) = (p, S1); p ≠ Ea and p ≠ Eb, q = S1 (P, Q) = (A, S2a); p = Ea, q = S1 (P, Q) = (A, S2a); p ≠ Ea and p ≠ Eb, q = S2a (P, Q) = (A, S2b); p = Eb, q = S2a (P, Q) = (A, S2b) ; p = Eb, q = S1 (P, Q) = (p, S1); p ≠ Ea and p ≠ Eb, q = S2b (P, Q) = (A, S2a); p = Ea, q = S2b It suffices to set the conversion table function T [] However, S2a is drawing state information indicating that it is in the closed area after detecting the identification code Ea, and S2b is drawing state information indicating that it is in the closed area after detecting the identification code Eb.

尚、このような2種の境界線識別コードEa,Ebは、2本
の境界線が形成する頂点の描画画素点の走査方向に対す
る向きに応じて変更設定することが必要である。従っ
て、例えば第4図(a)〜(c)に示すように閉領域を
形成する境界線の走査方向上流側のものに境界線識別コ
ードEaを与え、下流側の境界線に境界線識別コードEbを
与えるようにすれば良い。これらの境界線識別コードE
a,Ebは、色塗り描画処理に先立って画像情報記憶部1に
書込まれることは云うまでもない。
It is necessary to change and set the two kinds of boundary line identification codes Ea and Eb according to the direction of the drawing pixel point of the vertex formed by the two boundary lines with respect to the scanning direction. Therefore, for example, as shown in FIGS. 4A to 4C, the boundary line identification code Ea is given to the boundary line forming the closed region on the upstream side in the scanning direction, and the boundary line identification code is provided on the downstream side boundary line. Eb should be given. These border identification codes E
It goes without saying that a and Eb are written in the image information storage unit 1 prior to the color drawing processing.

ところで前述したように、色塗り処理すべき閉領域部分
が図形の頂点部分のように1本の境界線だけによって定
義される場合がある。このような状態Iは、第5図に示
すように、その頂点部分が閉領域に対して外側に向く
か、或いは内側に向くかによって境界線に対する色塗り
処理が異なってくる。具体的には、上記閉領域の頂点が
外側を向く場合には、この頂点を検出しても前記描画状
態情報を閉領域外を示す状態としてそのまま維持し、頂
点が内側に向く場合には、前記描画状態情報を描画領域
内であるとしてそのまま維持されるようにする。従っ
て、例えば上記閉領域の頂点が外側を向いている場合に
は、この頂点部分の境界線に凸頂点識別コードVjを与
え、逆に上記領域の頂点が内側に向いている場合には、
この頂点部分の境界線に凹頂点識別コードVdを与えて、
その状態を識別できるようにする。そして、これらの頂
点識別コードに対して前記画素情報変換テーブル5に与
える識別コード変換関数T[ ]を (P,Q)=(A,S1) ;p=Vj,q=S1 (P,Q)=(A,S2) ;p=Vd,q=S2 の如く設定すれば良い。
By the way, as described above, the closed region portion to be color-painted may be defined by only one boundary line like the vertex portion of a figure. In such a state I, as shown in FIG. 5, the color painting process for the boundary line differs depending on whether the apex portion faces the outside or the inside of the closed region. Specifically, when the apex of the closed area faces outward, even if the apex is detected, the drawing state information is maintained as a state indicating the outside of the closed area, and when the apex faces inward, The drawing state information is maintained as it is within the drawing area. Therefore, for example, when the vertices of the closed area face outward, the convex vertex identification code Vj is given to the boundary line of this vertex portion, and conversely, when the vertices of the area face inward,
Give the concave vertex identification code Vd to the boundary line of this vertex,
Be able to identify the condition. Then, the identification code conversion function T [] given to the pixel information conversion table 5 for these vertex identification codes is (P, Q) = (A, S1); p = Vj, q = S1 (P, Q) = (A, S2); p = Vd, q = S2.

ところで、閉領域の頂点は二つの境界線によって挟まれ
た位置である。従って、上記のような2種の頂点識別コ
ードVj,Vdを画像情報記憶部1に描画するには、境界線
識別コードEa,Ebのうちの一方(例えばEa)を描画した
後、他方(例えばEb)を描画する際、既に描画されてい
る境界線識別コード(例えばEa)が検出された場合に
は、その部分が頂点であるとして、その部分の既に描画
されている境界線識別コード(EaまたはEb)を頂点識別
コード(VjまたはVd)に変更すればよい。これは具体的
には、 (P,Q)=(Vj,S1) ;p=Ea or p=Eb,q=S1 を満足する変換テーブルの関数T[ ]を設定すること
によって容易に実現可能である。尚、この処理は、閉領
域を形成する多角形の描画の場合、内側に向く頂点に比
して外側に向く頂点の数の方が必ず多いことから、凸頂
点識別コードへの変更処理に適用した方が有利である。
そして、内側に向く頂点に関しては、 (P,Q)=(Vd,q);p=Vj なる変換テーブル関数T[ ]を設定し、凸頂点識別コ
ードVjを凹頂点識別コードVdに変更すれば十分である。
By the way, the apex of the closed region is a position sandwiched by two boundary lines. Therefore, in order to draw the above two types of vertex identification codes Vj and Vd in the image information storage unit 1, after drawing one (for example, Ea) of the boundary line identification codes Ea and Eb, the other (for example, When a previously drawn boundary line identification code (for example, Ea) is detected when drawing (Eb), the part is regarded as a vertex, and the already drawn boundary line identification code (Ea) is detected. Alternatively, Eb) may be changed to the vertex identification code (Vj or Vd). Specifically, this can be easily realized by setting the function T [] of the conversion table that satisfies (P, Q) = (Vj, S1); p = Ea or p = Eb, q = S1. is there. Note that this process is applied to the process of changing to the convex vertex identification code, because in the case of drawing a polygon that forms a closed region, the number of vertices facing outward is always larger than the number of vertices facing inward. It is advantageous to do.
For the inward facing vertices, set the conversion table function T [] such that (P, Q) = (Vd, q); p = Vj and change the convex vertex identification code Vj to the concave vertex identification code Vd. It is enough.

以上説明したように、色塗り図形の閉領域を特定する境
界線を、複数種類の識別コードとして与え、これらの識
別コードの変換処理、および識別コードに従う色塗り画
素情報の変換処理を行う前記変換関数T[ ]を前記画
素情報変換テーブル5に設定することによって、前記画
像情報記憶部1に設定された境界線情報に従って、その
図形の閉領域を高速に、且つ容易に色塗り描画処理する
ことが可能となる。
As described above, the above-mentioned conversion is performed in which a boundary line that specifies a closed area of a color-painted figure is given as a plurality of types of identification codes, and the conversion processing of these identification codes and the conversion processing of the color-painting pixel information according to the identification code are performed. By setting the function T [] in the pixel information conversion table 5, the closed area of the figure can be rapidly and easily color-painted according to the boundary information set in the image information storage unit 1. Is possible.

次に、上述した原理に従う色塗り描画の具体例について
説明する。この例は、色塗り描画すべき多角形の閉領域
を規定する境界線情報として、走査方向の上流側および
下流側の境界線を識別する境界線識別コードEa,Ebと、
互いに隣接する走査方向の上流側および下流側の境界線
により形成される頂点が閉領域の外側を向いているか内
側を向いているかを識別する凸頂点識別コードおよび凹
頂点識別コードVj,Vdを用い、Ea,Eb,Vj,Vdにそれぞれ16
進コードのFF,FE,FD,FCを当てるものである。
Next, a specific example of color painting according to the above principle will be described. In this example, as boundary line information defining a closed area of a polygon to be color-painted, a boundary line identification code Ea, Eb for identifying the upstream and downstream boundaries in the scanning direction,
Using the convex vertex identification code and concave vertex identification code Vj, Vd that identify whether the vertices formed by the upstream and downstream boundaries in the scanning direction adjacent to each other face the outside or the inside of the closed region , Ea, Eb, Vj, Vd 16 each
The hex code FF, FE, FD, FC is applied.

この場合、まず第6図および第7図に示す変換テーブル
を用いて、画像情報記憶部1に最初に格納されている境
界線情報を変換する。第6図および第7図において、
「既存画素情報」は画素情報記憶部1から読出された画
素情報、「既存状態情報」はラッチ回路6から出力され
る描画状態情報、「描画画素情報」は画像情報記憶部1
に改めて書込まれる画素情報、「設定状態情報」はラッ
チ回路6に入力される描画状態情報である。既存画素情
報および描画画素情報において、FF,FE,FD,FCは前述し
た境界線情報(識別コード)であり、これ以外の00,01,
…等は境界線情報以外の通常の画像情報を表す。また、
既存状態情報および設定状態情報において、1は描画状
態、0は非描画状態をそれぞれ表す。
In this case, first, using the conversion tables shown in FIGS. 6 and 7, the boundary line information initially stored in the image information storage unit 1 is converted. In FIGS. 6 and 7,
The “existing pixel information” is the pixel information read from the pixel information storage unit 1, the “existing state information” is the drawing state information output from the latch circuit 6, and the “drawing pixel information” is the image information storage unit 1.
Pixel information and “setting state information” that are written again are the drawing state information input to the latch circuit 6. In the existing pixel information and the drawing pixel information, FF, FE, FD, FC are the boundary line information (identification code) described above, and 00,01,
... represents normal image information other than the boundary line information. Also,
In the existing state information and the set state information, 1 represents a drawing state and 0 represents a non-drawing state.

第6図は、識別コードEaの描画時に用いる変換テーブル
であり、画像情報記憶部1から読み出された画素情報を
識別コードEaに相当するFFに変換する。この際、画像情
報記憶部1において既に識別コードEbに相当するFEが書
き込まれている画素については、これを凸頂点識別コー
ドVjに相当するFDに変換する。また、第7図は識別コー
ドEbの描画時に用いる変換テーブルであり、画像情報記
憶部1から読み出された画素情報を識別コードEbに相当
するFEに変換する。この際、画像情報記憶部1において
既に識別コードEaに相当するFFが書き込まれている画素
については、これを凸頂点識別コードVjに相当するFDに
変換する。
FIG. 6 is a conversion table used when drawing the identification code Ea, and converts the pixel information read from the image information storage unit 1 into FF corresponding to the identification code Ea. At this time, for the pixel in which the FE corresponding to the identification code Eb has already been written in the image information storage unit 1, this is converted into the FD corresponding to the convex vertex identification code Vj. Further, FIG. 7 is a conversion table used when drawing the identification code Eb, and converts the pixel information read from the image information storage unit 1 into FE corresponding to the identification code Eb. At this time, for the pixel in which the FF corresponding to the identification code Ea has already been written in the image information storage unit 1, this is converted into the FD corresponding to the convex vertex identification code Vj.

ここで、画像情報記憶部1から読み出された画素情報よ
り識別コードとしてFFを得るかFEを得るかは、境界線が
第4図の破線の丸印で囲んだ上向きまたは下向きの凸頂
点を越える毎に交互に変更される。
Here, whether to obtain FF or FE as the identification code from the pixel information read out from the image information storage unit 1 depends on whether the boundary line is an upward or downward convex vertex surrounded by a dotted circle. Each time it exceeds, it will be changed alternately.

第8図はそのアルゴリズムを示すフローチャートであ
り、画像情報記憶部1上で走査方向をx、これに直交す
る方向をyとし、さらに閉領域を構成する図形をn角形
とし、その各頂点の座標を(X1,Y1)、(X2,Y2)、…,
(Xn,Yn)とする。そして、初期セットとしてY0=y0、Y
1=y0、Y2=y1にし、さらに頂点の番号iをi=1とす
る(S1)。Y0は仮想的に設定したものであり、(X1,
Y1)はy軸方向の最初の頂点の座標である。次に、i=
nかどうかを調べ(S2)、i=nであればY2=y0(S
3)、i=nでなければY2=yi+1(S4)とし、ΔY0=Y1
−Y0,ΔY1=Y2−Y1なる変位を求める(S5)。
FIG. 8 is a flowchart showing the algorithm, in which the scanning direction on the image information storage unit 1 is x, the direction orthogonal to the scanning direction is y, the figure forming the closed region is an n-sided polygon, and the coordinates of each vertex are shown. (X 1 , Y 1 ), (X 2 , Y 2 ),…,
Let (X n , Y n ). Then, as an initial set, Y 0 = y 0 , Y
1 = y 0 , Y 2 = y 1 , and the vertex number i is set to i = 1 (S1). Y 0 is virtually set, and (X 1 ,
Y 1 ) is the coordinate of the first vertex in the y-axis direction. Then i =
It is checked whether or not n (S2), and if i = n, Y 2 = y 0 (S
3), if i = n, then Y 2 = y i + 1 (S4) and ΔY 0 = Y 1
A displacement of −Y 0 , ΔY 1 = Y 2 −Y 1 is calculated (S5).

次に、ΔY1=0かどうかにより境界線が走査方向xに平
行かどうかを調べ(S6)、平行でなければ次にS4で求め
られたΔY0とΔY1の積が負かどうかを調べることによ
り、第4図に破線の丸印で囲んだ上向きまたは下向きの
凸頂点かどうかを判定し(S7)、上向きまたは下向きの
凸頂点であれば境界線識別コードをEaからEbまたはEbか
らEaに変更し、これを境界線情報として画像情報記憶部
1に書き込む、つまり描画する(S8〜S9)。
Next, it is checked whether the boundary line is parallel to the scanning direction x depending on whether ΔY 1 = 0 (S6). If it is not parallel, then it is checked whether the product of ΔY 0 and ΔY 1 obtained in S4 is negative. By doing so, it is determined whether or not it is the upward or downward convex vertex surrounded by the dashed circle in FIG. 4 (S7). If it is the upward or downward convex vertex, the boundary line identification code is Ea to Eb or Eb to Ea. Is written in the image information storage unit 1 as boundary information, that is, drawn (S8 to S9).

次に、Y0=Y1,Y1=Y2とした後、iを1増加させる(S10
〜S11)。なお、S6で走査方向xに平行の境界線が検出
された場合は、S11にジャンプする。
Next, after setting Y 0 = Y 1 and Y 1 = Y 2 , i is incremented by 1 (S10
~ S11). If a boundary line parallel to the scanning direction x is detected in S6, the process jumps to S11.

そして、S12で全ての頂点について処理がされたと判定
されるまでS2〜S11の処理を行い、全ての処理が終了し
たら、後述する色塗り描画処理に移行する。
Then, the processes of S2 to S11 are performed until it is determined in S12 that all the vertices have been processed, and when all the processes are completed, the process shifts to a color painting drawing process described later.

以上のようにして画像情報記憶部1に描画された境界線
情報のうちの頂点識別コードは、第6図および第7図に
示したように全て凸頂点識別コードVj(FD)となるの
で、次に第10図に示す変換テーブルを用いて凸頂点識別
コードのうち凹頂点に相当するもののみを凹頂点識別コ
ードVd(FC)に変換し、この凹頂点識別コードFCのみを
画像情報記憶部1に描画する。
Since the vertex identification codes of the boundary line information drawn in the image information storage unit 1 as described above are all convex vertex identification codes Vj (FD) as shown in FIGS. 6 and 7, Next, using the conversion table shown in FIG. 10, only the convex vertex identification codes corresponding to the concave vertexes are converted into the concave vertex identification code Vd (FC), and only the concave vertex identification code FC is stored in the image information storage unit. Draw to 1.

第11図は、頂点識別コードの描画時における頂点の向き
の判定処理アルゴリズムを示す図である。第11図におい
て、S21,S22は第8図のS7,S8と同様である。S21で境界
線識別コードを前述のように変更した後、境界線追跡方
向において頂点を挟む境界線が右曲りか左曲りかを判定
する(S23)。ここで、右曲りの場合は右曲りの頂点の
個数Rを1増加させ(S24)、その頂点から次の頂点ま
での境界線を右曲り境界線として登録し(S26)、また
左曲りの場合は左曲りの頂点の個数Lを1増加させ(S2
5)、その頂点から次の頂点までの境界線を右曲り境界
線として登録する(S27)。
FIG. 11 is a diagram showing an algorithm for determining the orientation of a vertex when drawing a vertex identification code. In FIG. 11, S21 and S22 are the same as S7 and S8 in FIG. After the boundary line identification code is changed in S21 as described above, it is determined whether the boundary line that sandwiches the vertices in the boundary line tracking direction is curved right or left (S23). Here, in the case of right turn, the number R of right turn vertices is increased by 1 (S24), the boundary line from that vertex to the next vertex is registered as the right turn boundary line (S26), and in the case of left turn Increases the number L of vertices to the left by 1 (S2
5) The boundary line from that vertex to the next vertex is registered as the right-turning boundary line (S27).

次に、第10図に示す凹頂点識別コード変換テーブルを設
定し(S28)、さらにRとLの大小関係を調べる(S2
9)。閉領域の図形が第9図に示したような多角形の場
合、一般に凹頂点の数は凸頂点より少ないため、右曲り
の頂点の個数Rと左回りの頂点の個数Lとの関係がR>
Lであれば左曲りの頂点が凹頂点であるとして、S27で
の既登録左曲り境界線を示す識別コードを画像情報記憶
部1に書き込み(S30)、またR>Lでなければ右曲り
の頂点が凹頂点であるとして、S26での既登録右曲り境
界線を示す識別コードを画像情報記憶部1に書き込む
(S31)。その後、後述する色塗り描画処理を行う。
Next, the concave vertex identification code conversion table shown in FIG. 10 is set (S28), and the magnitude relationship between R and L is further checked (S2).
9). When the figure in the closed region is a polygon as shown in FIG. 9, since the number of concave vertices is generally smaller than that of convex vertices, the relationship between the number R of right-handed vertices and the number L of counterclockwise vertices is R. >
If it is L, it is assumed that the apex of the left bend is a concave apex, and the identification code indicating the registered left bend boundary line in S27 is written in the image information storage unit 1 (S30). Assuming that the vertex is a concave vertex, the identification code indicating the registered right-turning boundary line in S26 is written in the image information storage unit 1 (S31). After that, a color painting drawing process described later is performed.

以上の処理によって、画像情報記憶部1には、前述した
境界線識別コード(FF),(FE),(FD),(FC)で表
現された色塗り描画対象図形の境界線情報が、その境界
線画素位置にそれぞれ描画される。そしてこれにより、
前記図形に対する色塗り処理を実行する為の前処理が終
了する。
As a result of the above-described processing, the image information storage unit 1 stores the boundary line information of the color-painting target graphic represented by the boundary line identification codes (FF), (FE), (FD), (FC) described above. It is drawn at each boundary pixel position. And this
The preprocessing for executing the color painting processing on the figure is completed.

しかるのち,このようにして画像情報記憶部1に描画さ
れた境界線情報に従って、その境界線が規定する閉領域
内の色塗り描画処理が行われる。この場合、境界線自体
が第12図に示すように、前記描画処理対象とする領域c
の描画点走査方向xと平行となる場合もある。従って、
このような場合も勘案して、次のような変換テーブルを
設定し、具体的には、例えば第13図に示すような画素情
報変換テーブルが構成される。但し、*印は色塗りの色
情報を示している。
Thereafter, according to the boundary line information drawn in the image information storage unit 1 in this way, the color drawing process in the closed area defined by the boundary line is performed. In this case, the boundary line itself is, as shown in FIG.
In some cases, the drawing point may be parallel to the scanning direction x. Therefore,
In consideration of such a case as well, the following conversion table is set, and specifically, for example, a pixel information conversion table as shown in FIG. 13 is configured. However, the asterisk * indicates the color information of the color painting.

(P,Q)=(p,S1) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,p=S1 (P,Q)=(A,S2) ;p=Ea,q=S1 (P,Q)=(A,S3) ;p=Eb,q=S1 (P,Q)=(A,S7) ;p=Vj,q=S1 (P,Q)=(A,S8) ;p=Vd,q=S1 (P,Q)=(A,S4) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,p=S2 (P,Q)=(A,S2) ;p=Ea,q=S2 (P,Q)=(A,S6) ;p=Eb,q=S2 (P,Q)=(A,S7) ;p=Vj,q=S2 (P,Q)=(A,S8) ;p=Vd,q=S2 (P,Q)=(A,S4) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,q=S3 (P,Q)=(A,S5) ;p=Ea,q=S3 (P,Q)=(A,S3) ;p=Eb,q=S3 (P,Q)=(A,S7) ;p=Vj,q=S3 (P,Q)=(A,S8) ;p=Vd,q=S3 (P,Q)=(A,S4) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,q=S4 (P,Q)=(A,S5) ;p=Ea,q=S4 (P,Q)=(A,S6) ;p=Eb,q=S4 (P,Q)=(A,S7) ;p−Vj,q=S4 (P,Q)=(A,S8) ;p=Vd,q=S4 (P,Q)=(A,S1) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,q=S5 (P,Q)=(A,S5) ;p=Ea,q=S5 (P,Q)=(A,S3) ;p=Eb,q=S5 (P,Q)=(A,S7) ;p=Vj,q=S5 (P,Q)=(A,S8) ;p=Vd,q=S5 (P,Q)=(A,S1) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,q=S6 (P,Q)=(A,S2) ;p=Ea,q=S6 (P,Q)=(A,S6) ;p=Eb,q=S6 (P,Q)=(A,S7) ;p−Vj,q=S6 (P,Q)=(A,S8) ;p=Vd,q=S6 (P,Q)=(A,S1) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,q=S7 (P,Q)=(A,S7) ;p=Ea,q=S7 (P,Q)=(A,S7) ;p=Eb,q=S7 (P,Q)=(A,S7) ;p=Vj,q=S7 (P,Q)=(A,S8) ;p=Vd,q=S7 (P,Q)=(A,S4) ;p≠Ea and p≠Eb and p≠Vj and p≠Vd,q=S8 (P,Q)=(A,S8) ;p=Ea,q=S8 (P,Q)=(A,S8) ;p=Eb,q=S8 (P,Q)=(A,S7) ;p=Vj,q=S8 (P,Q)=(A,S8) ;p=Vd,q=S8 但し、上記変換テーブルにおいて、各状態情報は次のよ
うに定められている。
(P, Q) = (p, S1); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, p = S1 (P, Q) = (A, S2); p = Ea, q = S1 (P, Q) = (A, S3); p = Eb, q = S1 (P, Q) = (A, S7); p = Vj, q = S1 (P, Q) = (A, S8); p = Vd, q = S1 (P, Q) = (A, S4); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, p = S2 (P, Q) = (A, S2); p = Ea, q = S2 (P, Q) = (A, S6); p = Eb, q = S2 (P, Q) = (A, S7); p = Vj, q = S2 (P, Q) = (A, S8); p = Vd, q = S2 (P, Q) = (A, S4); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, q = S3 (P, Q) = (A, S5); p = Ea, q = S3 (P, Q) = (A, S3); p = Eb, q = S3 (P, Q) = (A, S7); p = Vj, q = S3 (P, Q) = (A, S8); p = Vd, q = S3 (P, Q) = (A, S4); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, q = S4 (P, Q) = (A, S5); p = Ea, q = S4 (P, Q) = (A, S6); p = Eb, q = S4 (P, Q) = (A, S7 ); P−Vj, q = S4 (P, Q) = (A, S8); p = Vd, q = S4 (P, Q) = (A, S1); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, q = S5 (P, Q) = (A, S5); p = Ea, q = S5 (P, Q) = (A, S3); p = Eb, q = S5 (P, Q) = (A, S7); p = Vj, q = S5 (P, Q) = (A, S8); p = Vd, q = S5 (P, Q) = (A, S1); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, q = S6 (P, Q) = (A, S2); p = Ea, q = S6 (P, Q) = (A, S6); p = Eb, q = S6 (P, Q) = (A, S7); p-Vj, q = S6 (P, Q) = (A, S8); p = Vd, q = S6 (P, Q) = (A, S1); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, q = S7 (P, Q) = (A, S7); p = Ea, q = S7 (P, Q) = (A, S7); p = Eb, q = S7 (P, Q) = (A, S7); p = Vj, q = S7 (P, Q) = (A, S8); p = Vd, q = S7 (P, Q) = (A, S4); p ≠ Ea and p ≠ Eb and p ≠ Vj and p ≠ Vd, q = S8 (P, Q) = (A, S8); p = Ea, q = S8 (P, Q) = (A, S8); p = Eb, q = S8 (P, Q) = (A, S7 ); P = Vj, q = S8 (P, Q) = (A, S8); p = Vd, q = S8 However, in the conversion table, each state information is defined as follows.

S1;閉領域外状態(初期状態) S2;閉領域外より初めにEaが検出された場合の境界線上
状態 S3;閉領域外より初めにEbが検出された場合の境界線上
状態 S4;閉領域内状態 S5;Eb上からEaが検出された場合の境界線上状態 S6;Ea上からEbが検出された場合の境界線上状態 S7;凸頂点上状態 S8;凹頂点上状態 そして、この画素情報変換テーブル6を用いて、前記画
像情報記憶部1から順次走査して読出される画素情報
と、その境界線情報によって設定される描画状態情報と
に従って前記画像情報記憶部1に描画すべき色塗り画素
情報を得、これを順次描画することによって前記閉多角
形の色塗り描画が行われる。
S1; State outside the closed region (initial state) S2; State on the boundary line when Ea is detected first from outside the closed region S3; State on the boundary line when Eb is detected first from outside the closed region S4; Closed region Inner state S5; Boundary state when Ea is detected from Eb S6; Boundary state when Eb is detected from Ea S7; Convex vertex state S8; Concave vertex state And this pixel information conversion Colored pixels to be drawn in the image information storage unit 1 in accordance with pixel information sequentially read from the image information storage unit 1 using the table 6 and drawing state information set by the boundary line information. The closed polygonal color painting is performed by obtaining information and drawing it sequentially.

かくしてこのような色塗り描画処理によれば、色塗り対
象とする図形の境界線に対する処理を、前述した境界線
識別コードに従って簡易に、且つ高速に行うことがで
き、従来のようにソフトウェアのオーバーヘッドの増大
を招来することがない。しかも、単純なハードウェアに
よって、高速に処理することができる。故に、図形のグ
ラフィクス処理における色塗り描画処理を効果的に実行
することが可能となる等の実用上多大なる効果が奏せら
れる。
Thus, according to such a color-painting drawing process, the process for the boundary line of the figure to be color-painted can be performed easily and at high speed in accordance with the above-mentioned boundary line identification code, and the overhead of software as in the conventional case. Will not increase. Moreover, it can be processed at high speed with simple hardware. Therefore, it is possible to achieve a great practical effect such that the color painting processing in the graphics processing of the figure can be effectively executed.

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

図は本発明の実施例を示すもので、第1図は本方式を適
用して構成される色塗り描画処理装置の概略構成図、第
2図は閉領域に対する色塗り描画処理の基本概念を示す
図、第3図乃至第13図は第1の実施例につき示すもの
で、第3図は閉領域を規定する境界線の状態を示す図、
第4図は描画点走査方向に対して直角な方向に頂点を形
成する境界線に付す境界線識別コードの例を示す図、第
5図は閉領域を形成した境界線が形成する頂点をそれぞ
れ示す図、第6図および第7図は境界線識別コードを得
る為の画素情報変換テーブルの構成を示す図、第8図は
頂点検出による変換テーブル選択処理のアルゴリズムを
示す図、第9図は閉多角形における頂点の向きを示す
図、第10図は頂点の向きに応じた頂点識別コードを得る
為の情報変換テーブルの構成を示す図、第11図は頂点の
向きの判定処理アルゴリズムを示す図、第12図は描画点
走査方向xと平行な境界線に対する処理を説明する為の
図、第13図は色塗り描画処理で用いられる境界線識別コ
ードから色塗り画素情報を得る為の画素情報変換テーブ
ルの構成図である。 1……画像情報記憶部、2……画像情報読出し部、3…
…画像表示部、4……描画アドレス発生部、5……画素
情報変換テーブル、6……ラッチ回路、7……制御部。
FIG. 1 shows an embodiment of the present invention. FIG. 1 is a schematic configuration diagram of a color painting drawing processing apparatus configured by applying this method, and FIG. 2 shows a basic concept of color painting drawing processing for a closed region. FIGS. 3 to 13 show the first embodiment, and FIG. 3 shows a state of a boundary line defining a closed region,
FIG. 4 is a diagram showing an example of a boundary line identification code attached to a boundary line forming vertices in a direction perpendicular to the drawing point scanning direction, and FIG. 5 is a diagram showing vertices formed by a boundary line forming a closed region. FIG. 6, FIG. 6 and FIG. 7 are diagrams showing the structure of a pixel information conversion table for obtaining a boundary line identification code, FIG. 8 is a diagram showing an algorithm of conversion table selection processing by vertex detection, and FIG. 9 is FIG. 10 is a diagram showing the directions of vertices in a closed polygon, FIG. 10 is a diagram showing the structure of an information conversion table for obtaining a vertex identification code according to the directions of vertices, and FIG. 11 is a processing algorithm for determining the directions of vertices. FIGS. 12 and 13 are diagrams for explaining processing for a boundary line parallel to the drawing point scanning direction x, and FIG. 13 is a pixel for obtaining color-painting pixel information from a boundary-line identification code used in the color-painting drawing process. It is a block diagram of an information conversion table. 1 ... Image information storage unit, 2 ... Image information reading unit, 3 ...
... image display section, 4 drawing address generation section, 5 pixel information conversion table, 6 latch circuit, 7 control section.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】表示に供される画像を構成する複数の画素
の画素情報を格納すると共に、該画像中の色塗り処理さ
れるべき閉領域とその他の領域との境界線上の画素につ
いては、該画素情報として該境界線の種類に応じて異な
る複数種類の識別コードからなる境界線情報を予め格納
した画像情報記憶手段と、 この画素情報記憶手段の前記閉領域を含む描画処理対象
領域の画素のアドレスを順次所定の走査方向に走査して
発生する描画アドレス発生手段と、 この描画アドレス発生手段から発生されたアドレスで指
定される画素の画素情報を前記画像情報記憶手段から読
出す読出し手段と、 色塗り描画状態を示す描画状態情報を保持する保持手段
と、 前記読出し手段により前記画像情報記憶手段から読出さ
れた画素情報及び前記保持手段に保持されている直前の
画素の描画状態情報から、新たな描画状態情報を前記保
持手段に出力すると共に、該読出されら画素情報に対応
する画素が前記閉領域内の画素である場合には該画素情
報を所定の色情報からなる画素情報に変換する変換テー
ブルと、 この変換テーブルによって変換された画素情報を前記描
画アドレス発生手段から発生されるアドレスで指定され
る前記画像情報記憶手段の画素に書込むことにより、前
記閉領域を色塗り描画する手段とを具備することを特徴
とする色塗り描画装置。
1. Pixel information of a plurality of pixels forming an image to be displayed is stored, and pixels on a boundary line between a closed region to be color-painted and other regions in the image are stored. Image information storage means that stores in advance, as the pixel information, boundary line information composed of a plurality of types of identification codes that differ according to the type of the boundary line, and pixels of a drawing processing target area including the closed area of the pixel information storage means. Drawing address generating means for sequentially scanning the addresses in the predetermined scanning direction, and reading means for reading the pixel information of the pixel designated by the address generated by the drawing address generating means from the image information storing means. Holding means for holding drawing state information indicating a color-painting drawing state, pixel information read from the image information storage means by the reading means, and held in the holding means. The new drawing state information is output from the drawing state information of the pixel immediately before being read to the holding means, and if the pixel corresponding to the read pixel information is a pixel in the closed area, the pixel A conversion table for converting information into pixel information composed of predetermined color information, and the pixel information converted by this conversion table is written in the pixels of the image information storage means specified by the address generated by the drawing address generation means. And a means for drawing the closed area by color drawing.
【請求項2】前記複数種類の識別コードは、前記走査方
向の上流側の境界線上の画素を示す第1のコードと、下
流側の境界線上の画素を示す第2のコードと、互いに隣
接する前記走査方向の上流側の境界線と下流側の境界線
で形成される、外向きの頂点を示す第3のコードと、内
向きの頂点を示す第4のコードとからなることを特徴と
する特許請求の範囲第1項記載の色塗り描画装置。
2. The plurality of types of identification codes are adjacent to each other, a first code indicating a pixel on an upstream boundary line in the scanning direction and a second code indicating a pixel on a downstream boundary line in the scanning direction. It is characterized by comprising a third code showing an outward vertex and a fourth code showing an inward vertex, which are formed by a boundary line on the upstream side and a boundary line on the downstream side in the scanning direction. The color painting / drawing device according to claim 1.
JP13598184A 1984-06-30 1984-06-30 Color painting device Expired - Lifetime JPH0746388B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13598184A JPH0746388B2 (en) 1984-06-30 1984-06-30 Color painting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13598184A JPH0746388B2 (en) 1984-06-30 1984-06-30 Color painting device

Publications (2)

Publication Number Publication Date
JPS6115281A JPS6115281A (en) 1986-01-23
JPH0746388B2 true JPH0746388B2 (en) 1995-05-17

Family

ID=15164397

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13598184A Expired - Lifetime JPH0746388B2 (en) 1984-06-30 1984-06-30 Color painting device

Country Status (1)

Country Link
JP (1) JPH0746388B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4708339B2 (en) * 2004-12-01 2011-06-22 三菱電機株式会社 elevator

Also Published As

Publication number Publication date
JPS6115281A (en) 1986-01-23

Similar Documents

Publication Publication Date Title
US20120229501A1 (en) Method and a Computer System for Displaying and Selecting Images
JPS6380375A (en) Texture mapping device
JPH07109629B2 (en) Polygon identification method, polygon identification system
JPH11102446A (en) Graphics input device
KR930000998B1 (en) Method and apparatus for processing image and/or character in computer graphics
JPH03119387A (en) Method and apparatus for forming contour of digital type surface
EP0566387B1 (en) Raster display and method of controlling such a display
JPH0746388B2 (en) Color painting device
JPH10312407A (en) Drawing display device
JP2747822B2 (en) Graphic display device
JP2773127B2 (en) Image editing method
US5471536A (en) Figure digitizing system
US5680527A (en) Information processing system having recognized pattern control
US5903280A (en) Image display apparatus that reduces necessary memory capacity for operation
EP0357076B1 (en) Inclined rectangular pattern generating system
US5680153A (en) Image Processing apparatus
JP3272463B2 (en) Image forming apparatus and method of using the same
JP2614111B2 (en) A method for detecting the correlation between a straight line display element and a rectangular window
JP3312699B2 (en) Screen display method using virtual VRAM
JP2727667B2 (en) Drawing equipment
JPH1153579A (en) Shape conversion method, storage medium recorded with its conversion procedure and shape conversion device
JPH0721383A (en) Picture processor
KR101106013B1 (en) edge list generation method in graphics accelerators and active edge list generation method
JP2714114B2 (en) Graphic processing method and graphic system
JPH0581948B2 (en)