JP4914290B2 - Filling processing device and graphic display device - Google Patents
Filling processing device and graphic display device Download PDFInfo
- Publication number
- JP4914290B2 JP4914290B2 JP2007125679A JP2007125679A JP4914290B2 JP 4914290 B2 JP4914290 B2 JP 4914290B2 JP 2007125679 A JP2007125679 A JP 2007125679A JP 2007125679 A JP2007125679 A JP 2007125679A JP 4914290 B2 JP4914290 B2 JP 4914290B2
- Authority
- JP
- Japan
- Prior art keywords
- intersection position
- determination
- painting
- intersection
- scanning line
- 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
Images
Landscapes
- Image Generation (AREA)
Description
本発明は、ベクタグラフィックスにおける閉領域図形に対して塗潰し処理を実行する塗潰し処理装置および図形表示装置の技術に関する。 The present invention relates to a fill processor and graphical display equipment technology to perform the fill process on the closed region shape in vector graphics.
従来、コンピュータ図形処理のベクタグラフィックスにおいて、閉領域図形に対して塗潰し処理を実行するための手法として、例えば、走査線に交差する輪郭線を抽出し、走査線と輪郭線の交差位置を走査方向にソートするものがある。交差する順番に走査線を辿り、交差位置に辿り着いたときに二値の反転や、輪郭線のベクトル方向に応じて加算器にて値の1加算又は1減算をし、その結果に従い走査線方向へ塗潰し処理を行う。また、ソートを行わない手法として、走査線の開始位置から輪郭線までの領域について輪郭線の向きによって+−(又はXOR)することで判定バッファを書換え、かかる処理を交差位置の数だけ実行するものがある。塗潰し判定は、その結果得られた判定バッファの内容に従って行われる。また、輪郭線上の一点を頂点とし輪郭線に沿って隣接する三角形の領域について、頂点の向きによって二値の反転や+−の書き換えをし、その結果得られた判定バッファの内容に従って塗潰し判定を行うものがある(例えば、特許文献1参照)。 Conventionally, in vector graphics of computer graphic processing, as a technique for performing filling processing on a closed region graphic, for example, a contour line that intersects a scanning line is extracted, and the intersection position of the scanning line and the contour line is determined. Some sort in the scan direction. The scanning lines are traced in the order of crossing, and when the crossing position is reached, binary inversion or addition of 1 or subtraction of values by an adder is performed according to the vector direction of the contour line, and the scanning line is determined according to the result Fill in the direction. Further, as a method of not performing the sorting, the determination buffer is rewritten by + − (or XOR) depending on the direction of the contour line with respect to the region from the scanning line start position to the contour line, and such processing is executed by the number of intersection positions. There is something. The filling determination is performed according to the contents of the determination buffer obtained as a result. In addition, for a triangular area adjacent to the contour line with a point on the contour line, binary inversion or +/- rewrite is performed depending on the orientation of the vertex, and filling determination is performed according to the contents of the determination buffer obtained as a result. (For example, refer to Patent Document 1).
従来の手法によると、走査線ごとに輪郭線との交差位置を毎回抽出し、交差位置を走査方向へソートする場合には、長い処理時間が必要となる。走査線ごとに交差位置を抽出する処理に代えて、交差位置の座標を保持する場合には、保持可能な座標数がバッファのサイズに左右されることとなる。特許文献1に記載された技術では、三角形の各領域について判定バッファを書換え、図形の塗潰し領域を判定する。この場合、描画を行わない領域に対しても判定バッファの書換えを行う必要があることから、余分な処理のために判定バッファの書換え処理量が増大することとなる。
According to the conventional method, when the intersection position with the contour line is extracted for each scanning line every time and the intersection position is sorted in the scanning direction, a long processing time is required. When the coordinates of the intersection position are held instead of the process of extracting the intersection position for each scanning line, the number of coordinates that can be held depends on the size of the buffer. In the technique described in
本発明は、上記に鑑みてなされたものであって、ベクタグラフィックスにおける閉領域図形の塗潰し処理を行う際に、輪郭線と走査線との交差位置のソートを不要とし、判定バッファの書換え処理量を低減でき、かつ、バッファのサイズに依存しない塗潰し処理を可能とする塗潰し処理装置および図形表示装置を得ることを目的とする。 The present invention has been made in view of the above, and does not require the sorting of the intersection positions of contour lines and scanning lines when performing closed region graphic filling processing in vector graphics, and rewrites the determination buffer. processing amount can be reduced, and aims to obtain a fill processor and graphical display equipment to enable the fill process which does not depend on the size of the buffer.
上述した課題を解決し、目的を達成するために、本発明は、ベクタグラフィックスにおける閉領域図形を囲む輪郭線を辿る過程において、輪郭線と走査線とが交差する交差位置を判定する交差位置判定手段と、交差位置判定手段により判定された交差位置を走査線ごとのテーブルに記憶するテーブル記憶手段と、交差位置判定手段により判定された交差位置である第1交差位置と同一の走査線上であって、第1交差位置とは異なる交差位置である第2交差位置が、テーブルに記憶されているか否かを判定する交差位置記憶判定手段と、交差位置記憶判定手段による判定に応じて、第1交差位置及び第2交差位置の間について判定値を書き換えるか否かを判定する書換え処理判定手段と、書換え処理判定手段による判定結果を走査線ごとに保持する塗潰し判定保持手段と、予め設定された塗潰し条件と、塗潰し判定保持手段に保持された判定結果とを比較することにより塗潰し領域を決定する塗潰し条件比較手段と、塗潰し条件比較手段により決定された塗潰し領域に対して塗潰し処理を施す塗潰し生成手段と、を備え、書換え処理判定手段による判定値の書換えの判定とともに、テーブルから第2交差位置の情報を消去させることを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides an intersection position for determining an intersection position where an outline and a scanning line intersect in the process of tracing an outline surrounding a closed region graphic in vector graphics. On the same scanning line as the first intersection position that is the intersection position determined by the determination means, the intersection storage position determined by the intersection position determination means in a table for each scanning line, and the intersection position determination means In accordance with the determination by the intersection position storage determination means and the intersection position storage determination means for determining whether or not the second intersection position, which is an intersection position different from the first intersection position, is stored in the table, Rewrite processing determination means for determining whether or not to rewrite the determination value between the first intersection position and the second intersection position, and the determination result by the rewrite processing determination means is held for each scanning line A paint determination holding means, a paint condition comparison means for determining a paint area by comparing a preset paint condition with a judgment result held in the paint judgment holding means, and a paint condition. And a paint generation means for performing paint processing on the paint area determined by the comparison means, and erases the information of the second intersection position from the table together with the judgment value rewriting judgment by the rewrite processing judgment means. It is characterized by that.
この発明によれば、交差位置を走査線ごとのテーブルに記憶するテーブル記憶手段と塗潰し判定保持手段とを組み込むことにより、輪郭線と走査線との交差位置のソートを不要にできる。描画を行わない領域に対する判定バッファの書換えを不要とすることで、判定バッファの書換え処理量を低減できる。テーブルに記憶された交差位置の情報は書換え処理の判定とともに消去されるため、バッファのサイズに依存しない塗潰し処理が可能となる。これにより、ベクタグラフィックスにおける閉領域図形の塗潰し処理を行う際に、輪郭線と走査線との交差位置のソートを不要とし、判定バッファの書換え処理量を低減でき、かつ、バッファのサイズに依存しない塗潰し処理を可能にできるという効果を奏する。 According to the present invention, by incorporating the table storage means for storing the intersection position in the table for each scanning line and the paint determination holding means, sorting of the intersection position between the contour line and the scanning line can be made unnecessary. By eliminating the need to rewrite the determination buffer for an area where drawing is not performed, the rewrite processing amount of the determination buffer can be reduced. Since the intersection position information stored in the table is erased together with the determination of the rewriting process, the filling process independent of the buffer size is possible. This eliminates the need to sort the intersections between contour lines and scan lines when filling closed-region graphics in vector graphics, reducing the amount of decision buffer rewrite processing, and reducing the buffer size. There is an effect that it is possible to perform a painting process that does not depend.
以下に図面を参照して、本発明に係る塗潰し処理装置および図形表示装置の最良な実施の形態を詳細に説明する。 With reference to the drawings, best embodiments of the fill processor and graphic display equipment according to the present invention will be described in detail.
実施の形態1.
図1は、本発明の実施の形態1に係る図形表示装置の構成図である。CPU(Central Processing Unit)15は、装置全体の制御を行うとともに、表示器51において図形を表示させるためのプログラムを実行する。主メモリ16は、CPU15が処理するデータやプログラムを記憶する。CD−ROMコントローラ17は、CD−ROMの図形情報をアクセスする。通信コントローラ18は、不図示の他の装置との情報を送受する。
FIG. 1 is a configuration diagram of a graphic display device according to
グラフィックスプロセッサ20は、グラフィックスメモリ40内の表示領域において図形を描画し、さらに描画したデータを読み出して表示器51に図形を表示させる表示手段を構成する。グラフィックスメモリ40を構成する素子としては、例えばDRAMを用いるのが望ましい。DRAMは、他のメモリと比べて、チップ面積に対するトランジスタの集積度が高いという特長を備える。また、高速ページモードアクセスというアクセス方式を持っており、アドレスの上位部分(例えばビット9以上)が一致している場合の連続アクセスにおいて、高速なアクセスが可能になる。DAC(Digital to Analog Converter)50は、グラフィックスプロセッサ20が出力するディジタル方式の表示データをアナログデータに変換する。
The
グラフィックスプロセッサ20のCPU I/F21は、システム制御レジスタ32等のレジスタ類やグラフィックスメモリ40へCPU15がアクセスするための制御を行う。描画ユニット23は、グラフィックスメモリ40内のディスプレイリストをフェッチし、そのリストに示されるコマンドに従って描画を行う。パラメータ変換部22は、必要に応じてコマンドのパラメータを変換する。表示コントローラ24は、描画ユニット23が描画したデータを表示するための制御を行う。
The CPU I /
グラフィックスプロセッサ20は、各要素が何らかの処理を行う度にグラフィックスメモリ40へアクセスするため、グラフィックスメモリ40へのアクセス効率を高めることが処理速度の向上につながる。そこで、グラフィックスプロセッサ20は、アクセス要求単位にキャッシュやFIFOを持つことでアクセス効率を高める。
Since the
CPU FIFO25は、CPU15によるグラフィックスメモリ40のアクセスを高速化させる。キャッシュ26、27、28は、それぞれコマンド専用、テクスチャ専用、描画専用のキャッシュである。表示バッファ29は、表示データ用のバッファである。
The CPU FIFO 25 speeds up the access of the
メモリコントローラ30は、キャッシュ26〜28やCPU FIFO25等から、グラフィックスメモリ40に対するアクセス要求を受け入れ、決定した優先順位に応じてアクセスを制御する。メモリコントローラ30は、表示コントローラ24からのアクセスを最優先する。但し、CPU15や描画ユニット23からのアクセスが行われる間は、CPU15や描画ユニット23からのアクセスが表示コントローラ24からのアクセスより優先される。
The
システム制御レジスタ32は、グラフィックスプロセッサ20の動作モードを指定するレジスタである。システム制御レジスタ32は、CPU15のキャッシュモードを指定するCAM(CPU Access Mode)320を有している。
The
次に、グラフィックスプロセッサ20及びグラフィックスメモリ40により構成される塗潰し処理装置の特徴的な機能である、ベクタグラフィックスにおける閉領域図形の塗潰し処理について説明する。
Next, a closed area graphic filling process in vector graphics, which is a characteristic function of the filling processing apparatus including the
図2は、塗潰し処理を実行する塗潰し処理装置の機能構成を示すブロック図である。塗潰し処理装置は、交差判定器1、交差位置判定器2、交差位置記憶判定器3、記憶テーブル4、書換え処理判定器5、塗潰し判定バッファ6、塗潰し条件比較器7、及び塗潰し生成器8を備える。
FIG. 2 is a block diagram illustrating a functional configuration of a painting processing apparatus that executes the painting processing. The painting processing apparatus includes an
交差判定器1は、閉領域図形を囲む輪郭線を辿る過程において、輪郭線と走査線との交差の有無を判定する。交差位置判定器2は、輪郭線と走査線とが交差する交差位置を判定する交差位置判定手段を構成する。交差位置記憶判定器3は、第2交差位置が記憶テーブル4に記憶されているか否かを判定する交差位置記憶判定手段を構成する。交差位置判定手段により判定された交差位置を第1交差位置とすると、第2交差位置は、第1交差位置と同一の走査線上であって、第1交差位置とは異なる交差位置である。記憶テーブル4は、交差位置判定器2により判定された交差位置を走査線ごとのテーブルに記憶するテーブル記憶手段を構成する。
The intersection determiner 1 determines whether or not there is an intersection between the contour line and the scanning line in the process of tracing the contour line surrounding the closed region graphic. The intersection
書換え処理判定器5は、交差位置記憶判定器3による判定に応じて、第1交差位置及び第2交差位置の間について判定値を書き換えるか否かを判定する書換え処理判定手段を構成する。判定値とは、走査線上の画素の画素値である。書換え処理判定器5は、判定値を反転させるか否かを判定する。また、書換え処理判定器5による判定値の反転の判定とともに、テーブルから第2交差位置の情報を消去させる。 The rewrite process determination unit 5 constitutes a rewrite process determination unit that determines whether to rewrite the determination value between the first intersection position and the second intersection position in accordance with the determination by the intersection position storage determination unit 3. The determination value is a pixel value of a pixel on the scanning line. The rewrite processing determination unit 5 determines whether or not to reverse the determination value. Further, the information on the second intersection position is deleted from the table together with the determination of the reversal of the determination value by the rewrite processing determination unit 5.
塗潰し判定バッファ6は、書換え処理判定器5による判定結果を走査線ごとに保持する塗潰し判定保持手段を構成する。塗潰し判定バッファ6は、書換え処理判定器5の判定に応じて判定値を反転させ、その結果を保持する。塗潰し条件比較器7は、予め設定された塗潰し条件と、塗潰し判定バッファ6に保持された判定結果とを比較することにより塗潰し領域を決定する塗潰し条件比較手段を構成する。塗潰し生成器8は、塗潰し条件比較器7により決定された塗潰し領域に対して塗潰し処理を施す塗潰し生成手段を構成する。
The
次に、塗潰し処理装置の動作について説明する。直線や曲線を組合せた図形の輪郭線等のデータを記録するベクタグラフィックスでは、図3に示すように、閉領域を示す輪郭線の終了位置は、開始位置と一致する。開始位置から輪郭線の向きに辿る間、交差判定器1は、走査線と輪郭線との交差の有無を判定する。ここでは、塗潰しのための判定値の書換えについて、図3に示す閉領域図形の輪郭線と、走査線A、走査線B、走査線Cとの交差位置101〜110を例として説明する。輪郭線の向きは、図中矢印で表す。
Next, the operation of the painting processing apparatus will be described. In vector graphics for recording data such as contour lines of figures combining straight lines and curves, as shown in FIG. 3, the end position of the contour line indicating the closed region coincides with the start position. While tracing from the start position to the direction of the contour line, the
図4−1及び図4−2は、記憶テーブル4における記憶、及び塗潰し判定バッファ6における情報の保持について説明する図である。塗潰し判定バッファ6は、処理前において全て判定値「0」で初期化されている。図4−1に示すように開始位置から輪郭線の向きに輪郭線を辿ると、交差位置判定器2は、走査線Bに対する交差位置108を判定する。交差位置記憶判定器3は、走査線Bに対する他の交差位置が記憶テーブル4に記憶されているか否かを判定する。走査線Bに対するテーブルTBに交差位置は記憶されていないため、走査線Bに対するテーブルTBに交差位置108が記憶される。次に、交差位置判定器2は、走査線Aに対する交差位置104を判定する。走査線Aに対するテーブルTAに交差位置は記憶されていないため、走査線Aに対するテーブルTAに交差位置104が記憶される。
FIG. 4A and FIG. 4B are diagrams for explaining storage in the storage table 4 and retention of information in the
次に、交差位置判定器2は、走査線Aに対する交差位置101を判定する。判定された交差位置101を第1交差位置とすると、走査線Aに対するテーブルTAには第2交差位置である交差位置104が記憶されている。書換え処理判定器5は、両交差位置104、101間の判定値を反転させる判定を行う。両交差位置104、101間の判定値は「0」から「1」へ反転され、塗潰し判定バッファ6に保持される。また、書換え処理判定器5による判定値の反転の判定とともに、第2交差位置である交差位置104の情報がテーブルTAから消去される。
Next, the intersection
次に、交差位置判定器2は、走査線Bに対する交差位置106を判定する。走査線Bに対するテーブルTBには他の交差位置108が記憶されている。両交差位置108、106間の判定値は「0」から「1」へ反転され、塗潰し判定バッファ6に保持される。また、交差位置108の情報がテーブルTBから消去される。
Next, the intersection
さらに、交差位置判定器2は、図4−2に示すように、走査線Bに対する交差位置107を判定する。走査線Bに対するテーブルTBに交差位置は記憶されていないため、走査線Bに対するテーブルTBに交差位置107が記憶される。これと同様に、走査線Aに対するテーブルTAには交差位置103が記憶される。
Further, the intersection
次に、交差位置判定器2は、走査線Aに対する交差位置102を判定する。走査線Aに対するテーブルTAには他の交差位置103が記憶されている。両交差位置103、102間の判定値は「1」から「0」へ反転され、塗潰し判定バッファ6に保持される。また、交差位置103の情報がテーブルTAから消去される。
Next, the intersection
次に、交差位置判定器2は、走査線Bに対する交差位置105を判定する。走査線Bに対するテーブルTBには他の交差位置107が記憶されている。書換え処理判定器5により両交差位置107、105間の判定値を反転させる判定がなされることで、交差位置105、106間の判定値は「0」から「1」へ反転され、塗潰し判定バッファ6に保持される。また、交差位置106、107間の判定値は「1」から「0」へ反転され、塗潰し判定バッファ6に保持される。交差位置107の情報は、テーブルTAから消去される。
Next, the intersection
次に、交差位置判定器2は、走査線Cに対する交差位置110を判定する。走査線Cに対するテーブルTCに交差位置は記憶されていないため、走査線Cに対するテーブルTCに交差位置110が記憶される。さらに、交差位置判定器2により走査線C上の交差位置109が判定されると、両交差位置109、110間の判定値は「0」から「1」へ反転され、塗潰し判定バッファ6に保持される。また、交差位置110の情報がテーブルTCから消去される。
Next, the intersection
開始位置から輪郭線の向きに輪郭線を辿り、再び開始位置に到達する間、塗潰し処理装置は、以上のような処理を全ての走査線について実行する。塗潰し条件比較器7は、塗潰し判定バッファ6に保持された内容と塗潰し条件とを比較し、塗潰し領域に対して塗潰し処理を行うための塗潰し制御信号を出力する。塗潰し条件としてノン・ゼロ方式を採用する場合、「0」以外の判定値である領域を塗潰すこととなる。塗潰し生成器8は、塗潰し制御信号に応じて、ピクセルごとの塗潰しを実行する。以上により、塗潰し処理装置は、閉領域の塗潰し処理を実行する。グラフィックスプロセッサ20(図1参照)は、塗潰し生成器8により塗潰し処理が施された閉領域図形を表示器51(図1参照)に表示させる。
While the contour line is traced from the start position in the direction of the contour line and reaches the start position again, the painting processing apparatus executes the above-described processing for all the scanning lines. The painting condition comparator 7 compares the content held in the
記憶テーブル4の領域は有限であることから、全ての交差位置を保持する従来の技術の場合、走査線ごとに確保されるテーブルのサイズによっては複雑な図形に対応できないことがある。複雑な図形に対応するためには、描画面を分割し、各分割画面に対してテーブルを割り当てることも考えられる。この場合、画面の分割数だけ同様の処理の繰り返しが必要となるため、処理量が増大することとなる。 Since the area of the storage table 4 is limited, in the case of the conventional technique that holds all the intersection positions, a complicated figure may not be supported depending on the size of the table secured for each scanning line. In order to deal with complicated figures, it is conceivable to divide the drawing surface and assign a table to each divided screen. In this case, since the same processing needs to be repeated for the number of screen divisions, the processing amount increases.
本発明の塗潰し処理装置は、記憶テーブル4と塗潰し判定バッファ6を組み込むことにより、輪郭線と走査線との交差位置のソートを不要とし、かつ塗潰し判定バッファ6の書換え処理量を低減できる。テーブルに記憶された交差位置の情報は書換え処理の判定とともに消去されるため、各走査線について1つの交差位置の情報を記憶可能であれば足りる。よって、バッファのサイズに依存しない塗潰し処理を可能にできる。
The painting processing apparatus of the present invention incorporates the storage table 4 and the
実施の形態2.
図5は、本発明の実施の形態2に係る塗潰し処理装置の機能構成を示すブロック図である。本実施例の塗潰し処理装置は、交差判定器1、交差位置判定器2、輪郭線向き判定器11、交差位置記憶判定器3、記憶テーブル12、書換え処理判定器13、塗潰し判定バッファ14、塗潰し条件比較器7、及び塗潰し生成器8を備える。上記実施の形態1と同一の部分には同一の符号を付し、重複する説明を省略する。
FIG. 5 is a block diagram showing a functional configuration of the painting processing apparatus according to the second embodiment of the present invention. The painting processing apparatus according to the present embodiment includes an
輪郭線向き判定器11は、交差位置判定器2により判定された交差位置における輪郭線のベクトル方向を判定する輪郭線向き判定手段を構成する。ベクトル方向は、例えば、上向きか下向きかにより判定される。記憶テーブル12は、交差位置判定器2により判定された交差位置を走査線ごとのテーブルに記憶するテーブル記憶手段を構成する。また、記憶テーブル12は、輪郭線向き判定器11により判定されたベクトル方向をテーブルに記憶する。
The contour
書換え処理判定器13は、交差位置記憶判定器3による判定に応じて、第1交差位置及び第2交差位置の間について判定値を書き換えるか否かを判定する書換え処理判定手段を構成する。書換え処理判定器13は、第2交差位置についてテーブルに記憶されたベクトル方向に応じて判定値を加算又は減算するか否かを判定する。ここで、書換え処理判定器13は、第1交差位置及び第2交差位置を比較し、ベクトル向きが上向きである交差位置の座標が他方の交差位置の座標より大きければ判定値を1加算する判定を行い、ベクトル向きが上向きである交差位置の座標が他方の交差位置の座標より小さければ判定値を1減算する判定を行う。なお、図中横方向の座標は、左から右へ行くに従い大きくなるものとする。 The rewrite process determination unit 13 constitutes a rewrite process determination unit that determines whether or not to rewrite the determination value between the first intersection position and the second intersection position according to the determination by the intersection position storage determination unit 3. The rewrite processing determination unit 13 determines whether or not to add or subtract the determination value according to the vector direction stored in the table for the second intersection position. Here, the rewrite processing determination unit 13 compares the first intersection position and the second intersection position, and determines that the determination value is incremented by 1 if the coordinate of the intersection position in which the vector direction is upward is larger than the coordinate of the other intersection position. If the coordinates of the intersection position where the vector direction is upward are smaller than the coordinates of the other intersection position, the determination value is subtracted by 1. In the figure, the horizontal coordinate increases from left to right.
また、書換え処理判定器13による判定値の加算又は減算の判定とともに、テーブルから第2交差位置の情報、及び第2交差位置におけるベクトル方向の情報を消去させる。塗潰し判定バッファ14は、書換え処理判定器13による判定結果を走査線ごとに保持する塗潰し判定保持手段を構成する。塗潰し判定バッファ14は、書換え処理判定器13の判定に応じて判定値を加算又は減算させ、その結果を保持する。 In addition to the determination of addition or subtraction of the determination value by the rewrite processing determination unit 13, the information on the second intersection position and the vector direction information at the second intersection position are deleted from the table. The fill determination buffer 14 constitutes a fill determination holding unit that holds the determination result by the rewrite processing determination unit 13 for each scanning line. The fill determination buffer 14 adds or subtracts a determination value according to the determination of the rewrite processing determination unit 13 and holds the result.
図6−1及び図6−2は、記憶テーブル12における記憶、及び塗潰し判定バッファ14における情報の保持について説明する図である。図6−1に示すように、開始位置から輪郭線の向きに輪郭線を辿ると、交差位置判定器2は、走査線Bに対する交差位置108を判定する。輪郭線向き判定器11は、交差位置における輪郭線の向きが上向きであるか下向きであるかを判定する。交差位置108において、輪郭線の向きは上向きである。
FIG. 6A and FIG. 6B are diagrams for explaining storage in the storage table 12 and retention of information in the paint determination buffer 14. As shown in FIG. 6A, when the contour line is traced from the start position in the direction of the contour line, the intersection
交差位置記憶判定器3は、走査線Bに対する他の交差位置が記憶テーブル4に記憶されているか否かを判定する。走査線Bに対するテーブルTBに交差位置は記憶されていないため、走査線Bに対するテーブルTBに交差位置108が記憶される。また、テーブルTBには、ベクトル向きが上向きである旨が記憶される。これと同様に、走査線Aに対するテーブルTAには交差位置104が記憶される。また、テーブルTAには、交差位置104におけるベクトル向きが上向きである旨が記憶される。
The intersection position storage determination unit 3 determines whether another intersection position with respect to the scanning line B is stored in the storage table 4. Since the intersection position is not stored in the table TB for the scanning line B, the
次に、交差位置判定器2は、走査線Aに対する交差位置101を判定する。交差位置101において、輪郭線の向きは下向きである。判定された交差位置101を第1交差位置とすると、走査線Aに対するテーブルTAには第2交差位置である交差位置104が記憶されている。
Next, the intersection
両交差位置104、101を比較すると、ベクトル向きが上向きである交差位置104の座標が他方の交差位置101の座標より大きい。よって、書換え処理判定器13は、両交差位置104、101間の判定値を1加算させる判定を行う。両交差位置104、101間の判定値は1加算により「0」から「1」へ変換され、塗潰し判定バッファ14に保持される。また、書換え処理判定器13による判定値の加算の判定とともに、第2交差位置である交差位置104の情報、及び交差位置104におけるベクトル向きの情報がテーブルTAから消去される。
When the two
次に、交差位置判定器2は、走査線Bに対する交差位置106を判定する。交差位置106において、ベクトルの向きは下向きである。走査線Bに対するテーブルTBには他の交差位置108が記憶されている。両交差位置108、106を比較すると、ベクトル向きが上向きである交差位置108の座標が他方の交差位置106の座標より大きい。書換え処理判定器13は、交差位置108、106間の判定値を1加算させる判定を行う。両交差位置108、106間の判定値は1加算により「0」から「1」へ変換され、塗潰し判定バッファ14に保持される。また、書換え処理判定器13による判定値の加算の判定とともに、交差位置108の情報、及び交差位置108におけるベクトル向きの情報がテーブルTBから消去される。
Next, the intersection
さらに、交差位置判定器2は、図6−2に示すように、走査線Bに対する交差位置107を判定する。走査線Bに対するテーブルTBに交差位置は記憶されていないため、走査線Bに対するテーブルTBに交差位置107が記憶される。また、テーブルTBには、交差位置107におけるベクトル向きが上向きである旨が記憶される。走査線Aに対するテーブルTAには、交差位置103が記憶される。さらに、テーブルTAには、交差位置103におけるベクトル向きが上向きである旨が記憶される。
Further, the intersection
次に、交差位置判定器2は、走査線Aに対する交差位置102を判定する。交差位置102において、ベクトルの向きは下向きである。走査線Aに対するテーブルTAには他の交差位置103が記憶されている。両交差位置103、102を比較すると、ベクトル向きが上向きである交差位置103の座標が他方の交差位置102の座標より大きい。よって、書換え処理判定器13は、交差位置103、102間の判定値を1加算させる判定を行う。両交差位置103、102間の判定値は1加算により「1」から「2」へ変換され、塗潰し判定バッファ14に保持される。また、書換え処理判定器13による判定値の加算の判定とともに、交差位置103の情報、及び交差位置103におけるベクトル向きの情報がテーブルTAから消去される。
Next, the intersection
次に、交差位置判定器2は、走査線Bに対する交差位置105を判定する。交差位置105において、ベクトルの向きは下向きである。走査線Bに対するテーブルTBには他の交差位置107が記憶されている。両交差位置107、105を比較すると、ベクトル向きが上向きである交差位置107の座標が他方の交差位置105の座標より大きい。よって、書換え処理判定器13は、交差位置107、105の間の判定値を1加算させる判定を行う。両交差位置105、106間の判定値は1加算により「0」から「1」へ変換され、塗潰し判定バッファ14に保持される。また、両交差位置106、107間の判定値は1加算により「1」から「2」へ変換され、塗潰し判定バッファ14に保持される。交差位置107の情報、及び交差位置107におけるベクトル向きの情報は、テーブルTAから消去される。
Next, the intersection
次に、交差位置判定器2は、走査線Cに対する交差位置110を判定する。走査線Cに対するテーブルTCに交差位置は記憶されていないため、走査線Cに対するテーブルTCに交差位置110が記憶される。また、テーブルTCには、交差位置110におけるベクトル向きが下向きである旨が記憶される。さらに、交差位置判定器2は、走査線Cに対する交差位置109を判定する。交差位置109において、ベクトルの向きは上向きである。走査線Cに対するテーブルTCには他の交差位置110が記憶されている。
Next, the intersection
両交差位置110、109を比較すると、ベクトル向きが上向きである交差位置109の座標が他方の交差位置110の座標より小さい。書換え処理判定器13は、交差位置110、109間の判定値を1減算させる判定を行う。両交差位置110、109間の判定値は1減算により「0」から「−1」へ変換され、塗潰し判定バッファ14に保持される。また、書換え処理判定器13による判定値の減算の判定とともに、交差位置110の情報、及び交差位置110におけるベクトル向きの情報がテーブルTCから消去される。
When the two
開始位置から輪郭線の向きに輪郭線を辿り、再び開始位置に到達する間、塗潰し処理装置は、以上のような処理を全ての走査線について実行する。塗潰し条件比較器7は、塗潰し判定バッファ6に保持された内容と塗潰し条件とを比較し、塗潰し領域に対して塗潰し処理を行うための塗潰し制御信号を出力する。塗潰し条件としてノン・ゼロ方式を採用する場合、「0」以外の判定値である領域を塗潰すこととなる。また、イーブン・オッド方式を採用する場合、奇数の判定値である領域を塗潰すこととなる。塗潰し生成器8は、塗潰し制御信号に応じて、ピクセルごとの塗潰しを実行する。以上により、塗潰し処理装置は、閉領域の塗潰し処理を実行する。
While the contour line is traced from the start position in the direction of the contour line and reaches the start position again, the painting processing apparatus executes the above-described processing for all the scanning lines. The painting condition comparator 7 compares the content held in the
本実施の形態の場合も、上記実施の形態1の場合と同様に、輪郭線と走査線との交差位置のソートを不要とし、かつ塗潰し判定バッファ14の書換え処理量を低減できる。テーブルに記憶された交差位置の情報、及びベクトル向きの情報は書換え処理の判定とともに消去されるため、各走査線について1つの交差位置の情報、及びベクトル向きの情報を記憶可能であれば足りる。よって、バッファのサイズに依存しない塗潰し処理を可能にできる。 In the case of the present embodiment as well, as in the case of the first embodiment, it is not necessary to sort the intersection positions between the contour lines and the scanning lines, and the rewrite processing amount of the paint determination buffer 14 can be reduced. Since the intersection position information and vector direction information stored in the table are deleted together with the determination of the rewriting process, it is sufficient if information of one intersection position and vector direction information can be stored for each scanning line. Therefore, it is possible to perform the painting process independent of the buffer size.
以上のように、本発明に係る塗潰し処理装置および図形表示装置は、グラフィックスプロセッサにおけるベクタグラフィックスの高速化に適している。 As described above, the fill processor and graphic display equipment according to the present invention is suitable for high-speed vector graphics in a graphics processor.
2 交差位置判定器
3 交差位置記憶判定器
4、12 記憶テーブル
5、13 書換え処理判定器
6、14 塗潰し判定バッファ
7 塗潰し条件比較器
8 塗潰し生成器
11 輪郭線向き判定器
51 表示器
2 Crossing position determiner 3 Crossing
Claims (4)
前記交差位置判定手段により判定された前記交差位置を前記走査線ごとのテーブルに記憶するテーブル記憶手段と、
前記交差位置判定手段により判定された前記交差位置である第1交差位置と同一の前記走査線上であって、前記第1交差位置とは異なる交差位置である第2交差位置が、前記テーブルに記憶されているか否かを判定する交差位置記憶判定手段と、
前記交差位置記憶判定手段による判定に応じて、前記第1交差位置及び前記第2交差位置の間について判定値を書き換えるか否かを判定する書換え処理判定手段と、
前記書換え処理判定手段による判定結果を前記走査線ごとに保持する塗潰し判定保持手段と、
予め設定された塗潰し条件と、前記塗潰し判定保持手段に保持された前記判定結果とを比較することにより塗潰し領域を決定する塗潰し条件比較手段と、
前記塗潰し条件比較手段により決定された前記塗潰し領域に対して塗潰し処理を施す塗潰し生成手段と、
を備え、
前記書換え処理判定手段による前記判定値の書換えの判定とともに、前記テーブルから前記第2交差位置の情報を消去させることを特徴とする塗潰し処理装置。 Crossing position determination means for determining a crossing position where the contour line and the scanning line intersect in the process of following the contour line surrounding the closed region graphic in vector graphics;
Table storage means for storing the intersection position determined by the intersection position determination means in a table for each scanning line;
A second intersection position that is on the same scanning line as the first intersection position that is the intersection position determined by the intersection position determination means and that is different from the first intersection position is stored in the table. Crossing position memory determining means for determining whether or not
Rewrite processing determination means for determining whether to rewrite a determination value between the first intersection position and the second intersection position in accordance with the determination by the intersection position storage determination means;
Painting determination holding means for holding the determination result by the rewrite processing determination means for each scanning line;
A painting condition comparison unit that determines a painting region by comparing a preset painting condition with the determination result held in the painting judgment holding unit;
A paint generating means for applying a paint process to the paint area determined by the paint condition comparing means;
With
The paint processing apparatus, wherein the information on the second intersection position is erased from the table together with the determination of rewriting the determination value by the rewrite processing determination means.
前記テーブル記憶手段は、前記輪郭線向き判定手段により判定された前記ベクトル方向を前記テーブルに記憶し、
前記書換え処理判定手段は、前記第2交差位置について前記テーブルに記憶された前記ベクトル方向に応じて前記判定値を加算又は減算するか否かを判定し、
前記書換え処理判定手段による加算又は減算の判定とともに、前記テーブルから前記ベクトル方向の情報を消去させることを特徴とする請求項1に記載の塗潰し処理装置。 A contour direction determining means for determining a vector direction of the contour line at the intersection position determined by the intersection position determining means;
The table storage means stores the vector direction determined by the contour direction determination means in the table,
The rewrite processing determination means determines whether to add or subtract the determination value according to the vector direction stored in the table for the second intersection position;
The paint processing apparatus according to claim 1, wherein the vector direction information is deleted from the table together with the addition or subtraction determination by the rewrite processing determination unit.
ベクタグラフィックスにおける閉領域図形を囲む輪郭線を辿る過程において、前記輪郭線と走査線とが交差する交差位置を判定する交差位置判定手段と、
前記交差位置判定手段により判定された前記交差位置を前記走査線ごとのテーブルに記憶するテーブル記憶手段と、
前記交差位置判定手段により判定された前記交差位置である第1交差位置と同一の前記走査線上であって、前記第1交差位置とは異なる交差位置である第2交差位置が、前記テーブルに記憶されているか否かを判定する交差位置記憶判定手段と、
前記交差位置記憶判定手段による判定に応じて、前記第1交差位置及び前記第2交差位置の間について判定値を書き換えるか否かを判定する書換え処理判定手段と、
前記書換え処理判定手段による判定結果を前記走査線ごとに保持する塗潰し判定保持手段と、
予め設定された塗潰し条件と、前記塗潰し判定保持手段に保持された前記判定結果とを比較することにより塗潰し領域を決定する塗潰し条件比較手段と、
前記塗潰し条件比較手段により決定された前記塗潰し領域に対して塗潰し処理を施す塗潰し生成手段と、
前記塗潰し生成手段により塗潰し処理が施された前記閉領域図形を前記表示器に表示させる表示手段と、
を備え、
前記書換え処理判定手段による前記判定値の書換えの判定とともに、前記テーブルから前記第2交差位置の情報を消去させることを特徴とする図形表示装置。 An indicator,
Crossing position determination means for determining a crossing position where the contour line and the scanning line intersect in the process of following the contour line surrounding the closed region graphic in vector graphics;
Table storage means for storing the intersection position determined by the intersection position determination means in a table for each scanning line;
A second intersection position that is on the same scanning line as the first intersection position that is the intersection position determined by the intersection position determination means and that is different from the first intersection position is stored in the table. Crossing position memory determining means for determining whether or not
Rewrite processing determination means for determining whether to rewrite a determination value between the first intersection position and the second intersection position in accordance with the determination by the intersection position storage determination means;
Painting determination holding means for holding the determination result by the rewrite processing determination means for each scanning line;
A painting condition comparison unit that determines a painting region by comparing a preset painting condition with the determination result held in the painting judgment holding unit;
A paint generating means for applying a paint process to the paint area determined by the paint condition comparing means;
Display means for causing the display to display the closed region graphic subjected to the painting process by the painting generation means;
With
The graphic display device, wherein the information on the second intersection position is erased from the table together with the determination of rewriting the determination value by the rewrite processing determination means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007125679A JP4914290B2 (en) | 2007-05-10 | 2007-05-10 | Filling processing device and graphic display device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007125679A JP4914290B2 (en) | 2007-05-10 | 2007-05-10 | Filling processing device and graphic display device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008282208A JP2008282208A (en) | 2008-11-20 |
JP4914290B2 true JP4914290B2 (en) | 2012-04-11 |
Family
ID=40142972
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007125679A Expired - Fee Related JP4914290B2 (en) | 2007-05-10 | 2007-05-10 | Filling processing device and graphic display device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4914290B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3129717B2 (en) * | 1988-08-26 | 2001-01-31 | キヤノン株式会社 | Image processing apparatus and image processing method |
JPH02198496A (en) * | 1989-01-27 | 1990-08-06 | Ricoh Co Ltd | Image processing method |
US5043711A (en) * | 1989-06-09 | 1991-08-27 | Xerox Corporation | Representation of polygons defined by non-zero winding numbers |
JP3617225B2 (en) * | 1996-07-08 | 2005-02-02 | 富士ゼロックス株式会社 | Drawing processor |
JP4664169B2 (en) * | 2005-09-26 | 2011-04-06 | 三菱電機株式会社 | Graphic drawing apparatus and graphic drawing program |
-
2007
- 2007-05-10 JP JP2007125679A patent/JP4914290B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008282208A (en) | 2008-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS5995669A (en) | Graphic processor | |
CN108492243B (en) | Image rotation device, system and method based on block processing | |
JP3586991B2 (en) | Texture data reading device and rendering device | |
JP2009099098A (en) | Computer graphics drawing device and drawing method | |
KR950020279A (en) | Graphics computer | |
JP4914290B2 (en) | Filling processing device and graphic display device | |
US20020101428A1 (en) | Graphic engine and method for reducing idle time by validity test | |
US20030231176A1 (en) | Memory access device, semiconductor device, memory access method, computer program and recording medium | |
JP2007248647A (en) | Painting-out processor, graphic display device, and painting-out processing method | |
US7508397B1 (en) | Rendering of disjoint and overlapping blits | |
JP2005346605A (en) | Antialias drawing method and drawing apparatus using the same | |
JP4137903B2 (en) | Graphics display device and graphics processor | |
WO2014087541A1 (en) | Graphics rendering device | |
JP4784446B2 (en) | Image processing device | |
CN110223369B (en) | Frame buffer write-back method and device of TBR architecture and computer storage medium | |
CN112233206B (en) | Character image generation method, device, equipment and storage medium | |
CN115018713B (en) | Data storage and access method, device and storage medium for realizing graphic rotation | |
JPH1055166A (en) | Polygon painting-out accelerator | |
JP5310079B2 (en) | Image drawing device | |
Shuang et al. | DSP-based parallel processing model of image rotation | |
JP2007026307A (en) | Image processor and control method therefor | |
JP4482996B2 (en) | Data storage apparatus and method and image processing apparatus | |
JP4152383B2 (en) | Navigation system | |
US20070229509A1 (en) | Graphic system, broken line texture image generation apparatus, and broken line texture image generation method | |
JP3762185B2 (en) | Drawing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100225 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20100519 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110711 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110719 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110805 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120117 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120120 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150127 Year of fee payment: 3 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |