JP3249096B2 - Figure filling device - Google Patents
Figure filling deviceInfo
- Publication number
- JP3249096B2 JP3249096B2 JP14485799A JP14485799A JP3249096B2 JP 3249096 B2 JP3249096 B2 JP 3249096B2 JP 14485799 A JP14485799 A JP 14485799A JP 14485799 A JP14485799 A JP 14485799A JP 3249096 B2 JP3249096 B2 JP 3249096B2
- Authority
- JP
- Japan
- Prior art keywords
- dot
- vector
- attribute
- vertex
- dots
- 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 - Fee Related
Links
Landscapes
- Image Generation (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、コンピュータグラ
フィックスにおいて、与えられた図形の輪郭を表す複数
のドットにそれぞれ輪郭色データを設定し、かつ前記図
形の内部を表す複数のドットにそれぞれ内部色データを
設定するための図形塗りつぶし装置に関するものであ
る。ここにいう「コンピュータグラフィックス」は、C
RTディスプレイ、液晶ディスプレイなどによる画像の
生成に限らず、プリンタ装置などによるハードコピーの
生成をも意味する。「図形」は、2次元及び3次元図形
に限らず、文字、記号などのその他の図形要素を含む。
「色」は、有彩色に限らず無彩色を含む。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to computer graphics, in which contour color data is set for a plurality of dots representing the contour of a given figure, and an internal color is assigned to a plurality of dots representing the inside of the figure. The present invention relates to a figure filling device for setting data. "Computer graphics" here means C
Not only generation of an image by an RT display, a liquid crystal display or the like, but also generation of a hard copy by a printer or the like. "Graphics" include not only two-dimensional and three-dimensional figures, but also other graphic elements such as characters and symbols.
“Color” includes not only chromatic colors but also achromatic colors.
【0002】[0002]
【従来の技術】特開平6−162212号公報には、い
わゆるエッジフィルアルゴリズムを採用した図形塗りつ
ぶし装置の一例が開示されている。この装置によれば、
ある多角形の近傍に1本の基準線を設定し、多角形の複
数の辺に順次着目して、着目辺と基準線とで定義される
台形領域内の複数のドットを処理することで、最終的に
当該多角形の塗りつぶし結果を得るようになっている。
ところが、各ドットに対して多数回の処理を要するた
め、多角形の頂点数が増えれば増えるほど処理速度が遅
くなることが知られている。2. Description of the Related Art Japanese Patent Application Laid-Open No. Hei 6-162212 discloses an example of a graphic painting apparatus employing a so-called edge fill algorithm. According to this device,
By setting one reference line in the vicinity of a certain polygon, sequentially focusing on a plurality of sides of the polygon, and processing a plurality of dots in a trapezoidal region defined by the side of interest and the reference line, Finally, the result of filling the polygon is obtained.
However, since it is necessary to perform a large number of processes for each dot, it is known that the processing speed becomes slow as the number of vertices of the polygon increases.
【0003】日本国特許第2681367号公報及び特
開平5−20468号公報には、いわゆるスキャンアル
ゴリズムを採用した図形塗りつぶし装置の例がそれぞれ
開示されている。これらの装置によれば、ある座標軸方
向の複数のスキャンラインに順次着目して、着目スキャ
ンライン上の複数のドットを処理することで、最終的に
当該図形の塗りつぶし結果を得るようになっている。[0003] Japanese Patent No. 2681367 and Japanese Patent Application Laid-Open No. 5-20468 each disclose examples of a figure filling apparatus employing a so-called scan algorithm. According to these apparatuses, by sequentially focusing on a plurality of scan lines in a certain coordinate axis direction and processing a plurality of dots on the focused scan line, a result of finally filling the figure is obtained. .
【0004】[0004]
【発明が解決しようとする課題】上記特許第26813
67号公報に開示された装置によれば、例えば2重の輪
郭ループを有するドーナツ型の図形の場合には、一方の
輪郭ループの向きを時計回りに、他方の輪郭ループの向
きを反時計回りにそれぞれ設定しなければならないとい
う制約があった(同公報の第2図(a)及び(b)参照)。The above-mentioned Patent No. 26813
According to the device disclosed in Japanese Patent No. 67, for example, in the case of a donut-shaped figure having a double contour loop, the direction of one contour loop is turned clockwise, and the direction of the other contour loop is turned counterclockwise. (See FIGS. 2 (a) and 2 (b) of the publication).
【0005】また、上記特開平5−20468号公報に
開示された装置によれば、輪郭色データと内部色データ
とを互いに異ならせたい場合には、図形の内部を表す複
数のドットの全てに内部色データを設定し終えた後に、
当該図形の輪郭を表す複数のドットの各々に輪郭色デー
タを設定しなければならないという制約があった(同公
報の第23図及び第24図参照)。According to the apparatus disclosed in Japanese Patent Laid-Open Publication No. Hei 5-20468, when it is desired to make the outline color data and the internal color data different from each other, all of the plurality of dots representing the inside of the figure are displayed. After setting the internal color data,
There is a restriction that outline color data must be set for each of a plurality of dots representing the outline of the figure (see FIGS. 23 and 24 of the publication).
【0006】本発明の目的は、スキャンアルゴリズムを
採用した図形塗りつぶし装置における上記従来の諸制約
を解消することにある。SUMMARY OF THE INVENTION An object of the present invention is to eliminate the above-mentioned various restrictions in a graphic painting apparatus employing a scanning algorithm.
【0007】[0007]
【課題を解決するための手段】上記目的を達成するた
め、本発明は、ある座標軸方向の任意のスキャンライン
上に存在する垂直属性ドットの数が必ず0又は偶数にな
るように、与えられた図形の輪郭を表す複数のドットの
全てに各々垂直ドット又は水平ドットの属性を割り当て
るための手段と、垂直ドット又は水平ドットの属性が割
り当てられたドットの全てに輪郭色データを設定し、か
つ前記座標軸方向の複数のスキャンラインに順次着目し
て、前記着目スキャンライン上の水平属性ドットを除く
全ドットのうち奇数番目の垂直属性ドットと次の偶数番
目の垂直属性ドットとの間に位置するドットの全てに内
部色データを設定するための手段とを備えた構成を採用
したものである。In order to achieve the above object, the present invention is provided so that the number of vertical attribute dots existing on an arbitrary scan line in a certain coordinate axis direction is always 0 or even. Means for assigning vertical or horizontal dot attributes to all of the plurality of dots representing the outline of the figure, and setting the outline color data to all of the dots to which the vertical or horizontal dot attributes have been assigned, and By sequentially focusing on a plurality of scan lines in the coordinate axis direction, a dot located between the odd-numbered vertical attribute dot and the next even-numbered vertical attribute dot among all the dots except the horizontal attribute dot on the scan line of interest And a means for setting internal color data for all of the above.
【0008】具体的に説明すると、本発明は、与えられ
た図形の複数の頂点ドットの各々のX及びY座標を含む
頂点座標情報を該複数の頂点ドットの接続の順番に合わ
せて記憶し、前記頂点座標情報を供給するための頂点座
標情報供給ユニットと、前記複数の頂点ドットに順次着
目して、着目頂点ドットを終点としかつ1つ前の頂点ド
ットを始点とする第1のベクトルの方向と、当該着目頂
点ドットを始点としかつ次の頂点ドットを終点とする第
2のベクトルの方向とを前記頂点座標情報から見出し、
かつ当該第1及び第2のベクトルの方向に応じて垂直ド
ット又は水平ドットの属性を当該着目頂点ドットに割り
当てるための頂点処理ユニットと、前記複数の頂点ドッ
トのうちの互いに隣接する2個の頂点ドットに順次着目
して、着目2頂点ドットを結ぶ輪郭線分上の複数のエッ
ジドットの各々のX及びY座標を前記頂点座標情報から
生成するための輪郭線分生成ユニットと、各輪郭線分上
の前記複数のエッジドットに順次着目して、着目エッジ
ドットのY座標が1つ前のドットのY座標と異なりかつ
当該着目エッジドットのY座標が当該輪郭線分の終点に
位置する頂点ドットのY座標と異なる場合には当該着目
エッジドットに垂直ドットの属性を、その他の場合には
当該着目エッジドットに水平ドットの属性をそれぞれ割
り当てるための輪郭線分処理ユニットと、前記頂点処理
ユニット及び前記輪郭線分処理ユニットにより垂直ドッ
ト又は水平ドットの属性が割り当てられたドットの全て
に輪郭色データを設定し、かつX座標軸方向の複数のス
キャンラインに順次着目して、着目スキャンライン上の
水平属性ドットを除く全ドットのうち奇数番目の垂直属
性ドットと次の偶数番目の垂直属性ドットとの間に位置
するドットの全てに内部色データを設定するための色デ
ータ設定ユニットとを備えた構成を採用したものであ
る。[0008] Specifically, the present invention includes the X and Y coordinates of each of a plurality of vertex dots of a given figure.
Vertex coordinate information is matched to the order of connection of the plurality of vertex dots.
And a vertex coordinate information supply unit for supplying the vertex coordinate information, and a plurality of vertex dots sequentially focused on, a vertex dot of interest as an end point, and a vertex dot immediately preceding as a start point. The direction of the vector of No. 1 and the direction of the second vector starting from the target vertex dot and ending at the next vertex dot are found from the vertex coordinate information,
A vertex processing unit for assigning an attribute of a vertical dot or a horizontal dot to the vertex of interest according to the directions of the first and second vectors; and two vertices adjacent to each other among the plurality of vertex dots A contour line segment generating unit for sequentially generating the X and Y coordinates of each of a plurality of edge dots on the contour line segment connecting the two vertex dots of interest from the vertex coordinate information; Focusing on the above plurality of edge dots sequentially, the vertex dot whose Y coordinate of the focused edge dot is different from the Y coordinate of the immediately preceding dot and the Y coordinate of the focused edge dot is located at the end point of the contour line The attribute of the vertical dot to the edge dot of interest if the Y coordinate is different from the Y coordinate of the target, and the ring for assigning the attribute of the horizontal dot to the edge dot of interest otherwise. The line segment processing unit, and the vertex processing unit and the contour line segment processing unit set the outline color data to all the dots to which the attribute of the vertical dot or the horizontal dot is assigned, and to a plurality of scan lines in the X coordinate axis direction Focusing sequentially, the internal color data is set to all the dots located between the odd-numbered vertical attribute dot and the next even-numbered vertical attribute dot among all the dots except the horizontal attribute dot on the target scan line. And a color data setting unit.
【0009】[0009]
【発明の実施の形態】図1は、本発明に係る図形塗りつ
ぶし装置の構成例を示すブロック図である。図1の装置
は、与えられた図形の輪郭を表す複数のドットにそれぞ
れ輪郭色データを設定し、かつ該図形の内部を表す複数
のドットにそれぞれ内部色データを設定するための装置
であって、複数の頂点ドットの各々のX及びY座標を含
む頂点座標情報を供給するための頂点座標情報供給ユニ
ット1と、前記複数の頂点ドットに順次着目して各着目
頂点ドットに垂直ドット又は水平ドットの属性を割り当
てるための頂点処理ユニット2と、前記複数の頂点ドッ
トのうちの互いに隣接する2個の頂点ドットに順次着目
して該着目2頂点ドットを結ぶ輪郭線分上の複数のエッ
ジドットの各々のX及びY座標を生成するための輪郭線
分生成ユニット3と、各輪郭線分上の複数のエッジドッ
トに順次着目して各着目エッジドットに垂直ドット又は
水平ドットの属性を割り当てるための輪郭線分処理ユニ
ット4と、前記割り当てられた属性をドット毎に格納す
るためのワークメモリ5と、該ワークメモリ5に格納さ
れたドット属性情報を参照して前記図形の輪郭及び内部
を構成する複数のドットの各々に色データを設定するた
めの色データ設定ユニット6と、該設定された色データ
をドット毎に格納するためのフレームメモリ7と、該フ
レームメモリ7に格納された色データに基づいて前記図
形の塗りつぶし結果を表示するためのディスプレイ8と
を備えている。頂点座標情報供給ユニット1は、複数の
頂点ドットの各々のX及びY座標を該複数の頂点ドット
の接続の順番に合わせて記憶した頂点座標テーブルを有
している。ここでは、各頂点ドットの間が直線状の輪郭
線分すなわち辺で結ばれるものとし、頂点座標テーブル
で定義される閉じた多角形図形を取り扱うものとする。
なお、3次元図形から2次元図形への射影変換などによ
り辺の長さが0となる場合、すなわち隣接2頂点ドット
が重なる場合には、頂点座標テーブルにおいて一方の頂
点ドットが他方を代表する。ワークメモリ5は2ビット
/ドット構成のメモリであり、フレームメモリ7は25
6色表示を可能とする8ビット/ドット構成のメモリで
ある。FIG. 1 is a block diagram showing an example of the configuration of a figure filling apparatus according to the present invention. The apparatus shown in FIG. 1 is an apparatus for setting outline color data to a plurality of dots representing the outline of a given graphic and setting internal color data to the plurality of dots representing the inside of the graphic. A vertex coordinate information supply unit 1 for supplying vertex coordinate information including the X and Y coordinates of each of a plurality of vertex dots; and a vertical dot or a horizontal dot for each of the vertex dots of interest by sequentially focusing on the plurality of vertex dots. And a vertex processing unit 2 for assigning an attribute of the plurality of vertex dots. The vertex processing unit 2 sequentially focuses on two adjacent vertex dots of the plurality of vertex dots. A contour line segment generating unit 3 for generating X and Y coordinates of each of the plurality of edge dots on each contour line segment; A line segment processing unit 4 for assigning the attributes of the objects, a work memory 5 for storing the assigned attributes for each dot, and the dot attribute information stored in the work memory 5 with reference to the dot attribute information. A color data setting unit 6 for setting color data for each of a plurality of dots constituting the outline and the inside of the frame, a frame memory 7 for storing the set color data for each dot, and a frame memory 7 And a display 8 for displaying a result of painting the figure based on the color data stored in the image data. The vertex coordinate information supply unit 1 has a vertex coordinate table in which the X and Y coordinates of each of the plurality of vertex dots are stored according to the order of connection of the plurality of vertex dots. Here, it is assumed that each vertex dot is connected by a linear contour line, that is, a side, and a closed polygon figure defined by a vertex coordinate table is handled.
When the length of a side becomes 0 due to projection conversion from a three-dimensional figure to a two-dimensional figure, that is, when two adjacent vertex dots overlap, one vertex dot represents the other in the vertex coordinate table. The work memory 5 is a memory of a 2-bit / dot configuration, and the frame memory 7 is a 25-bit / dot memory.
This is an 8-bit / dot configuration memory capable of displaying six colors.
【0010】図2は、図1の図形塗りつぶし装置におけ
る辺ベクトルの方向に関する定義を説明するための図で
ある。頂点処理ユニット2は、頂点座標情報供給ユニッ
ト1から供給された情報に基づき、複数の頂点ドットに
順次着目して、着目頂点ドットを終点としかつ1つ前の
頂点ドットを始点とする第1の辺ベクトルの方向と、該
着目頂点ドットを始点としかつ次の頂点ドットを終点と
する第2の辺ベクトルの方向とをそれぞれ上、下、右又
は左に分類する機能を備えている。図2に示すように、
辺ベクトルの終点のY座標が該辺ベクトルの始点のY座
標より大きい場合には該辺ベクトルの方向が上(UP)
であると判定され、辺ベクトルの終点のY座標が該辺ベ
クトルの始点のY座標より小さい場合には該辺ベクトル
の方向が下(DOWN)であると判定され、辺ベクトル
の終点のY座標が該辺ベクトルの始点のY座標と一致し
かつ該辺ベクトルの終点のX座標が該辺ベクトルの始点
のX座標より大きい場合には該辺ベクトルの方向が右
(RIGHT)であると判定され、辺ベクトルの終点の
Y座標が該辺ベクトルの始点のY座標と一致しかつ該辺
ベクトルの終点のX座標が該辺ベクトルの始点のX座標
より小さい場合には該辺ベクトルの方向が左(LEF
T)であると判定される。FIG. 2 is a diagram for explaining the definition of the direction of the side vector in the figure filling device of FIG. The vertex processing unit 2 sequentially focuses on a plurality of vertex dots based on the information supplied from the vertex coordinate information supply unit 1 and sets a first vertex dot as an end point and a first vertex dot as a start point. It has a function of classifying the direction of the side vector and the direction of the second side vector starting from the target vertex dot and ending at the next vertex dot as upper, lower, right, or left, respectively. As shown in FIG.
If the Y coordinate of the end point of the side vector is larger than the Y coordinate of the start point of the side vector, the direction of the side vector is upward (UP)
If the Y coordinate of the end point of the side vector is smaller than the Y coordinate of the start point of the side vector, the direction of the side vector is determined to be down (DOWN), and the Y coordinate of the end point of the side vector is determined. Is equal to the Y coordinate of the start point of the side vector and the X coordinate of the end point of the side vector is larger than the X coordinate of the start point of the side vector, it is determined that the direction of the side vector is right (RIGHT). If the Y coordinate of the end point of the side vector matches the Y coordinate of the start point of the side vector and the X coordinate of the end point of the side vector is smaller than the X coordinate of the start point of the side vector, the direction of the side vector is set to the left. (LEF
T) is determined.
【0011】図3は、図1の図形塗りつぶし装置におけ
る頂点ドット属性の割り当てに係る1つの規則を示して
いる。頂点処理ユニット2は、着目頂点ドットについて
分類した第1及び第2の辺ベクトルの方向に応じて該着
目頂点ドットに垂直ドット又は水平ドットの属性を割り
当てる機能を有する。図3中、破線矢印は第1の辺ベク
トルの方向を、実線矢印は第2の辺ベクトルの方向をそ
れぞれ示している。具体的には、図3に示すように、第
1の辺ベクトルの方向が上でありかつ第2の辺ベクトル
の方向が上である場合、第1の辺ベクトルの方向が左で
ありかつ第2の辺ベクトルの方向が上である場合、第1
の辺ベクトルの方向が下でありかつ第2の辺ベクトルの
方向が下である場合、第1の辺ベクトルの方向が右であ
りかつ第2の辺ベクトルの方向が下である場合、第1の
辺ベクトルの方向が上でありかつ第2の辺ベクトルの方
向が右である場合、第1の辺ベクトルの方向が左であり
かつ第2の辺ベクトルの方向が右である場合、第1の辺
ベクトルの方向が下でありかつ第2の辺ベクトルの方向
が左である場合、及び、第1の辺ベクトルの方向が右で
ありかつ第2の辺ベクトルの方向が左である場合にはそ
れぞれ着目頂点ドットに垂直ドット(V)の属性が、そ
の他の場合には該着目頂点ドットに水平ドット(H)の
属性がそれぞれ割り当てられる。例えば、垂直属性ドッ
トには2ビット情報「10」が、水平属性ドットには2
ビット情報「11」がそれぞれ割り当てられる。ワーク
メモリ5の中の全てのドット属性情報は、予め例えば
「00」に初期化される。なお、図3中の垂直属性ドッ
ト(V)を表すハッチングと、水平属性ドット(H)を
表すハッチングとは、図4以下の図面においてもそれぞ
れ同じ意味を表すものとする。FIG. 3 shows one rule relating to the assignment of the vertex dot attribute in the figure filling device of FIG. The vertex processing unit 2 has a function of assigning an attribute of a vertical dot or a horizontal dot to the target vertex dot according to the directions of the first and second side vectors classified for the target vertex dot. In FIG. 3, the dashed arrow indicates the direction of the first side vector, and the solid arrow indicates the direction of the second side vector. Specifically, as shown in FIG. 3, when the direction of the first side vector is upward and the direction of the second side vector is upward, the direction of the first side vector is left and the If the direction of the second side vector is upward, the first
If the direction of the side vector is down and the direction of the second side vector is down, if the direction of the first side vector is right and the direction of the second side vector is down, the first When the direction of the side vector is upward and the direction of the second side vector is right, when the direction of the first side vector is left and the direction of the second side vector is right, the first When the direction of the side vector is down and the direction of the second side vector is left, and when the direction of the first side vector is right and the direction of the second side vector is left , The attribute of the vertical dot (V) is assigned to the target vertex dot, and the attribute of the horizontal dot (H) is assigned to the target vertex dot in other cases. For example, 2-bit information “10” is assigned to a vertical attribute dot, and 2 bits
Bit information “11” is assigned. All the dot attribute information in the work memory 5 is initialized to, for example, “00” in advance. Note that the hatching representing the vertical attribute dots (V) and the hatching representing the horizontal attribute dots (H) in FIG. 3 have the same meaning in FIGS.
【0012】図4は、図1の図形塗りつぶし装置におけ
る頂点ドット属性の割り当てに係る他の規則を示してい
る。図4によれば、頂点処理ユニット2は、第1の辺ベ
クトルの方向が上でありかつ第2の辺ベクトルの方向が
上である場合、第1の辺ベクトルの方向が右でありかつ
第2の辺ベクトルの方向が上である場合、第1の辺ベク
トルの方向が下でありかつ第2の辺ベクトルの方向が下
である場合、第1の辺ベクトルの方向が左でありかつ第
2の辺ベクトルの方向が下である場合、第1の辺ベクト
ルの方向が下でありかつ第2の辺ベクトルの方向が右で
ある場合、第1の辺ベクトルの方向が左でありかつ第2
の辺ベクトルの方向が右である場合、第1の辺ベクトル
の方向が上でありかつ第2の辺ベクトルの方向が左であ
る場合、及び、第1の辺ベクトルの方向が右でありかつ
第2の辺ベクトルの方向が左である場合にはそれぞれ着
目頂点ドットに垂直ドット(V)の属性を、その他の場
合には該着目頂点ドットに水平ドット(H)の属性をそ
れぞれ割り当てる。FIG. 4 shows another rule related to the assignment of the vertex dot attribute in the figure filling device of FIG. According to FIG. 4, when the direction of the first side vector is up and the direction of the second side vector is up, the vertex processing unit 2 determines that the direction of the first side vector is right and the If the direction of the second side vector is up, the direction of the first side vector is down, and if the direction of the second side vector is down, the direction of the first side vector is left and the If the direction of the second side vector is down, the direction of the first side vector is down, and if the direction of the second side vector is right, the direction of the first side vector is left and the 2
Is right, the direction of the first side vector is up and the direction of the second side vector is left, and the direction of the first side vector is right, and When the direction of the second side vector is left, the attribute of the vertical dot (V) is assigned to each vertex dot of interest, and in other cases, the attribute of horizontal dot (H) is assigned to each vertex dot of interest.
【0013】図5(a)〜図5(c)は、それぞれ図1
の図形塗りつぶし装置におけるエッジドット属性の割り
当て例を示している。輪郭線分生成ユニット3は、DD
A(digital differential analyzer:ディジタル微分
解析)の手法により、互いに隣接する2個の頂点ドット
Pn,Pn+1に着目して、該着目2頂点ドットを結ぶ輪
郭線分上の複数のエッジドットの各々のX及びY座標を
順次生成する。ただし、輪郭線分が極端に短い場合には
DDA以外の簡略手法を採用してもよい。輪郭線分処理
ユニット4は、該複数のエッジドットに順次着目して、
着目エッジドットのY座標が1つ前のドットのY座標と
異なりかつ該着目エッジドットのY座標が当該輪郭線分
の終点に位置する頂点ドットPn+1のY座標と異なる場
合には該着目エッジドットに垂直ドット(V)の属性
を、その他の場合には該着目エッジドットに水平ドット
(H)の属性をそれぞれ割り当てる機能を有している。
その結果、1より大きい傾きを有する辺の場合には、図
5(a)に示すように、辺上の全てのエッジドットに垂
直ドットの属性が割り当てられる。また、1より小さい
傾きを有する辺の場合には、図5(b)に示すように垂
直属性ドットと水平属性ドットとが辺上に混在すること
となる。水平方向の辺の場合には、図5(c)に示すよ
うに、辺上の全てのエッジドットに水平ドットの属性が
割り当てられる。FIGS. 5A to 5C respectively show FIGS.
9 shows an example of assignment of edge dot attributes in the figure filling device of FIG. The contour line segment generating unit 3
Focusing on two adjacent vertex dots Pn and Pn + 1 by a technique of A (digital differential analyzer), each of a plurality of edge dots on a contour segment connecting the two vertex dots of interest Are sequentially generated. However, when the outline is extremely short, a simplified method other than DDA may be adopted. The contour line processing unit 4 sequentially focuses on the plurality of edge dots,
If the Y coordinate of the target edge dot is different from the Y coordinate of the immediately preceding dot and the Y coordinate of the target edge dot is different from the Y coordinate of the vertex dot Pn + 1 located at the end point of the contour line, the target It has a function of assigning the attribute of a vertical dot (V) to an edge dot, and assigning the attribute of a horizontal dot (H) to the edge dot of interest in other cases.
As a result, in the case of a side having a slope greater than 1, as shown in FIG. 5A, the attribute of the vertical dot is assigned to all edge dots on the side. In the case of a side having an inclination smaller than 1, vertical attribute dots and horizontal attribute dots are mixed on the side as shown in FIG. 5B. In the case of a horizontal side, as shown in FIG. 5C, the attribute of the horizontal dot is assigned to all edge dots on the side.
【0014】さて、任意形状の多角形図形を考えると、
ある頂点が他の頂点や辺と重なったり、ある辺が他の辺
や頂点と重なったりする場合がある。特に、3次元図形
の各頂点に2次元図形への射影変換を施した場合には、
このような重なりが頻繁に発生する。そこで、頂点処理
ユニット2及び輪郭線分処理ユニット4は、あるドット
に新たに垂直ドット又は水平ドットの属性を割り当てよ
うとする場合、ワークメモリ5に格納されたドット属性
情報をその都度参照して、該ワークメモリ5の中の対応
情報を更新するかどうかを決定する。なお、ワークメモ
リ5から読み出されたドット属性が初期値「00」であ
る場合には、新たに割り当てようとするドット属性がそ
のままワークメモリ5の中に書き込まれる。Now, considering an arbitrary polygonal figure,
A certain vertex may overlap another vertex or side, or a certain side may overlap another side or vertex. In particular, when each vertex of a three-dimensional figure is subjected to a projection transformation into a two-dimensional figure,
Such overlap frequently occurs. Therefore, the vertex processing unit 2 and the contour line processing unit 4 refer to the dot attribute information stored in the work memory 5 each time when a new dot or vertical dot attribute is to be assigned to a certain dot. Then, it is determined whether or not the corresponding information in the work memory 5 is updated. If the dot attribute read from the work memory 5 has the initial value “00”, the dot attribute to be newly assigned is written in the work memory 5 as it is.
【0015】図6は、図1の図形塗りつぶし装置におけ
るドットの重なり処理に係る規則を示している。図6に
よれば、頂点処理ユニット2及び輪郭線分処理ユニット
4は、垂直ドット又は水平ドットの属性が既に割り当て
られた既処理ドットに新たに垂直ドット又は水平ドット
の属性を割り当てようとする場合、新たなドット属性が
前のドット属性と一致するときには該既処理ドットに水
平ドット(H)の属性を、そうでないときには該既処理
ドットに垂直ドット(V)の属性をそれぞれ割り当て
る。FIG. 6 shows rules concerning dot overlap processing in the figure filling device of FIG. According to FIG. 6, the vertex processing unit 2 and the contour line processing unit 4 attempt to assign a new vertical dot or horizontal dot attribute to a processed dot to which a vertical dot or horizontal dot attribute has already been assigned. When the new dot attribute matches the previous dot attribute, the attribute of the horizontal dot (H) is assigned to the processed dot, and otherwise, the attribute of the vertical dot (V) is allocated to the processed dot.
【0016】図7は、塗りつぶし対象の図形の具体例を
示している。図中のP1〜P8は各々頂点ドットであ
る。まず、図1の図形塗りつぶし装置は、頂点処理ユニ
ット2により、図3の規則に基づいて頂点ドットP1に
水平ドット(H)の属性を割り当てる。その結果、ワー
クメモリ5の中の対応位置にドット属性情報「11」が
書き込まれる。次に、図1の図形塗りつぶし装置は、頂
点ドットP1から次の頂点ドットP2に至る辺上の複数
のエッジドットの各々のX及びY座標を輪郭線分生成ユ
ニット3により順次生成しながら、輪郭線分処理ユニッ
ト4により各エッジドットにドット属性を割り当ててい
く。この処理は、頂点ドットP2の1つ手前のドットま
で続けられる。以下、頂点処理ユニット2、輪郭線分生
成ユニット3及び輪郭線分処理ユニット4による同様の
処理の繰り返しにより、ワークメモリ5の中に図形の輪
郭を表す複数のドットの各々の属性情報が書き込まれ
る。FIG. 7 shows a specific example of a graphic to be painted. P1 to P8 in the figure are vertex dots, respectively. First, in the figure painting apparatus of FIG. 1, the vertex processing unit 2 assigns the attribute of the horizontal dot (H) to the vertex dot P1 based on the rule of FIG. As a result, the dot attribute information “11” is written at the corresponding position in the work memory 5. Next, the figure filling device of FIG. 1 sequentially generates the X and Y coordinates of each of a plurality of edge dots on the side from the vertex dot P1 to the next vertex dot P2 by the contour line segment generating unit 3, The line segment processing unit 4 assigns dot attributes to each edge dot. This process is continued up to the dot immediately before the vertex dot P2. Hereinafter, by repeating the same processing by the vertex processing unit 2, the outline segment generation unit 3, and the outline segment processing unit 4, the attribute information of each of the plurality of dots representing the outline of the figure is written in the work memory 5. .
【0017】図8は、図7の図形の輪郭に係るドット属
性の割り当て結果を示している。図8によれば、X座標
軸方向の任意のスキャンラインSLに着目するとき、該
スキャンラインSL上に存在する垂直属性ドットの数は
必ず0又は偶数である。図3及び図4の規則は、このよ
うなドット属性の割り当てがなされるように決定された
ものである。色データ設定ユニット6は、図8中の(X
min,Ymin)及び(Xmax,Ymax)で定義
された矩形の中を、すなわち塗りつぶし対象の図形に外
接する矩形の中をスキャンする。ここに、Xminは8
個の頂点ドットのX座標の最小値、Yminは8個の頂
点ドットのY座標の最小値、Xmaxは8個の頂点ドッ
トのX座標の最大値、Ymaxは8個の頂点ドットのY
座標の最大値である。更に、色データ設定ユニット6
は、頂点処理ユニット2及び輪郭線分処理ユニット4に
より垂直ドット又は水平ドットの属性が割り当てられた
ドットの全てに輪郭色データを設定し、かつX座標軸方
向の複数のスキャンラインに順次着目して、着目スキャ
ンライン上の水平属性ドットを除く全ドットのうち奇数
番目の垂直属性ドットと次の偶数番目の垂直属性ドット
との間に位置するドットの全てに内部色データを設定す
る。図8に例示されたスキャンラインSLの場合には、
1番目の垂直属性ドットと2番目の垂直属性ドットとの
間に位置する3個のドットと、3番目の垂直属性ドット
と4番目の垂直属性ドットとの間に位置する8個のドッ
トとにそれぞれ内部色データが設定される。FIG. 8 shows a result of assigning dot attributes related to the outline of the figure shown in FIG. According to FIG. 8, when focusing on an arbitrary scan line SL in the X coordinate axis direction, the number of vertical attribute dots existing on the scan line SL is always 0 or an even number. The rules in FIGS. 3 and 4 are determined so that such dot attributes are assigned. The color data setting unit 6 selects (X
The inside of the rectangle defined by (min, Ymin) and (Xmax, Ymax), that is, the inside of the rectangle circumscribing the figure to be painted is scanned. Where Xmin is 8
, The minimum value of the Y coordinate of the eight vertex dots, Xmax is the maximum value of the X coordinate of the eight vertex dots, and Ymax is the Y value of the eight vertex dots.
This is the maximum value of the coordinates. Further, the color data setting unit 6
Sets contour color data to all the dots to which the attribute of the vertical dot or the horizontal dot is assigned by the vertex processing unit 2 and the contour segment processing unit 4, and sequentially focuses on a plurality of scan lines in the X coordinate axis direction. The internal color data is set to all the dots located between the odd-numbered vertical attribute dot and the next even-numbered vertical attribute dot among all the dots except the horizontal attribute dot on the target scan line. In the case of the scan line SL illustrated in FIG.
Three dots located between the first vertical attribute dot and the second vertical attribute dot, and eight dots located between the third vertical attribute dot and the fourth vertical attribute dot Internal color data is set for each.
【0018】色データ設定ユニット6は、内部色データ
を設定すべきドットすなわち内部ドットを検出した際
に、該内部ドットに2ビットの属性情報、例えば「0
1」を割り当て、該属性情報をワークメモリ5の中に書
き込む。つまり、内部ドットの検出のためのスキャンが
全て完了した後に、色データの設定のために再度スキャ
ンが行われる。図9は、図7の図形に係る内部ドットの
検出結果を示している。図9において左下向きのハッチ
ングを施したドットが内部ドットである。ワークメモリ
5の中に書き込まれた内部ドット属性情報は、内部ドッ
トの「塗り替え」のための複数回の参照を可能にすると
いう利点がある。ただし、ワークメモリ5への内部ドッ
ト属性情報の書き込みを省略し、内部ドットの検出と並
行に各ドットの色データ設定を行うこともできる。When the color data setting unit 6 detects a dot for which internal color data is to be set, that is, an internal dot, it assigns 2-bit attribute information to the internal dot, for example, "0".
“1” is assigned, and the attribute information is written into the work memory 5. That is, after all the scanning for detecting the internal dots is completed, the scanning is performed again for setting the color data. FIG. 9 shows a result of detecting an internal dot related to the graphic shown in FIG. In FIG. 9, lower left hatched dots are internal dots. The internal dot attribute information written in the work memory 5 has the advantage that it can be referenced a plurality of times for “repainting” internal dots. However, the writing of the internal dot attribute information to the work memory 5 may be omitted, and the color data of each dot may be set in parallel with the detection of the internal dot.
【0019】色データ設定ユニット6により設定された
ドット毎の色データは、フレームメモリ7の中に格納さ
れる。ディスプレイ8は、フレームメモリ7に格納され
た色データに基づいて、与えられた図形の塗りつぶし結
果を表示する。なお、輪郭色データと内部色データとは
異なるデータであってもよいし、また同じデータであっ
てもよい。有彩色データに限らず、無彩色データであっ
てもよい。輪郭色データと内部色データとを異ならせれ
ば、縁取られた図形を描くことができる。しかも、色デ
ータ設定ユニット6により輪郭色データの設定と並行に
内部色データを設定することができる。The color data for each dot set by the color data setting unit 6 is stored in the frame memory 7. The display 8 displays the result of painting the given figure based on the color data stored in the frame memory 7. The outline color data and the internal color data may be different data or may be the same data. The data is not limited to the chromatic data, and may be achromatic data. If the outline color data and the internal color data are made different, an outlined figure can be drawn. Moreover, the color data setting unit 6 can set the internal color data in parallel with the setting of the outline color data.
【0020】図10は、水平方向の辺を有する図形の具
体例を示している。図10において、辺P1P2,P3
P4,P5P6及びP7P8が水平方向である。FIG. 10 shows a specific example of a figure having horizontal sides. In FIG. 10, sides P1P2, P3
P4, P5P6 and P7P8 are horizontal directions.
【0021】図11は、図3の規則を採用した場合の、
図10の図形の輪郭に係るドット属性の割り当て結果を
示している。また、図12は、図4の規則を採用した場
合の、図10の図形の輪郭に係るドット属性の割り当て
結果を示している。図11及び図12のいずれの場合で
も、X座標軸方向の任意のスキャンライン上に存在する
垂直属性ドットの数が0又は2であるので、色データ設
定ユニット6は内部ドットを正しく検出できる。FIG. 11 shows a case where the rule of FIG. 3 is adopted.
11 shows a result of assigning dot attributes related to the outline of the figure in FIG. 10. FIG. 12 shows a result of assigning dot attributes related to the outline of the figure in FIG. 10 when the rule in FIG. 4 is adopted. In either case of FIGS. 11 and 12, the number of vertical attribute dots existing on an arbitrary scan line in the X coordinate axis direction is 0 or 2, so that the color data setting unit 6 can correctly detect internal dots.
【0022】図13(a)及び図13(b)は、ドット
の重なり処理の1つの実例を示している。図13(a)
は塗りつぶし対象の図形の具体例を、図13(b)は該
図形の輪郭に係るドット属性の割り当て結果をそれぞれ
示している。頂点処理ユニット2が頂点ドットP4に垂
直ドットの属性(図3及び図4参照)を割り当てようと
したとき、該ドットには既に輪郭線分処理ユニット4に
よる辺P1P2の処理において垂直ドットの属性(図5
(a)参照)が割り当てられている。そこで、頂点処理
ユニット2は、図6中の第1行の規則に従って、頂点ド
ットP4に水平ドットの属性を割り当て、該ドット属性
をワークメモリ5の中に書き込む。図13(b)によれ
ば、X座標軸方向の任意のスキャンライン上に存在する
垂直属性ドットの数が0又は2であるので、色データ設
定ユニット6は内部ドットを正しく検出できる。FIGS. 13A and 13B show one example of dot overlap processing. FIG. 13 (a)
13 shows a specific example of a graphic to be painted, and FIG. 13B shows a result of assigning dot attributes related to the outline of the graphic. When the vertex processing unit 2 attempts to assign the attribute of the vertical dot (see FIGS. 3 and 4) to the vertex dot P4, the attribute of the vertical dot (see FIG. FIG.
(See (a)). Therefore, the vertex processing unit 2 assigns the attribute of the horizontal dot to the vertex dot P4 according to the rule of the first row in FIG. 6 and writes the dot attribute into the work memory 5. According to FIG. 13B, since the number of vertical attribute dots existing on an arbitrary scan line in the X coordinate axis direction is 0 or 2, the color data setting unit 6 can correctly detect internal dots.
【0023】図14(a)及び図14(b)は、ドット
の重なり処理の他の実例を示している。図14(a)は
塗りつぶし対象の図形の具体例を、図14(b)は該図
形の輪郭に係るドット属性の割り当て結果をそれぞれ示
している。頂点処理ユニット2が頂点ドットP4に水平
ドットの属性(図3及び図4参照)を割り当てようとし
たとき、該ドットには既に輪郭線分処理ユニット4によ
る辺P1P2の処理において垂直ドットの属性(図5
(b)参照)が割り当てられている。そこで、頂点処理
ユニット2は、図6中の第3行の規則に従って、頂点ド
ットP4に垂直ドットの属性を割り当て、該ドット属性
をワークメモリ5の中に書き込む。図14(b)によれ
ば、X座標軸方向の任意のスキャンライン上に存在する
垂直属性ドットの数が0又は偶数であるので、色データ
設定ユニット6は内部ドットを正しく検出できる。FIGS. 14A and 14B show another example of the dot overlapping process. FIG. 14A shows a specific example of a graphic to be painted, and FIG. 14B shows a result of assigning dot attributes related to the outline of the graphic. When the vertex processing unit 2 attempts to assign the attribute of a horizontal dot (see FIGS. 3 and 4) to the vertex dot P4, the attribute of the vertical dot (see FIG. FIG.
(See (b)). Therefore, the vertex processing unit 2 assigns the attribute of the vertical dot to the vertex dot P4 according to the rule of the third row in FIG. 6, and writes the dot attribute in the work memory 5. According to FIG. 14B, since the number of vertical attribute dots existing on an arbitrary scan line in the X coordinate axis direction is 0 or even, the color data setting unit 6 can correctly detect internal dots.
【0024】なお、図1の図形塗りつぶし装置は、頂点
ドットの並びが図7、図10及び図13(a)のような
時計回りであっても、また図14(a)のような反時計
回りであっても正しく塗りつぶし処理を実行できる。曲
線状の輪郭線分を構成する複数のエッジドットの各々の
X及びY座標を輪郭線分生成ユニット3が順次生成する
こととすれば、曲線を含む図形の塗りつぶし処理を行う
こともできる。In the figure filling device of FIG. 1, even if the arrangement of the vertex dots is clockwise as shown in FIGS. 7, 10 and 13 (a), the arrangement of the counterclockwise as shown in FIG. The filling process can be executed correctly even in the surrounding area. If the X- and Y-coordinates of each of the plurality of edge dots forming the curved contour line segment are sequentially generated by the contour line segment generating unit 3, it is possible to perform a painting process for a figure including a curve.
【0025】図15は、2重の輪郭ループを有する図形
の具体例である文字「A」を示している。図中のP1〜
P7は、外側の輪郭ループを構成する頂点ドットであ
る。P8〜P10は、内側の輪郭ループを構成する頂点
ドットである。図15の例では、両輪郭ループの向きが
いずれも時計回りに設定されている。FIG. 15 shows a character "A" which is a specific example of a figure having a double contour loop. P1 in the figure
P7 is a vertex dot forming an outer contour loop. P8 to P10 are vertex dots forming an inner contour loop. In the example of FIG. 15, the directions of both contour loops are set clockwise.
【0026】図16は、図15の図形の輪郭に係るドッ
ト属性の割り当て結果を示している。図1の図形塗りつ
ぶし装置は、図3の規則に基づいて頂点ドットP1〜P
7の各々に垂直ドット又は水平ドットの属性を割り当て
るとともに、同じく図3の規則に基づいて頂点ドットP
8〜P10の各々に垂直ドット又は水平ドットの属性を
割り当てる。エッジドット属性の割り当ては、図5
(a)〜図5(c)の例による。色データ設定ユニット
6は、図16のドット属性の割り当て結果が全てワーク
メモリ5の中に格納された後に、内部ドットの検出を開
始する。FIG. 16 shows a result of assigning dot attributes related to the outline of the figure shown in FIG. The figure filling device of FIG. 1 performs the vertex dot P1 to P
7 is assigned a vertical dot or horizontal dot attribute, and the vertex dot P
An attribute of a vertical dot or a horizontal dot is assigned to each of 8-P10. The assignment of the edge dot attribute is shown in FIG.
5A to 5C. The color data setting unit 6 starts detection of internal dots after all the dot attribute assignment results of FIG. 16 have been stored in the work memory 5.
【0027】図17は、図15の図形に係る内部ドット
の検出結果を示している。図16及び図17によれば、
X座標軸方向の任意のスキャンライン上に存在する垂直
属性ドットの数が0又は偶数であるので、色データ設定
ユニット6は内部ドットを正しく検出できる。つまり、
図1の図形塗りつぶし装置は、2重の輪郭ループを有す
る図形の塗りつぶし処理を行う場合に、両輪郭ループの
向きを問わない。しかも、輪郭色データと内部色データ
とを異ならせれば、縁取られた文字「A」を描くことが
できる。FIG. 17 shows a result of detecting an internal dot of the figure shown in FIG. According to FIGS. 16 and 17,
Since the number of vertical attribute dots existing on any scan line in the X coordinate axis direction is 0 or even, the color data setting unit 6 can correctly detect internal dots. That is,
The figure painting apparatus of FIG. 1 does not care about the direction of both contour loops when performing the painting process of a figure having a double contour loop. In addition, if the outline color data and the internal color data are different, the outlined character "A" can be drawn.
【0028】図1の図形塗りつぶし装置は、コンピュー
タグラフィックスに関する種々の分野に応用できる。そ
の一例として、カーナビゲーションシステムにおける鳥
瞰地図の表示を挙げることができる。市街地図において
は、建物、街区などの縁取られた図形が多く存在する。
また、鳥瞰表示のために3次元図形の各頂点に2次元図
形への射影変換を施したときに、図形の頂点や辺の重な
りが頻繁に発生する。図1の装置によれば、このような
条件下でも図形塗りつぶし処理を高速に達成できる。表
示すべき図形がディスプレイ8の画面からはみ出す場合
には、該図形にクリッピング処理を施せばよい。なお、
図1中のディスプレイ8は、CRTディスプレイ、液晶
ディスプレイなどに限らず、プリンタ装置であってもよ
い。The figure filling device shown in FIG. 1 can be applied to various fields related to computer graphics. One example is the display of a bird's-eye view map in a car navigation system. In a city map, there are many bordered figures such as buildings and city blocks.
In addition, when projective transformation to a two-dimensional figure is performed on each vertex of a three-dimensional figure for bird's-eye display, overlapping of the vertices and sides of the figure frequently occurs. According to the apparatus of FIG. 1, the figure filling process can be achieved at high speed even under such conditions. When a graphic to be displayed is protruded from the screen of the display 8, a clipping process may be performed on the graphic. In addition,
The display 8 in FIG. 1 is not limited to a CRT display, a liquid crystal display, or the like, and may be a printer device.
【0029】さて、以上の説明では、図3又は図4の規
則に従って頂点ドット属性の割り当てを行い、かつ図5
(a)〜図5(c)の例に従ってエッジドット属性の割
り当てを行うこととした。ただし、ある座標軸方向の任
意のスキャンライン上に存在する垂直属性ドットの数が
必ず0又は偶数になるように、与えられた図形の輪郭を
表す複数のドットの全てに各々垂直ドット又は水平ドッ
トの属性を割り当てる限り、その他の規則及び例に従っ
てもよい。In the above description, the vertex dot attribute is assigned according to the rule of FIG. 3 or FIG.
The assignment of the edge dot attribute is performed according to the examples shown in FIGS. However, in order to make sure that the number of vertical attribute dots existing on an arbitrary scan line in a certain coordinate axis direction is always 0 or even, all of the plurality of dots representing the outline of a given figure have vertical or horizontal dots. Other rules and examples may be followed as long as attributes are assigned.
【0030】[0030]
【発明の効果】以上説明してきたとおり、本発明によれ
ば、ある座標軸方向の任意のスキャンライン上に存在す
る垂直属性ドットの数が必ず0又は偶数になるように、
与えられた図形の輪郭を表す複数のドットの全てに各々
垂直ドット又は水平ドットの属性を割り当てるための手
段と、垂直ドット又は水平ドットの属性が割り当てられ
たドットの全てに輪郭色データを設定し、かつ前記座標
軸方向の複数のスキャンラインに順次着目して、着目ス
キャンライン上の水平属性ドットを除く全ドットのうち
奇数番目の垂直属性ドットと次の偶数番目の垂直属性ド
ットとの間に位置するドットの全てに内部色データを設
定するための手段とを備えた構成を採用したので、スキ
ャンアルゴリズムを採用した図形塗りつぶし装置におけ
る従来の諸制約を解消することができる。As described above, according to the present invention, the number of vertical attribute dots existing on an arbitrary scan line in a certain coordinate axis direction is always 0 or even.
Means for assigning vertical or horizontal dot attributes to all of the plurality of dots representing the outline of a given figure; and setting of outline color data for all of the dots to which the vertical or horizontal dot attribute has been assigned. And, by sequentially focusing on a plurality of scan lines in the coordinate axis direction, the position between the odd-numbered vertical attribute dot and the next even-numbered vertical attribute dot among all the dots except the horizontal attribute dot on the focused scan line. Since a configuration including a means for setting internal color data for all of the dots to be used is adopted, the conventional restrictions in a figure filling apparatus employing a scan algorithm can be eliminated.
【図1】本発明に係る図形塗りつぶし装置の構成例を示
すブロック図である。FIG. 1 is a block diagram showing a configuration example of a graphic painting apparatus according to the present invention.
【図2】図1の図形塗りつぶし装置における辺ベクトル
の方向に関する定義を説明するための図である。FIG. 2 is a diagram for explaining a definition related to a direction of a side vector in the graphic painting apparatus of FIG. 1;
【図3】図1の図形塗りつぶし装置における頂点ドット
属性の割り当てに係る1つの規則を示す図である。FIG. 3 is a diagram showing one rule related to the assignment of vertex dot attributes in the figure filling device of FIG. 1;
【図4】図1の図形塗りつぶし装置における頂点ドット
属性の割り当てに係る他の規則を示す図である。FIG. 4 is a diagram showing another rule related to the assignment of vertex dot attributes in the graphic painting device of FIG. 1;
【図5】図1の図形塗りつぶし装置におけるエッジドッ
ト属性の割り当て例を示す図であり、(a)は1より大
きい傾きを有する辺の場合を、(b)は1より小さい傾
きを有する辺の場合を、(c)は水平方向の辺の場合を
それぞれ示している。5A and 5B are diagrams illustrating an example of assignment of an edge dot attribute in the graphic painting apparatus of FIG. 1, wherein FIG. 5A illustrates a case of a side having a slope greater than 1, and FIG. (C) shows the case of the side in the horizontal direction.
【図6】図1の図形塗りつぶし装置におけるドットの重
なり処理に係る規則を説明するための図である。FIG. 6 is a diagram for explaining rules related to dot overlap processing in the graphic painting device of FIG. 1;
【図7】塗りつぶし対象の図形の具体例を示す図であ
る。FIG. 7 is a diagram illustrating a specific example of a graphic to be painted;
【図8】図7の図形の輪郭に係るドット属性の割り当て
結果を示す図である。8 is a diagram illustrating a result of assigning dot attributes related to the outline of the graphic in FIG. 7;
【図9】図7の図形に係る内部ドットの検出結果を示す
図である。FIG. 9 is a diagram illustrating a detection result of an internal dot related to the graphic of FIG. 7;
【図10】水平方向の辺を有する図形の具体例を示す図
である。FIG. 10 is a diagram showing a specific example of a graphic having a horizontal side.
【図11】図3の規則を採用した場合の、図10の図形
の輪郭に係るドット属性の割り当て結果を示す図であ
る。11 is a diagram illustrating a result of assigning dot attributes related to the outline of the figure in FIG. 10 when the rule in FIG. 3 is adopted;
【図12】図4の規則を採用した場合の、図10の図形
の輪郭に係るドット属性の割り当て結果を示す図であ
る。12 is a diagram illustrating a result of assigning dot attributes related to the outline of the figure in FIG. 10 when the rule in FIG. 4 is adopted;
【図13】ドットの重なり処理の1つの実例を説明する
ための図であって、(a)は塗りつぶし対象の図形の具
体例を、(b)は該図形の輪郭に係るドット属性の割り
当て結果をそれぞれ示している。13A and 13B are diagrams for explaining one example of dot overlap processing, in which FIG. 13A illustrates a specific example of a graphic to be painted, and FIG. 13B illustrates a result of assigning dot attributes related to the outline of the graphic; Are respectively shown.
【図14】ドットの重なり処理の他の実例を説明するた
めの図であって、(a)は塗りつぶし対象の図形の具体
例を、(b)は該図形の輪郭に係るドット属性の割り当
て結果をそれぞれ示している。14A and 14B are diagrams for explaining another example of the dot overlap processing, in which FIG. 14A illustrates a specific example of a graphic to be painted, and FIG. 14B illustrates a result of assigning dot attributes related to the outline of the graphic; Are respectively shown.
【図15】2重の輪郭ループを有する図形の具体例を示
す図である。FIG. 15 is a diagram illustrating a specific example of a graphic having a double contour loop.
【図16】図15の図形の輪郭に係るドット属性の割り
当て結果を示す図である。16 is a diagram illustrating a result of assigning dot attributes related to the outline of the figure in FIG. 15;
【図17】図15の図形に係る内部ドットの検出結果を
示す図である。FIG. 17 is a diagram showing a detection result of internal dots related to the graphic of FIG. 15;
1 頂点座標情報供給ユニット(第1の手段) 2 頂点処理ユニット(第1の手段) 3 輪郭線分生成ユニット(第1の手段) 4 輪郭線分処理ユニット(第1の手段) 5 ワークメモリ 6 色データ設定ユニット(第2の手段) 7 フレームメモリ 8 ディスプレイ H 水平属性ドット P1〜P10,Pn,Pn+1 頂点ドット SL スキャンライン V 垂直属性ドット 1 Vertex coordinate information supply unit (first means) 2 Vertex processing unit (first means) 3 Contour line generation unit (first means) 4 Contour line processing unit (first means) 5 Work memory 6 Color data setting unit (second means) 7 Frame memory 8 Display H Horizontal attribute dots P1 to P10, Pn, Pn + 1 Vertex dot SL Scan line V Vertical attribute dot
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 11/40 200 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) G06T 11/40 200
Claims (5)
トにそれぞれ輪郭色データを設定し、かつ前記図形の内
部を表す複数のドットにそれぞれ内部色データを設定す
るための図形塗りつぶし装置であって、 ある座標軸方向の任意のスキャンライン上に存在する垂
直属性ドットの数が必ず0又は偶数になるように、前記
図形の輪郭を表す複数のドットの全てに各々垂直ドット
又は水平ドットの属性を割り当てるための第1の手段
と、 前記第1の手段により垂直ドット又は水平ドットの属性
が割り当てられたドットの全てに前記輪郭色データを設
定し、かつ前記座標軸方向の複数のスキャンラインに順
次着目して、前記着目スキャンライン上の水平属性ドッ
トを除く全ドットのうち奇数番目の垂直属性ドットと次
の偶数番目の垂直属性ドットとの間に位置するドットの
全てに前記内部色データを設定するための第2の手段と
を備え、 前記第1の手段は、垂直ドット又は水平ドットの属性が
既に割り当てられた既処理ドットに新たに垂直ドット又
は水平ドットの属性を割り当てようとする場合、新たな
ドット属性が前のドット属性と一致するときには該既処
理ドットに水平ドットの属性を、そうでないときには該
既処理ドットに垂直ドットの属性をそれぞれ割り当てる
機能を備えたことを特徴とする図形塗りつぶし装置。1. A figure filling device for setting contour color data to a plurality of dots representing the contour of a given figure and setting internal color data to each of a plurality of dots representing the inside of the figure. In order to ensure that the number of vertical attribute dots present on any scan line in a certain coordinate axis direction is always 0 or even, the attribute of each vertical dot or horizontal dot is assigned to all of the plurality of dots representing the outline of the figure. A first means for assigning, and setting the outline color data to all of the dots to which the attribute of the vertical dot or the horizontal dot is assigned by the first means, and sequentially paying attention to a plurality of scan lines in the coordinate axis direction The odd-numbered vertical attribute dots and the next even-numbered vertical attribute dots among all the dots except the horizontal attribute dots on the scan line of interest are A second means for setting the internal color data for all of the dots located therebetween, wherein the first means newly adds a processed dot to which an attribute of a vertical dot or a horizontal dot has already been assigned. When an attribute of a vertical dot or a horizontal dot is to be assigned, the attribute of the horizontal dot is assigned to the processed dot when the new dot attribute matches the attribute of the previous dot, and the attribute of the vertical dot is assigned to the processed dot otherwise. Characterized in that it has a function of assigning each of the figures.
トにそれぞれ輪郭色データを設定し、かつ前記図形の内
部を表す複数のドットにそれぞれ内部色データを設定す
るための図形塗りつぶし装置であって、 前記図形の複数の頂点ドットの各々のX及びY座標を含
む頂点座標情報を該複数の頂点ドットの接続の順番に合
わせて記憶し、前記頂点座標情報を供給するための頂点
座標情報供給ユニットと、 前記複数の頂点ドットに順次着目して、前記着目頂点ド
ットを終点としかつ1つ前の頂点ドットを始点とする第
1のベクトルの方向と、前記着目頂点ドットを始点とし
かつ次の頂点ドットを終点とする第2のベクトルの方向
とを前記頂点座標情報から見出し、かつ該第1及び第2
のベクトルの方向に応じて垂直ドット又は水平ドットの
属性を前記着目頂点ドットに割り当てるための頂点処理
ユニットと、 前記複数の頂点ドットのうちの互いに隣接する2個の頂
点ドットに順次着目して、前記着目2頂点ドットを結ぶ
輪郭線分上の複数のエッジドットの各々のX及びY座標
を前記頂点座標情報から生成するための輪郭線分生成ユ
ニットと、 各輪郭線分上の前記複数のエッジドットに順次着目し
て、前記着目エッジドットのY座標が1つ前のドットの
Y座標と異なりかつ前記着目エッジドットのY座標が当
該輪郭線分の終点に位置する頂点ドットのY座標と異な
る場合には前記着目エッジドットに垂直ドットの属性
を、その他の場合には前記着目エッジドットに水平ドッ
トの属性をそれぞれ割り当てるための輪郭線分処理ユニ
ットと、 前記頂点処理ユニット及び前記輪郭線分処理ユニットに
より垂直ドット又は水平ドットの属性が割り当てられた
ドットの全てに前記輪郭色データを設定し、かつX座標
軸方向の複数のスキャンラインに順次着目して、前記着
目スキャンライン上の水平属性ドットを除く全ドットの
うち奇数番目の垂直属性ドットと次の偶数番目の垂直属
性ドットとの間に位置するドットの全てに前記内部色デ
ータを設定するための色データ設定ユニットとを備えた
ことを特徴とする図形塗りつぶし装置。2. A figure filling apparatus for setting contour color data to a plurality of dots representing the contour of a given figure and setting internal color data to each of a plurality of dots representing the inside of the figure. The vertex coordinate information including the X and Y coordinates of each of the plurality of vertex dots of the figure is matched with the connection order of the plurality of vertex dots.
A vertex coordinate information supply unit for storing and storing the vertex coordinate information; and sequentially focusing on the plurality of vertex dots, setting the noted vertex dot as the end point and the immediately preceding vertex dot as the start point. The direction of a first vector and the direction of a second vector starting from the vertex dot of interest and ending at the next vertex dot are found from the vertex coordinate information, and the first and second vectors are found.
A vertex processing unit for assigning an attribute of a vertical dot or a horizontal dot to the vertex dot of interest in accordance with the direction of the vector, and sequentially focusing on two adjacent vertex dots of the plurality of vertex dots, A contour segment generation unit for generating X and Y coordinates of each of a plurality of edge dots on the contour segment connecting the two vertex dots of interest from the vertex coordinate information; and the plurality of edges on each contour segment. Focusing on the dots sequentially, the Y coordinate of the target edge dot is different from the Y coordinate of the immediately preceding dot, and the Y coordinate of the target edge dot is different from the Y coordinate of the vertex dot located at the end point of the contour line Contour line processing for assigning the attribute of a vertical dot to the edge dot of interest in the case, and the attribute of the horizontal dot to the edge dot of the interest otherwise. The contour color data is set to all the dots to which the attribute of the vertical dot or the horizontal dot is assigned by the unit and the vertex processing unit and the contour line segment processing unit, and sequentially focuses on a plurality of scan lines in the X coordinate axis direction. Then, the internal color data is set to all the dots located between the odd-numbered vertical attribute dot and the next even-numbered vertical attribute dot among all the dots on the target scan line except the horizontal attribute dot. And a color data setting unit.
いて、 前記頂点処理ユニットは、 前記頂点座標情報に基づいて前記第1及び第2のベクト
ルの方向をそれぞれ上、下、右、又は左に分類する機能
と、 前記第1のベクトルの方向が上でありかつ前記第2のベ
クトルの方向が上である場合、前記第1のベクトルの方
向が左でありかつ前記第2のベクトルの方向が上である
場合、前記第1のベクトルの方向が下でありかつ前記第
2のベクトルの方向が下である場合、前記第1のベクト
ルの方向が右でありかつ前記第2のベクトルの方向が下
である場合、前記第1のベクトルの方向が上でありかつ
前記第2のベクトルの方向が右である場合、前記第1の
ベクトルの方向が左でありかつ前記第2のベクトルの方
向が右である場合、前記第1のベクトルの方向が下であ
りかつ前記第2のベクトルの方向が左である場合、及
び、前記第1のベクトルの方向が右でありかつ前記第2
のベクトルの方向が左である場合にはそれぞれ前記着目
頂点ドットに垂直ドットの属性を、その他の場合には前
記着目頂点ドットに水平ドットの属性をそれぞれ割り当
てる機能とを備えたことを特徴とする図形塗りつぶし装
置。3. The graphic filling device according to claim 2, wherein the vertex processing unit classifies directions of the first and second vectors as upper, lower, right, or left, respectively, based on the vertex coordinate information. When the direction of the first vector is upward and the direction of the second vector is upward, the direction of the first vector is left and the direction of the second vector is upward. If the direction of the first vector is down and the direction of the second vector is down, the direction of the first vector is right and the direction of the second vector is down If the direction of the first vector is up and the direction of the second vector is right, the direction of the first vector is left and the direction of the second vector is right , The first vector If the direction of the torque vector is down and the direction of the second vector is left, and if the direction of the first vector is right and the second
And the function of assigning the attribute of a vertical dot to the vertex dot of interest when the direction of the vector is left, and the attribute of the horizontal dot to the vertex dot of interest otherwise. A figure filling device.
いて、 前記頂点処理ユニットは、 前記頂点座標情報に基づいて前記第1及び第2のベクト
ルの方向をそれぞれ上、下、右、又は左に分類する機能
と、 前記第1のベクトルの方向が上でありかつ前記第2のベ
クトルの方向が上である場合、前記第1のベクトルの方
向が右でありかつ前記第2のベクトルの方向が上である
場合、前記第1のベクトルの方向が下でありかつ前記第
2のベクトルの方向が下である場合、前記第1のベクト
ルの方向が左でありかつ前記第2のベクトルの方向が下
である場合、前記第1のベクトルの方向が下でありかつ
前記第2のベクトルの方向が右である場合、前記第1の
ベクトルの方向が左でありかつ前記第2のベクトルの方
向が右である場合、前記第1のベクトルの方向が上であ
りかつ前記第2のベクトルの方向が左である場合、及
び、前記第1のベクトルの方向が右でありかつ前記第2
のベクトルの方向が左である場合にはそれぞれ前記着目
頂点ドットに垂直ドットの属性を、その他の場合には前
記着目頂点ドットに水平ドットの属性をそれぞれ割り当
てる機能とを備えたことを特徴とする図形塗りつぶし装
置。4. The graphic filling device according to claim 2, wherein the vertex processing unit classifies directions of the first and second vectors as upper, lower, right, or left, respectively, based on the vertex coordinate information. When the direction of the first vector is up and the direction of the second vector is up, the direction of the first vector is right and the direction of the second vector is up If the direction of the first vector is down and the direction of the second vector is down, the direction of the first vector is left and the direction of the second vector is down If the direction of the first vector is down and the direction of the second vector is right, the direction of the first vector is left and the direction of the second vector is right , The first vector If the direction of the torque vector is up and the direction of the second vector is left, and if the direction of the first vector is right and the second
And the function of assigning the attribute of a vertical dot to the vertex dot of interest when the direction of the vector is left, and the attribute of the horizontal dot to the vertex dot of interest otherwise. A figure filling device.
いて、 前記頂点処理ユニット及び前記輪郭線分処理ユニット
は、垂直ドット又は水平ドットの属性が既に割り当てら
れた既処理ドットに新たに垂直ドット又は水平ドットの
属性を割り当てようとする場合、新たなドット属性が前
のドット属性と一致するときには該既処理ドットに水平
ドットの属性を、そうでないときには該既処理ドットに
垂直ドットの属性をそれぞれ割り当てる機能をそれぞれ
更に備えたことを特徴とする図形塗りつぶし装置。5. The graphic filling device according to claim 2, wherein the vertex processing unit and the contour line processing unit newly add a vertical dot or a horizontal dot to a processed dot to which an attribute of a vertical dot or a horizontal dot has already been assigned. When assigning dot attributes, a function to assign a horizontal dot attribute to the processed dot when the new dot attribute matches the previous dot attribute, and a vertical dot attribute to the processed dot otherwise A figure filling device, further comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14485799A JP3249096B2 (en) | 1998-06-08 | 1999-05-25 | Figure filling device |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10-158790 | 1998-06-08 | ||
| JP15879098 | 1998-06-08 | ||
| JP14485799A JP3249096B2 (en) | 1998-06-08 | 1999-05-25 | Figure filling device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2000067254A JP2000067254A (en) | 2000-03-03 |
| JP3249096B2 true JP3249096B2 (en) | 2002-01-21 |
Family
ID=26476144
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP14485799A Expired - Fee Related JP3249096B2 (en) | 1998-06-08 | 1999-05-25 | Figure filling device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3249096B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8390641B2 (en) | 2009-02-23 | 2013-03-05 | Fujitsu Limited | Device and method for multicolor vector image processing |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006209654A (en) * | 2005-01-31 | 2006-08-10 | Matsushita Electric Ind Co Ltd | Polygon drawing device with pattern |
-
1999
- 1999-05-25 JP JP14485799A patent/JP3249096B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8390641B2 (en) | 2009-02-23 | 2013-03-05 | Fujitsu Limited | Device and method for multicolor vector image processing |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2000067254A (en) | 2000-03-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR900008399B1 (en) | Image processing system | |
| EP0592770A2 (en) | Pixel image edge enhancement method and system | |
| KR100520652B1 (en) | Figure filling apparatus | |
| JP2001265314A (en) | Display system, data display method, shadowed character font generation method, and recording medium | |
| JP3249096B2 (en) | Figure filling device | |
| JP2002519793A (en) | Method and system for rendering graphic elements | |
| JPH01296389A (en) | Graphic processing method and device | |
| JPH09259290A (en) | Drawing method | |
| US6992670B2 (en) | Active region determination for line generation in regionalized rasterizer displays | |
| US5553219A (en) | Font outline and bit map generator synthesizing filling data with selected outline data or duplicate outline data | |
| JP3898426B2 (en) | Graphic drawing device | |
| JP2000066658A (en) | Image processor and recording medium | |
| JP3129717B2 (en) | Image processing apparatus and image processing method | |
| JP4320604B2 (en) | Image processing method and image processing apparatus | |
| JP3493745B2 (en) | Drawing device | |
| US7667714B2 (en) | Patterned polygon rendering apparatus | |
| JP3191409B2 (en) | Font data generator | |
| US20010024285A1 (en) | Image processing apparatus | |
| JPS593693A (en) | Figure drawing control system of printer | |
| JP2524393Y2 (en) | Image processing device | |
| JP2664948B2 (en) | Image processing apparatus and image processing method | |
| JPS61267096A (en) | Smear drawing display unit for polygonal graphic | |
| JPH06162213A (en) | Rectangular surface painting system | |
| JPH06119462A (en) | Three-dimensional image generating device | |
| JPH0750514B2 (en) | 3D graphic display |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071109 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081109 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091109 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091109 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101109 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111109 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121109 Year of fee payment: 11 |
|
| LAPS | Cancellation because of no payment of annual fees |