JPS6361383A - Painting-out graphic drawing method - Google Patents

Painting-out graphic drawing method

Info

Publication number
JPS6361383A
JPS6361383A JP20638486A JP20638486A JPS6361383A JP S6361383 A JPS6361383 A JP S6361383A JP 20638486 A JP20638486 A JP 20638486A JP 20638486 A JP20638486 A JP 20638486A JP S6361383 A JPS6361383 A JP S6361383A
Authority
JP
Japan
Prior art keywords
boundary point
boundary
painting
color
frame buffer
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
JP20638486A
Other languages
Japanese (ja)
Inventor
Maki Seki
関 真樹
Kazuhiko Morizaki
和彦 森嵜
Hidenori Meguro
目黒 秀徳
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP20638486A priority Critical patent/JPS6361383A/en
Publication of JPS6361383A publication Critical patent/JPS6361383A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To easily obtain painting-out data by storing boundary information to show that a painting-out boundary point is obtained, into the memory area of a frame buffer corresponding to a painting-out boundary point. CONSTITUTION:In the memory area 3a of a frame buffer 3 corresponding to the point of a painting-out boundary line BL, boundary information showing that a painting-out boundary point is obtained is stored. A data converting part 4 synchronizes and scans the respective memory areas 3a of the frame buffer 3 with the raster scan of a beam in a CRT 2, outputs the color stored in the memory area corresponding to an odd number-th painting-out boundary point concerning one horizontal line to the CRT 2 during the period from the odd number-th boundary point to the next boundary point and executes the painting-out with the color during the period.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明は塗りつぶし図形描画方法に係り、特にフレーム
バッファに画像を記憶させ、該フレームバッファから画
像を読み取ってディスプレイ画面に表示させるディスプ
レイ装置における塗りつぶし図形描画方法に関する。
DETAILED DESCRIPTION OF THE INVENTION <Industrial Application Field> The present invention relates to a fill-in graphic drawing method, and in particular to a fill-in figure drawing method in a display device that stores an image in a frame buffer, reads the image from the frame buffer, and displays it on a display screen. It relates to a figure drawing method.

〈従来技術〉 グラフィックディスプレイ装置においては、所定の輪郭
線で囲まれた領域を所定の色で塗りつぶすことが要求さ
れる。
<Prior Art> In a graphic display device, it is required to fill an area surrounded by a predetermined outline with a predetermined color.

かかる塗りつぶし図形の描画においては、輪郭線形状が
長方形や円等であれば比較的簡単に塗りつぶしができる
。しかし、輪郭線形状が任意形状の場合には塗り残しが
生じないように塗りつぶすのはかなり難しい。
In drawing such a filled-in figure, if the outline shape is a rectangle or a circle, it can be filled in relatively easily. However, if the contour line has an arbitrary shape, it is quite difficult to fill it without leaving any unfilled areas.

このため、塗り残しが生じないような塗りつぶし方法が
提案されている。第3図は従来の塗りつぶし図形描画方
法の説明図である。この方法においては、 (a1輪郭線11(第3図(Al参照)をディスプレイ
画面に特定の色(境界色)で描画する。
For this reason, a filling method that does not leave any unfilled areas has been proposed. FIG. 3 is an explanatory diagram of a conventional fill-in figure drawing method. In this method, (a1 contour line 11 (see FIG. 3 (see Al)) is drawn on the display screen in a specific color (boundary color).

(blついで、輪郭線11の内部に1つのポイントP、
 (第3図(B)参照)を定める。
(blThen, there is one point P inside the contour line 11,
(See Figure 3 (B)).

(c)シかる後、ポイントP、から水平方向に(第3図
(B)実線矢印参照)順次各絵素の色情報をチェックし
てゆき、指定された境界色を検出する迄塗りつぶす。尚
、塗りつぶしは境界色が検出される迄、各絵素に対応す
るイメージメモリの記憶域に塗りつぶし色(たとえば境
界色)を示す色情報を記憶させることで行う。
(c) After coloring, the color information of each pixel is sequentially checked in the horizontal direction from point P (see the solid line arrow in FIG. 3(B)), and the color information is filled in until the specified boundary color is detected. Note that filling is performed by storing color information indicating a filling color (for example, a boundary color) in a storage area of an image memory corresponding to each picture element until a boundary color is detected.

(dlそして、境界色を検出すれば、換言すれば境界に
到達すれば、以後垂直上方向に1絵素シフトする(第3
図(C)参照)。。
(dl) Then, if the boundary color is detected, in other words, if the boundary is reached, it will be shifted by one pixel vertically upward (the third
(See figure (C)). .

(81ついで水平逆方向に境界色を検出する迄(C1以
降の処理を繰り返す。
(81) Then, repeat the process from C1 until the boundary color is detected in the horizontally opposite direction.

(flステップ(cl〜telの処理を繰り返して垂直
上方向の塗りつぶしが終了すれば、以後ポイントP、か
ら第3図(C)の点線矢印方向にステップ(C1以降の
処理を繰り返して塗りつぶし図形の描画を行う。
(fl step (Once the filling in the vertical upward direction is completed by repeating the processing from cl to tel, step from point P in the direction of the dotted line arrow in Figure 3 (C) (repeating the processing from C1 onwards to fill in the Perform drawing.

〈発明が解決しようとしている問題点〉しかしながら、
かかる従来の方法では塗り癲しデータ算出のプロセスが
複雑となると共に、境界色のみを考慮して塗りつぶすも
のであるため境界色と同一色の線12(第3図(D)参
照)が輪郭線11に交差していると、該線12を境界と
判断して塗り残しを生じる。
<The problem that the invention is trying to solve> However,
In such a conventional method, the process of calculating fill-in data is complicated, and since the fill-in takes only the border color into consideration, the line 12 (see FIG. 3 (D)) of the same color as the border color is the outline. If the line 11 intersects with the line 11, the line 12 is determined to be a boundary and an unpainted area is left.

思上から本発明の目的は塗りつぶしデータの算出を簡略
化できろと共に、塗り残しが生じない塗りつぶし図形描
画方法を提供することである。
It is therefore an object of the present invention to provide a method for drawing a filled-in figure that can simplify the calculation of filled-in data and that does not leave any unfilled areas.

く問題点を解決するための手段〉 第1図は本発明を実現するグラフィックディスプレイ装
置のブロック図である。
Means for Solving the Problems> FIG. 1 is a block diagram of a graphic display device that implements the present invention.

1はディスプレイプロセッサ、2はCRT、3は1絵素
に対応して1つの記憶域3aを有するフレームバッファ
、4はフレームバッファカラ読み出されたデータの色情
報を境界情報に応じて変換するデータ変換部、5はルッ
クアップテーブルである。各記憶域3aは色情報記憶用
の3ビツト(第0〜第2ビツト)と対応する絵素が塗り
つぶし境界点かどうかを示す境界情報を記憶する1ビツ
ト (第3ピツト)の総計4ビツトで構成されている。
1 is a display processor, 2 is a CRT, 3 is a frame buffer having one storage area 3a corresponding to one picture element, and 4 is data for converting the color information of the read data according to the boundary information. The conversion unit 5 is a lookup table. Each storage area 3a has a total of 4 bits: 3 bits (0th to 2nd bits) for storing color information and 1 bit (3rd pit) for storing boundary information indicating whether the corresponding picture element is a filled boundary point. It is configured.

又、CRT2においてBLは塗りつぶし境界線、ARは
塗りつぶし図形である。
Further, in the CRT2, BL is a filled boundary line, and AR is a filled figure.

く作用〉 塗すつぶし境界線BL上の点に対応するフレームバッフ
ァ3の記憶域3aに塗りつぶし境界点であることを示す
境界情報を記憶させておく。
Effect> Boundary information indicating that the point is a fill-in boundary point is stored in the storage area 3a of the frame buffer 3 corresponding to the point on the fill-in boundary line BL.

データ変換部4はフレームバッファ3の各記憶域をCR
T2におけるビームのラスタースキャンと同期してスキ
ャンし、1水平ラインに関して奇数番目の塗りつぶし境
界点に対応する記憶域に記憶されている色を該奇数番目
の境界点から次の境界点迄の間CRT2に出力し、その
間を該色で塗りつぶす。
The data converter 4 converts each storage area of the frame buffer 3 into a CR.
Scanning is performed in synchronization with the raster scan of the beam at T2, and the color stored in the storage area corresponding to the odd-numbered filling boundary point for one horizontal line is transferred to the CRT2 from the odd-numbered boundary point to the next boundary point. , and fill in the space between them with the corresponding color.

〈実施例〉 第1図は本発明を実現するグラフィックディスプレイ装
置のブロック図である。
Embodiment FIG. 1 is a block diagram of a graphic display device implementing the present invention.

1はディスプレイプロセッサ、2はCRT、3は1絵素
に対応して1つの記憶域3aを有するフレームバッファ
、4は変換するデータ変換部、5はルックアップテーブ
ルである。
1 is a display processor, 2 is a CRT, 3 is a frame buffer having one storage area 3a corresponding to one picture element, 4 is a data conversion unit for conversion, and 5 is a lookup table.

フレームバッファ3の各記憶域3aは色情報記憶用の3
ビツト (第0〜第2ビツト)と対応する絵素が塗りつ
ぶし境界点かどうかを示す境界情報を記憶する1ピツト
 (第3ビツト)の総計4ビツトで構成されている。尚
、各記憶域に記憶されている4ビツトデータを以後ピク
セルデータと呼ぶ。
Each storage area 3a of the frame buffer 3 is used for storing color information.
It consists of a total of 4 bits: bits (0th to 2nd bits) and 1 pit (3rd bit) that stores boundary information indicating whether the corresponding picture element is a filled boundary point. Note that the 4-bit data stored in each storage area will be referred to as pixel data hereinafter.

データ変換部4はフレームバッファ3の各記憶域をCR
T2におけるビームのラスクースキャンと同期して水平
方向にスキャンし、1水平ラインに関して奇数番目の塗
りつぶし境界点に対応する記憶域に記憶されている色を
該奇数番目の境界点から次の境界点迄の間の色としてC
RT2に出力し、その間を該色で塗りつぶす。
The data converter 4 converts each storage area of the frame buffer 3 into a CR.
The beam is scanned horizontally in synchronization with the Lascous scan of the beam at T2, and the color stored in the storage area corresponding to the odd-numbered filling boundary point for one horizontal line is transferred from the odd-numbered boundary point to the next boundary point. C as a color between
Output to RT2 and fill in the space with the corresponding color.

尚、データ変換部4(よ奇数番目の境界点と次の境界点
の間を除き他の部分はフレームバッファ4の対応記憶域
に記憶されている色情報が指示する色で描画する。
Note that the data conversion unit 4 (except for the area between the odd-numbered boundary point and the next boundary point) draws the remaining portions in the color specified by the color information stored in the corresponding storage area of the frame buffer 4.

第2図はデータ変換部4の処理の流れ図である。FIG. 2 is a flowchart of the processing of the data converter 4.

以後、第1図及び第2図に従って本発明の塗りつぶし処
理を説明する。
Hereinafter, the filling process of the present invention will be explained according to FIGS. 1 and 2.

(1)まず、1→i、l−*jとする。ただし、jはス
キャンライン番号を示し、lは水平方向の絵素(記憶域
)の位置を示す。
(1) First, let 1→i, l−*j. However, j indicates a scan line number, and l indicates the position of a picture element (storage area) in the horizontal direction.

(2)ついで、0→F、O→Nとする。ただし、Fは現
スキャン位置が奇数番目の塗りつぶし境界点と次の境界
点の間に存在するかどうかを示すフラグであり、Nは1
スキヤンラインに関して現スキャン位置迄における塗り
つぶし境界点の数である。
(2) Next, 0→F, O→N. However, F is a flag indicating whether the current scan position exists between an odd-numbered filled boundary point and the next boundary point, and N is 1
This is the number of filled boundary points on the scan line up to the current scan position.

(3)ついで、第jスキャンライン(水平走査ライン)
の第1番目の絵素に対応する記憶域からピクセルデータ
を読み取る。
(3) Next, the jth scan line (horizontal scan line)
The pixel data is read from the storage area corresponding to the first picture element.

(4)ピクセルデータの第3ビツトの内容(境界情報)
をチェックして該ピクセルが塗りつぶし境界点かどうか
を判別する。尚、境界情報が「1」であれば(第1図の
フレームバッファ3内における口参照)境界点であり、
「0」であれば境界でない。
(4) Contents of the third bit of pixel data (boundary information)
is checked to determine whether the pixel is a filled boundary point. Note that if the boundary information is "1" (see the mouth in the frame buffer 3 in FIG. 1), it is a boundary point,
If it is "0", it is not a boundary.

(5)境界点でなければ、F=1かどうかをチェックす
る。すなわち、現ピクセルが奇数番目の塗りつぶし境界
点と次の境界点の間に存在するかどうかをチェックする
。たt!シ、F=1であれば該境界点間に存在し、F=
Oであれば存在しない。
(5) If it is not a boundary point, check whether F=1. That is, it is checked whether the current pixel exists between the odd filled boundary point and the next boundary point. Tat! If F=1, it exists between the boundary points, and F=
If it is O, it does not exist.

(6)存在しなければ(F=0であれば)、ピクセルデ
ータの下位3ビツト(第O〜第2ビット)である色情報
が指示する赤、青、緑の色成分データをルックアップテ
ーブル5から読出し、各色成分データをCRT2に入力
し該当ピクセル部分を所定色で描画する。
(6) If it does not exist (if F = 0), look up the red, blue, and green color component data indicated by the color information that is the lower 3 bits (0th to 2nd bits) of the pixel data. 5, each color component data is input to the CRT 2, and the corresponding pixel portion is drawn in a predetermined color.

(7)ついで、1スキヤンラインの変換処理が終了した
かどうをチェックする。
(7) Next, check whether the conversion process for one scan line has been completed.

(8)終了してなければi + 1→lにより1を1歩
進し、以後ステップ(3)以降の処理を繰り返す。
(8) If not completed, increment 1 by one step by i + 1→l, and repeat the process from step (3) onwards.

(9)一方、ステップ(7)のチェックにおいて、1ス
キヤンラインの変換処理が終了していれば全スキャンラ
インの変換処理が終了しているかどうかをチェックし、
全スキャンラインの変換処理が終了していれば以後ステ
ップ(1)以降の処理を繰り返す。
(9) On the other hand, in the check in step (7), if the conversion process for one scan line has been completed, check whether the conversion process for all scan lines has been completed;
If the conversion processing for all scan lines has been completed, the processing from step (1) onward is repeated.

(I[01,かじ、全スキャンラインの処理が終了して
いなければ1→i、j+1→Jとし以後ステップ(2)
以降の処理を繰り返す。
(I[01, Kaji, if all scan lines have not been processed, 1→i, j+1→J, and then step (2)
Repeat the following process.

(111一方、ステップ(4)の判断において境界情報
が「1」であれば(現ビクセルが塗りつぶし境界点であ
れば)、N+1−Nにより境界点数をカウントアツプす
る。
(111) On the other hand, if the boundary information is "1" in the judgment in step (4) (if the current pixel is a filled-in boundary point), the number of boundary points is counted up by N+1-N.

(13Nをカウントアツプ後、Nが奇数か、偶数かをチ
ェックする。
(After counting up 13N, check whether N is odd or even.

(+3) Nが奇数であれば、1−Fとする。(+3) If N is an odd number, set it as 1-F.

(14)ついで、ピクセルデータの下位3ビツトの色情
報Cを記憶する。
(14) Next, the color information C of the lower three bits of the pixel data is stored.

(151Lかる後、色情報Cが指示する赤、青、緑の色
成分データをルックアップテーブル5から読出し、各色
成分データをCRT2に入力し該当ピクセル部分を所定
色で描画する。以後ステップ(7)に飛び以降の処理を
繰り返す。
(After 151L, the red, blue, and green color component data indicated by the color information C are read from the lookup table 5, each color component data is input to the CRT 2, and the corresponding pixel portion is drawn in a predetermined color. Thereafter, step (7) ) and repeat the process.

尚、ステップ(5)においてF=1となれば第四ステッ
プの処理が行われろ。この結果、奇数番目の境界点から
次の境界点迄の間が記憶されている色(奇数番目の境界
点の色)で描画される。
Incidentally, if F=1 in step (5), the process of the fourth step is performed. As a result, the area between the odd-numbered boundary point and the next boundary point is drawn in the stored color (the color of the odd-numbered boundary point).

(I[9一方、ステップ(IEにおいてNが偶数であれ
ば0→Fとする。
(I[9 On the other hand, if N is an even number in step (IE), 0→F.

(1?1ついで、現ピクセルデータの下位3ビツトであ
る色情報が指示する赤、青、緑の色成分データをルック
アップテーブル5から読出し、各色成分データをCRT
2に入力し該当ピクセル部分を所定色で描画する。以後
、ステップ(7)以降の処理が繰り返される。
(1?1) Next, the red, blue, and green color component data indicated by the color information, which is the lower three bits of the current pixel data, are read from the lookup table 5, and each color component data is transferred to the CRT.
2 and draw the corresponding pixel part in a predetermined color. Thereafter, the processing from step (7) onwards is repeated.

〈発明の効果〉 思上本発明によれば、塗りつぶし境界点に対応するフレ
ームバッファの記憶域に塗りつぶし境界点であることを
示す境界情報を記憶させておき、該フレームバッファの
各記憶域をビームのラスタースキャンと同期してスキャ
ンし、1水平ラインに関して奇数番目の塗りつぶし境界
点に対応する記憶域に記憶されている色情報が指示する
色で該奇数番目の境界点から次の境界点迄を塗りつぶす
ように構成したから、塗りつぶしデータを容易に求める
ことができ、しかも塗り残しが生しることはない。
<Effects of the Invention> According to the present invention, boundary information indicating that the frame buffer is a filled boundary point is stored in a storage area of a frame buffer corresponding to a filled boundary point, and each storage area of the frame buffer is scan in synchronization with the raster scan of 1 horizontal line, and from the odd-numbered border point to the next border point with the color indicated by the color information stored in the storage area corresponding to the odd-numbered filled border point. Since it is configured to be filled in, the filled data can be easily obtained, and there will be no unfilled areas.

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

第1図は本発明を実現するグラフィックディスプレイ装
置のブロック図、 第2図は本発明の処理の流れ図、 第3図は従来方法説明図である。 1・・ディスプレイプロセッサ、 2・・CRT。 3・・フレームバッファ、 4・・データ変換部、 5・・ルックアップテーブル 特許出願人        ファナック株式会社代理人
          弁理士  wi藤千幹第3図
FIG. 1 is a block diagram of a graphic display device that implements the present invention, FIG. 2 is a flowchart of the process of the present invention, and FIG. 3 is an explanatory diagram of a conventional method. 1. Display processor, 2. CRT. 3. Frame buffer, 4. Data conversion section, 5. Lookup table patent applicant Fanuc Corporation agent Patent attorney wi Fuji Chiki Figure 3

Claims (1)

【特許請求の範囲】 1絵素に対応して1つの記憶域を有するフレームバッフ
ァに画像を記憶させ、該フレームバッファから画像を読
み取ってディスプレイ画面に表示させるディスプレイ装
置における塗りつぶし図形描画方法において、 塗りつぶし境界点に対応するフレームバッファの記憶域
に塗りつぶし境界点であることを示す境界情報を記憶さ
せておき、 該フレームバッファの各記憶域をビームのラスタースキ
ャンと同期してスキャンし、 1水平ラインに関して奇数番目の塗りつぶし境界点に対
応する記憶域に記憶されている色情報が指示する色で該
奇数番目の境界点から次の境界点迄を塗りつぶすことを
特徴とする塗りつぶし図形描画方法。
[Scope of Claims] A filling figure drawing method in a display device that stores an image in a frame buffer having one storage area corresponding to one picture element, reads the image from the frame buffer and displays it on a display screen, comprising: Boundary information indicating that the boundary point is a filled boundary point is stored in the storage area of the frame buffer corresponding to the boundary point, and each storage area of the frame buffer is scanned in synchronization with the raster scan of the beam, and for one horizontal line. A filling figure drawing method characterized in that the area from the odd-numbered boundary point to the next boundary point is filled with a color specified by color information stored in a storage area corresponding to the odd-numbered boundary point.
JP20638486A 1986-09-02 1986-09-02 Painting-out graphic drawing method Pending JPS6361383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20638486A JPS6361383A (en) 1986-09-02 1986-09-02 Painting-out graphic drawing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20638486A JPS6361383A (en) 1986-09-02 1986-09-02 Painting-out graphic drawing method

Publications (1)

Publication Number Publication Date
JPS6361383A true JPS6361383A (en) 1988-03-17

Family

ID=16522448

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20638486A Pending JPS6361383A (en) 1986-09-02 1986-09-02 Painting-out graphic drawing method

Country Status (1)

Country Link
JP (1) JPS6361383A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009196568A (en) * 2008-02-22 2009-09-03 Kanto Auto Works Ltd Automobile door structure

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009196568A (en) * 2008-02-22 2009-09-03 Kanto Auto Works Ltd Automobile door structure

Similar Documents

Publication Publication Date Title
US4481594A (en) Method and apparatus for filling polygons displayed by a raster graphic system
JPS62125292U (en)
US4607340A (en) Line smoothing circuit for graphic display units
US7071951B2 (en) Image processor
US6215501B1 (en) Method and filling a polygon and recording medium
JPS6361383A (en) Painting-out graphic drawing method
JP3295561B2 (en) Image processing device
US6529205B2 (en) Image data display apparatus in which image data are displayed on terminal display unit and NTSC system display unit
JPS62231385A (en) Drawing method for painting out graphic
JPH03236097A (en) Method and device for image display
JPS62168282A (en) Graphic drawing system
JPS58136088A (en) Image display
JPS623380A (en) Smoothing system for picture
JP2626239B2 (en) Memory diagnostic device for look-up table
JP3262880B2 (en) Waveform judgment method
JPH06324672A (en) Picture processor
JPS61219989A (en) Image display method
JPH02183327A (en) Display device
JPH0462395B2 (en)
JPS60162379A (en) Control method for picture memory access
JPH02226197A (en) Crt display controller
JPS6371891A (en) Liquid crystal panel driving circuit
JPH01114272A (en) Frame memory access method
JPS62224867A (en) Graphic drawing method
JPH02211522A (en) Graphic display device