JPH02275592A - Paint-out image processor - Google Patents

Paint-out image processor

Info

Publication number
JPH02275592A
JPH02275592A JP1097921A JP9792189A JPH02275592A JP H02275592 A JPH02275592 A JP H02275592A JP 1097921 A JP1097921 A JP 1097921A JP 9792189 A JP9792189 A JP 9792189A JP H02275592 A JPH02275592 A JP H02275592A
Authority
JP
Japan
Prior art keywords
intersection
boundary
horizontal line
line
horizontal
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
JP1097921A
Other languages
Japanese (ja)
Inventor
Toshiaki Kitsuki
橘木 俊明
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP1097921A priority Critical patent/JPH02275592A/en
Publication of JPH02275592A publication Critical patent/JPH02275592A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To rapidly execute paint-out image processing by calculating dots on a boundary in stead of the calculation of an intersecting point with the boundary in eash horizontal line and judging whether the intersecting point is an intersecting point between the horizontal line and the boundary or not. CONSTITUTION:A boundary data storing part 1 stores the coordinates of the end points P0 to P7 of straight line groups constituting the boundary and an intersecting point calculating part 2 receives the coordinates of both the end points of one straight line of the boundary from the storage part 1, calculates the number of dots on the straight line by Bresenham's DDA (digital differential analysis) method and stores the calculated result in an intersecting point data storing part 3. A sorting processing part 4 rearranges the X coordinate values of the intersecting points sorted in respective horizontal lines of the storage part 3 in the ascending order. A horizontal imaging part 5 reads out the X coordinates of the intersecting point of the boundary with one horizontal line from the storage part 3, checks the part to be imaged included in the paint-out imaging area of the horizontal line and stores the imaged part in a frame buffer 6. Thus, the image processing can be rapidly executed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はコンピュータグラフィックなどに適用される画
面の塗りつぶし描画処理装置に関し、特に高速塗りつぶ
し処理可能な塗りつぶし処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a screen fill drawing processing device applied to computer graphics, and more particularly to a fill processing device capable of high-speed fill processing.

〔従来の技術〕[Conventional technology]

従来の塗りつぶし処理として、第4図の流れ図があり、
第5図はこの塗りつぶし処理を行う座標図を示す、この
XY座標系で塗りつぶしを行う領域の境界線端点Po−
P、の間が塗りつぶされるとし、この塗りつぶし領域と
水平(Y)軸の値y5との交点をs、−36としそのX
軸の値をX!〜X6とする。この塗りつぶり処理は、各
水平線ごとに以下の処理を行う。
As for the conventional filling process, there is a flowchart shown in Figure 4.
FIG. 5 shows a coordinate diagram for performing this filling process. The boundary line end point Po-
Suppose that the area between P is filled in, and the intersection of this filled area and the value y5 on the horizontal (Y) axis is s, -36, and its
Axis value is X! ~X6. In this filling process, the following process is performed for each horizontal line.

まず、ステップ101で水平面Vsと境界線との交点S
!、S2.・・・、S6を算出する。この交点算出は、
境界線の構成要素である直線や円弧などの方程式と、水
平線の方程式3’= ysを連立方程式として解くこと
によって行われ、浮動小数点演算が不可欠である。
First, in step 101, the intersection S of the horizontal plane Vs and the boundary line is
! , S2. ..., calculate S6. This intersection calculation is
This is done by solving the equations for straight lines and arcs, which are the constituent elements of the boundary line, and the horizontal line equation 3'=ys as simultaneous equations, and floating point calculations are essential.

次に、第2のステップ110でその算出した交点をX座
標値の大きさの順(X6〜XI)に並びかえ、その並び
かえた交点X座標のX 1 + x2・・・、x(5か
ら水平線の塗りつぶし領域内部にある描画すべき部分の
線分SI S2 + s、s4゜5586を求め、ステ
ップ104でその描画すべき部分に当たるフレームバッ
ファ上のドツトをセットし、つまりフレームバッファに
描画する。以上の処理をステップ105で塗りつぶし領
域と交わる全ての水平線に対して行うことにより塗りつ
ぶし処理を行うものであった。
Next, in the second step 110, the calculated intersection points are rearranged in the order of the size of the X coordinate value (X6 to XI), and the X coordinates of the rearranged intersection points are X 1 + x2 . From this, find the line segment SI S2 + s, s4°5586 of the part to be drawn inside the filled area of the horizontal line, and in step 104 set the dot on the frame buffer corresponding to the part to be drawn, that is, draw it in the frame buffer. The filling process is performed by performing the above process on all horizontal lines that intersect with the filling area in step 105.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来の塗りつぶし処理は、各水平線ごとに境界
線との交点を算出しており、この交点算出には境界線の
構成要素である直線や円弧などの方程式と、水平線の方
程式’y’=’Jsを連立方程式として解くことによっ
て行われ、浮動小数点演算が不可欠となっているので、
交点の算出に時間が多くかかり、処理の高速化が困難で
あるという欠点がある。
The conventional filling process described above calculates the intersection point with the boundary line for each horizontal line, and this intersection point calculation uses equations for straight lines and arcs that are the constituent elements of the boundary line, and the horizontal line equation 'y' = 'Js is solved as a system of equations, and floating point operations are essential, so
The drawback is that it takes a lot of time to calculate the intersection points, making it difficult to speed up the processing.

本発明の目的は、このような欠点を除き、水平線ごとに
境界線との交点を算出する代わりに境界線上のドツトを
算出し、水平線と境界線との交点であるかを判断し、こ
れらドツトの算出には、整数の加減算のみで算出するこ
とのできるアルゴリズムが利用できるため、交点算出が
高速に出来ると共に、塗りつぶし描画処理を高速にでき
る塗りつぶし描画装置を提供することにある。
The purpose of the present invention is to eliminate such drawbacks, and instead of calculating the intersection point with the boundary line for each horizontal line, calculate the dots on the boundary line, judge whether it is an intersection between the horizontal line and the boundary line, and calculate the points of intersection of these dots. An object of the present invention is to provide a fill-in drawing device that can calculate intersection points at high speed and perform fill-in drawing processing at high speed, since an algorithm that can perform calculations only by adding and subtracting integers can be used for calculation.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の塗りつぶし描画処理装置の構成は、描画すべき
平面上にベクタデータで与えられた直線1円弧で構成さ
れる境界線で囲まれた領域を塗りつぶす塗りつぶし描画
処理装置において、前記境界線の境界線データを格納す
る境界線データ格納部と、前記境界線と前記描画平面座
標における水平線との交点を算出する交点算出部と、前
記交点のデータを格納する交点格納部と、この交点格納
部の水平線ごとに分類されている交点の座標値をその数
値順に格納順序を並びかえるソート処理部と、前記交点
データから水平線の塗りつぶし描画すべき部分を抽出す
る水平線描画部と、この水平線描画部からの描画すべき
画像データを格納するフレームバッファとを備えること
を特徴とする。
The configuration of the fill-in drawing processing device of the present invention is such that the fill-in drawing processing device fills in an area surrounded by a boundary line made up of a straight line and one circular arc given by vector data on a plane to be drawn. a boundary line data storage unit that stores line data; an intersection calculation unit that calculates an intersection point between the boundary line and a horizontal line in the drawing plane coordinates; an intersection storage unit that stores data of the intersection point; A sort processing unit that rearranges the storage order of the coordinate values of intersection points classified for each horizontal line in numerical order, a horizontal line drawing unit that extracts the portion of the horizontal line that should be filled in and drawn from the intersection data, and a It is characterized by comprising a frame buffer that stores image data to be drawn.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例を示すブロック図、第2図は
本実施例の塗りつぶし処理の流れ図、第31図(a>、
(b)は塗りつぶし領域の座標図およびその説明図であ
る。本実施例は、境界線データ格納部1と、交点算出部
2と、交点データ格納部3と、ソート処理部4と、水平
線描画部5と、フレームバッファ6とを備え、直線群で
囲まれた領域を塗りつぶす塗りつぶし処理を行うもので
あり、本実施例では境界線が直線で構成されている。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a flowchart of the filling process of this embodiment, and FIG. 31 (a>,
(b) is a coordinate diagram of a filled area and an explanatory diagram thereof. This embodiment includes a boundary line data storage section 1, an intersection calculation section 2, an intersection data storage section 3, a sort processing section 4, a horizontal line drawing section 5, and a frame buffer 6. In this embodiment, the boundary line is a straight line.

境界線データ格納部1は、境界線を構成する直線群の端
点Po−P、の座標を格納する。交点算出部2は境界線
データ格納部1から境界線の一直線の両端点の座標を受
取り、プレゼンハム(Bresenham)のD D 
A (Di3ital Differentia1人n
alysis)手法により直線上のドツト(第3図(a
>の正方形)を計算する。
The boundary line data storage unit 1 stores the coordinates of end points Po-P of a group of straight lines forming the boundary line. The intersection calculation unit 2 receives the coordinates of both end points of a straight line of the boundary line from the boundary line data storage unit 1, and calculates the coordinates of the two end points of a straight line of the boundary line, and
A (Di3ital Differentia1 person n
dots on a straight line (Fig. 3(a)
> square).

この時の計算は、直線を整数値しかとり得ない座標系上
に描いて行うので、直線を描画するために構成する各ド
ツト座標データは整数系として表される。算出されたド
ツトは、第3図(a)の線分po p、のように、この
直線の傾きが小さいと、水平方向に2個以上並ぶことが
あり、この場合は、並んだドツトの中の1つを交点とし
、その他のドツトは交点でないとする必要があるため交
点算出部2はこの処理も合わせて行う。この交点算出部
2は、交点とされたドツトの座標データを交点データ格
納部3に出力する。
This calculation is performed by drawing a straight line on a coordinate system that can take only integer values, so each dot coordinate data configured to draw a straight line is expressed as an integer system. If the slope of this straight line is small, as in the line segment pop in Fig. 3(a), two or more of the calculated dots may be lined up in the horizontal direction, and in this case, two or more dots may be lined up in the horizontal direction. Since it is necessary to set one of the dots as an intersection and to set the other dots as non-intersections, the intersection calculation unit 2 also performs this process. The intersection calculation section 2 outputs coordinate data of the dots determined as intersection points to the intersection data storage section 3.

交点データ格納部3は、交点算出部2より入力された交
点データを格納する。交点データの格納は、第3図(b
)のy値配列Aのようにyの値ごとに、つまり水平線ご
とに分類して行われる。
The intersection data storage unit 3 stores the intersection data input from the intersection calculation unit 2. The storage of intersection data is shown in Figure 3 (b
) is classified by y value, that is, by horizontal line.

ソート処理部4は、交点データ格納部3の水平線ごとに
分類されている交点のX座標値を、第3図(b)の交点
チェーンBのように小さい順に並び変える。水平線描画
部5は、交点データ格納部3から1つの水平線に対する
境界線の交点のX座標を読み出し、その水平線の塗りつ
ぶし領域内部にある描画すべき部分を調べ(第3図(a
)のし)、その描画すべき部分をフレームバッファ6に
描画する。境界線と交わる全ての水平線について、すな
わち第3図(a)の線分P−Pb。
The sort processing unit 4 rearranges the X coordinate values of the intersections classified for each horizontal line in the intersection data storage unit 3 in descending order as in the intersection chain B in FIG. 3(b). The horizontal line drawing unit 5 reads out the X coordinate of the intersection of the boundary line with respect to one horizontal line from the intersection data storage unit 3, and examines the portion to be drawn within the filled area of the horizontal line (see FIG. 3(a)).
) and draws the part to be drawn in the frame buffer 6. For all horizontal lines intersecting the boundary line, ie, line segment P-Pb in FIG. 3(a).

PcPd・・・について、水平線描画部5によるフレー
ムバッファ6への描画を行なうことによって塗りつぶし
処理が終了する。
As for PcPd..., the horizontal line drawing unit 5 draws on the frame buffer 6, thereby completing the filling process.

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

以上説明したように本発明は、交点を水平線ごとに算出
するのではなく、−括して交点を算出することにより、
BresenhamのDDAや円弧発生のDDAなどの
アルゴリズムを利用することができ、塗りつぶし処理を
高速化できるという効果がある。
As explained above, the present invention does not calculate intersection points for each horizontal line, but by calculating intersection points collectively.
Algorithms such as Bresenham's DDA and arc generation DDA can be used, which has the effect of speeding up the filling process.

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

第1図は本発明の一実施例を示す機能ブロック図、第2
図は本実施例の塗りつぶり処理の流ね図、第3図(a)
、(b)は本実施例の交点算出方法を説明する座標図お
よびデータ配置図、第・1図は従来の塗りつぶし処理の
一例の流れ図、第5図は第4図の塗りつぶし処理を説明
する座標図である。 1・・・境界線データ格納部、2・・・交点算出部、3
・・・交点データ格納部、4・・・ソート処理部、5・
・・水平線描画部、6・・・フレームバッファ、101
〜105.110・・・処理ステップ。 代理人 弁理士  内 原  晋 招3図 僧 図
Fig. 1 is a functional block diagram showing one embodiment of the present invention;
The figure is a flowchart of the filling process in this embodiment, Figure 3 (a)
, (b) are coordinate diagrams and data arrangement diagrams explaining the intersection point calculation method of this embodiment, Figure 1 is a flowchart of an example of conventional filling processing, and Figure 5 is a coordinate diagram explaining the filling processing of Figure 4. It is a diagram. 1... Boundary line data storage unit, 2... Intersection calculation unit, 3
... intersection data storage unit, 4... sorting processing unit, 5.
...Horizontal line drawing section, 6...Frame buffer, 101
~105.110...Processing step. Agent Patent Attorney Shinsho Uchihara 3 Monks

Claims (1)

【特許請求の範囲】[Claims] 描画すべき平面上にベクタデータで与えられた直線、円
弧で構成される境界線で囲まれた領域を塗りつぶす塗り
つぶし描画処理装置において、前記境界線の境界線デー
タを格納する境界線データ格納部と、前記境界線と前記
描画平面座標における水平線との交点を算出する交点算
出部と、前記交点のデータを格納する交点格納部と、こ
の交点格納部の水平線ごとに分類されている交点の座標
値をその数値順に格納順序を並びかえるソート処理部と
、前記交点データから水平線の塗りつぶし描画すべき部
分を抽出する水平線描画部と、この水平線描画部からの
描画すべき画像データを格納するフレームバッファとを
備えることを特徴とする塗りつぶし描画処理装置。
In a fill drawing processing device that fills in an area surrounded by a boundary line consisting of straight lines and circular arcs given by vector data on a plane to be drawn, a boundary line data storage unit that stores boundary line data of the boundary line; , an intersection calculation unit that calculates an intersection between the boundary line and a horizontal line in the drawing plane coordinates; an intersection storage unit that stores data on the intersection; and coordinate values of the intersection that are classified for each horizontal line in the intersection storage unit. a sort processing unit that rearranges the storage order in numerical order; a horizontal line drawing unit that extracts a portion of the horizontal line to be filled in and drawn from the intersection data; and a frame buffer that stores image data to be drawn from the horizontal line drawing unit. A fill drawing processing device comprising:
JP1097921A 1989-04-17 1989-04-17 Paint-out image processor Pending JPH02275592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1097921A JPH02275592A (en) 1989-04-17 1989-04-17 Paint-out image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1097921A JPH02275592A (en) 1989-04-17 1989-04-17 Paint-out image processor

Publications (1)

Publication Number Publication Date
JPH02275592A true JPH02275592A (en) 1990-11-09

Family

ID=14205159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1097921A Pending JPH02275592A (en) 1989-04-17 1989-04-17 Paint-out image processor

Country Status (1)

Country Link
JP (1) JPH02275592A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04195093A (en) * 1990-11-28 1992-07-15 Hitachi Ltd Character plotting method
WO2010134124A1 (en) * 2009-05-19 2010-11-25 三菱電機株式会社 Vector graphic drawing device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04195093A (en) * 1990-11-28 1992-07-15 Hitachi Ltd Character plotting method
WO2010134124A1 (en) * 2009-05-19 2010-11-25 三菱電機株式会社 Vector graphic drawing device
JP5159949B2 (en) * 2009-05-19 2013-03-13 三菱電機株式会社 Vector drawing equipment

Similar Documents

Publication Publication Date Title
JP3240447B2 (en) Image processing device
US4631690A (en) Multiprocessor computer system for forming a color picture from object elements defined in a hierarchic data structure
JPS6324419A (en) Composite document processor
EP0435492B1 (en) Method and system for displaying a three-dimensional object
JPH0660173A (en) Method and apparatus for reducing picture
KR100190674B1 (en) Sorting circuit
JPH02275592A (en) Paint-out image processor
JP2676116B2 (en) Image data processing method and apparatus
JPS6365151B2 (en)
US4945497A (en) Method and apparatus for translating rectilinear information into scan line information for display by a computer system
JPH01276380A (en) Picture processor
JPH0285978A (en) Method for processing hidden-surface of solid
JP2903514B2 (en) High-speed drawing method
EP0838786A1 (en) Method of producing polygon data, image processor to which the method is applied, and expanded function board
JPS62285188A (en) Display method for segment
JPH0350686A (en) Graphic processing system
JPH04162092A (en) Character generating system
JP2787497B2 (en) Graphic drawing method and apparatus
JPH01150989A (en) Graphic display device
JPH02208784A (en) Image forming method
JPH0315193B2 (en)
JPS61256483A (en) Painting out circuit of sector graphic
JP2000242802A (en) Graphic processor
JPH02130686A (en) Graphic processor
JPS62271187A (en) Vector drawing system