Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3146031B2 - Segment data management method and clipping processing method using this management method - Google Patents
[go: Go Back, main page]

JP3146031B2 - Segment data management method and clipping processing method using this management method - Google Patents

Segment data management method and clipping processing method using this management method

Info

Publication number
JP3146031B2
JP3146031B2 JP27255291A JP27255291A JP3146031B2 JP 3146031 B2 JP3146031 B2 JP 3146031B2 JP 27255291 A JP27255291 A JP 27255291A JP 27255291 A JP27255291 A JP 27255291A JP 3146031 B2 JP3146031 B2 JP 3146031B2
Authority
JP
Japan
Prior art keywords
clip
segment
scan line
memory
clip segment
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
Application number
JP27255291A
Other languages
Japanese (ja)
Other versions
JPH05108837A (en
Inventor
博照 土屋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Tec Corp
Original Assignee
Toshiba Tec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Tec Corp filed Critical Toshiba Tec Corp
Priority to JP27255291A priority Critical patent/JP3146031B2/en
Publication of JPH05108837A publication Critical patent/JPH05108837A/en
Application granted granted Critical
Publication of JP3146031B2 publication Critical patent/JP3146031B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、画像処理に適用される
セグメントデータ管理方法及びこの管理方法を使用した
クリッピング処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a segment data management method applied to image processing and a clipping processing method using the management method.

【0002】[0002]

【従来の技術】特開平1−304588号公報に見られ
るセグメントデータ管理方法及びクリッピング処理方法
は以下のようになっている。
2. Description of the Related Art A segment data management method and a clipping processing method disclosed in JP-A-1-304588 are as follows.

【0003】図8に示すような図形の頂点を反時計回り
に順次読み込み、進入頂点(P0 ,P4 )と退出頂点
(P2 ,P5 )を見付けた時点で進入頂点、退出頂点の
1組毎に図9に示すセグメントデータ管理メモリ1を作
成している。セグメントデータ管理メモリ1は、クリッ
プセグメントメモリ2の各領域を管理するデータを格納
している。そしてセグメントデータ管理メモリ1に格納
するデータは進入頂点ポインタ、進入頂点Y座標、クリ
ップ領域のワード数、セグメントメモリポインタで、各
領域毎に作成されるようになっている。
The vertices of a figure as shown in FIG. 8 are sequentially read in a counterclockwise direction, and when the entry vertices (P0, P4) and the exit vertices (P2, P5) are found, each pair of the entry vertices and the exit vertices is determined. The segment data management memory 1 shown in FIG. 9 is created. The segment data management memory 1 stores data for managing each area of the clip segment memory 2. The data stored in the segment data management memory 1 is an entry vertex pointer, an entry vertex Y coordinate, the number of words in a clip area, and a segment memory pointer, which are created for each area.

【0004】また最初の領域の進入頂点ポインタを指す
ルートポインタが設けられている。進入頂点ポインタ
は、進入頂点をY座標値の小さい順に結ぶポインタであ
る。進入頂点Y座標値はセグメントの座標値を計算する
のに使用される。クリップ領域のワード数はクリップセ
グメントメモリ2の大きさを知るのに使用される。セグ
メントメモリポインタはクリップセグメントメモリ2の
各領域の最初のアドレを知るのに使用される。進入頂
点はスキャンラインを順次インクリメントしたときに進
入してきた頂点を示し、退出頂点はスキャンラインをじ
ゅんじインクリメントしたときに外れていく頂点を示し
ている。
[0004] A root pointer is provided which points to the approaching vertex pointer of the first area. The entry vertex pointer is a pointer that connects the entry vertices in ascending order of the Y coordinate value. The entry vertex Y coordinate value is used to calculate the coordinate value of the segment. The number of words in the clip area is used to determine the size of the clip segment memory 2. Segment memory pointer is used to determine the first address of each area of the clip segment memory 2. The entry vertex indicates a vertex that has entered when the scan line is sequentially incremented, and the exit vertex indicates a vertex that deviates when the scan line is incremented.

【0005】セグメント管理メモリ1の作成は以下の手
順で行われる。まず頂点P0 が進入頂点であることが判
定され、そのY座標を進入頂点Y座標として登録する。
次に退出頂点を頂点P1 から順次判定する。そして頂点
P2 が退出頂点であることが判定される。退出頂点P2
のY座標と進入頂点P0 のY座標の差をクリップ領域の
ワード数として登録する。クリップセグメントメモリ2
のアドレスをセグメントメモリポインタとして登録し、
それにクリップ領域のワード数を加えたものを次の進入
頂点、退出頂点の組の領域のセグメントメモリポインタ
とする。
The creation of the segment management memory 1 is performed according to the following procedure. First, it is determined that the vertex P0 is the approach vertex, and the Y coordinate is registered as the approach vertex Y coordinate.
Next, the exit vertex is determined sequentially from the vertex P1. Then, it is determined that the vertex P2 is the exit vertex. Exit vertex P2
Is registered as the number of words in the clip area. Clip segment memory 2
Is registered as a segment memory pointer,
The sum of the number of words in the clip area and the number of words in the clip area is used as the segment memory pointer of the area of the pair of the next entry vertex and the exit vertex.

【0006】以下、同様に進入頂点、退出頂点の組を作
成し、セグメントデータ管理メモリ1に登録する。そし
て最後に進入頂点のY座標値を小さい順にソートし、進
入頂点ポインタで結合する。
In the same manner, a set of an ingress vertex and an exit vertex is similarly created and registered in the segment data management memory 1. Finally, the Y-coordinate values of the approaching vertices are sorted in ascending order, and connected by the approaching vertex pointer.

【0007】クリップセグメントメモリ2の作成は、ま
ずスャンラインYs をクリップ領域の最小のY座標値に
セットする。そのスキャンライン上のクリップセグメン
トとなる始点X座標値、終点X座標値を生成する。そし
てセグメントデータ管理メモリ1のある領域の進入頂点
のY座標値よりスキャンラインYs が小さくないこと及
びその領域での退出頂点のY座標値(進入頂点のY座標
値+クリップ領域のワード数)よりスキャンラインYs
が大きくないことの判定をする。そしてもしいずれかの
否定結果を得たならば別の領域をサーチし上記条件を満
たす領域を探す。すなわちクリップセグメントを格納す
る領域を見つけ出す。
To create the clip segment memory 2, first, the scan line Ys is set to the minimum Y coordinate value of the clip area. A start point X coordinate value and an end point X coordinate value which are clip segments on the scan line are generated. Then, based on the fact that the scan line Ys is not smaller than the Y coordinate value of the entry vertex in a certain area of the segment data management memory 1 and the Y coordinate value of the exit vertex in that area (Y coordinate value of the entry vertex + the number of words in the clip area). Scan line Ys
Is not large. If any negative result is obtained, another area is searched for an area satisfying the above condition. That is, an area for storing the clip segment is found.

【0008】そして格納する領域を見つけると、格納ア
ドレス=スキャンラインYs −進入頂点Y座標値+セグ
メントメモリポインタの演算により格納アドレスを求
め、セグメントデータ始点X座標値、終点X座標値を格
納する。スキャンラインYs をインクリメントしてクリ
ップ領域を横切るスキャンラインについてこれらを行
う。
When a storage area is found, the storage address is obtained by calculating storage address = scan line Ys−entry vertex Y coordinate value + segment memory pointer, and the segment data start point X coordinate value and end point X coordinate value are stored. These operations are performed on the scan line that crosses the clip area by incrementing the scan line Ys.

【0009】次にセグメントメモリからのクリップセグ
メントのアクセス及びクリッピング処理について述べる
と、セグメント管理メモリ1からルートポインタを取出
し、ルートポインタが指す領域から進入頂点のY座標
値、クリップ領域のワード数を取出しセグメントメモリ
の作成時と同じ方法で判定をしながら格納されている領
域を見つけ、読出しアドレスを、格納アドレスを求める
式と同じ式で求め、クリップセグメントの始点X座標
値、終点X座標値を読み出す。そして描画セグメントと
クリップセグメントの共通部分を取出しマッピングす
る。
The clip segment access and clipping processing from the segment memory will now be described. The root pointer is extracted from the segment management memory 1, and the Y coordinate value of the entry vertex and the number of words in the clip area are extracted from the area pointed to by the root pointer. The stored area is found while making the determination in the same manner as when the segment memory was created, the read address is obtained by the same expression as the expression for obtaining the storage address, and the start point X coordinate value and end point X coordinate value of the clip segment are read. . Then, a common part of the drawing segment and the clip segment is extracted and mapped.

【0010】[0010]

【発明が解決しようとする課題】しかしこのような従来
のセグメントデータ管理方法及びクリッピング処理方法
では、クリップセグメントメモリ2の管理機構が複雑で
あり、特に閉じたクリップ経路が複数ある場合には複数
のセグメントデータ管理メモリ1を作成しなければなら
ず、さらに複雑化する問題があった。
However, in such a conventional segment data management method and the conventional clipping processing method, the management mechanism of the clip segment memory 2 is complicated, and particularly when there are a plurality of closed clip paths, a plurality of clip segments are required. The segment data management memory 1 has to be created, and there is a problem that it is further complicated.

【0011】またセグメントデータ管理メモリ1とクリ
ップセグメントメモリ2の作成が別々に行われるため図
形の頂点の読出しが重複しスピードが低下する問題があ
った。またクリップセグメントメモリ2への登録、読出
しの際にアドレス計算を必要とし、この点においてもス
ピードが低下する問題があった。
Also, since the segment data management memory 1 and the clip segment memory 2 are created separately, there is a problem that the reading of the vertices of the figure is duplicated and the speed is reduced. In addition, an address calculation is required when registering and reading data into and from the clip segment memory 2, and there is also a problem that the speed is reduced in this regard.

【0012】そこで本発明は、簡単な管理構成で高速処
理ができ、実用性を向上できるセグメントデータ管理方
法及びこの管理方法を使用したクリッピング処理方法を
提供しようとするものである。
It is an object of the present invention to provide a segment data management method capable of performing high-speed processing with a simple management configuration and improving practicality, and a clipping processing method using this management method.

【0013】[0013]

【課題を解決するための手段と作用】請求項1対応の発
明は、クリップ経路からなる図形を頂点及び交点を通る
スキャンラインで台形分割し、注目するスキャンライン
を順次インクリメントしてスキャンライン毎に有効なク
リップ領域における同一スキャンラインのクリップセグ
メントを取出し、そのクリップセグメントの始点、終点
の座標を順次クリップセグメントメモリに登録し、その
登録したクリップセグメントメモリの先頭アドレスを注
目しているスキャンラインのクリップバケットに登録す
ることにある。
According to a first aspect of the present invention, a figure formed by a clip path is trapezoidally divided by scan lines passing through vertices and intersections, and scan lines of interest are sequentially incremented for each scan line. The clip segment of the same scan line in the valid clip area is extracted, the coordinates of the start point and the end point of the clip segment are sequentially registered in the clip segment memory, and the start address of the registered clip segment memory is focused on the clip of the scan line. To register in the bucket.

【0014】請求項2対応の発明は、予めクリップ経路
からなる図形を頂点及び交点を通るスキャンラインで台
形分割し、注目するスキャンラインを順次インクリメン
トしてスキャンライン毎に有効なクリップ領域における
同一スキャンラインのクリップセグメントを取出し、そ
のクリップセグメントの始点、終点の座標を順次クリッ
プセグメントメモリに登録し、その登録したクリップセ
グメントメモリの先頭アドレスを注目しているスキャン
ラインのクリップバケットに登録しておき、この状態で
描画経路からなる図形を頂点及び交点を通るスキャンラ
インで台形分割し、注目するスキャンラインを順次イン
クリメントしてスキャンライン毎に有効な描画領域にお
けるスキャンラインの描画セグメントを取出し、注目し
ているスキャンラインのクリップバケットからクリップ
セグメントメモリへのアドレスを取出し、そのアドレス
によりクリップセグメントメモリからクリップセグメン
トの始点、終点の座標を取出して描画セグメントの区間
をクリップセグメントの区間でクリップしてマッピング
することにある。
According to a second aspect of the present invention, a figure consisting of a clip path is divided into trapezoids in advance by scan lines passing through vertices and intersections, and the scan lines of interest are sequentially incremented so that the same scan in a valid clip area for each scan line is performed. The clip segment of the line is taken out, the coordinates of the start point and the end point of the clip segment are sequentially registered in the clip segment memory, and the start address of the registered clip segment memory is registered in the clip bucket of the scan line of interest. In this state, the figure composed of the drawing path is divided into trapezoids by scan lines passing through the vertices and intersections, and the scan lines of interest are sequentially incremented to extract the drawing segments of the scan lines in the effective drawing area for each scan line. Scanler Address from the clip bucket of the clip segment to the clip segment memory, the coordinates of the start point and end point of the clip segment are extracted from the clip segment memory based on the address, and the drawing segment section is clipped and mapped in the clip segment section. .

【0015】[0015]

【実施例】以下、本発明の実施例を図面を参照して説明
する。
Embodiments of the present invention will be described below with reference to the drawings.

【0016】図1はブロック図で、11はクリップ処理
部である。このクリップ処理部11には描画経路及びク
リップ経路が与えられ、このクリップ処理部11は、描
画経路をクリップ経路によってクリップし、画素に展開
した後クリップされた描画経路を描画用メモリ12に与
えて格納させるようになっている。前記描画用メモリ1
2に格納された描画経路は順次ラスタ状に読み出されて
プリンタ装置13に与えられて印字され、又はCRTデ
ィスプレイ14に与えられて表示されるようになってい
る。
FIG. 1 is a block diagram, and 11 is a clip processing unit. The clip processing unit 11 is provided with a drawing path and a clip path. The clip processing unit 11 clips the drawing path by the clip path, expands the drawing path into pixels, and supplies the clipped drawing path to the drawing memory 12. It is designed to be stored. The drawing memory 1
The drawing paths stored in the storage device 2 are sequentially read in a raster form and provided to the printer device 13 for printing or provided to the CRT display 14 for display.

【0017】前記クリップ処理部11は、制御部15、
クリップセグメントメモリ16、クリップバケット1
7、セグメント画素変換部18及び入力部19からな
り、これらはバスライン20を介して接続されている。
The clip processing unit 11 includes a control unit 15,
Clip segment memory 16, clip bucket 1
7, a segment pixel conversion unit 18 and an input unit 19, which are connected via a bus line 20.

【0018】前記クリップ処理部11の制御部15はマ
イクロプロセッサを備え、図2に示す処理を行うように
なっている。なお、この処理は図6に実線で示した図形
をクリップ経路、点線で示した図形を描画経路とした場
合について述べる。
The control unit 15 of the clip processing unit 11 includes a microprocessor, and performs the processing shown in FIG. This processing will be described for the case where the graphic shown by the solid line in FIG. 6 is the clip path and the graphic shown by the dotted line is the drawing path.

【0019】まずステップS1 にてクリップ経路からな
る図形を頂点及び交点を通る水平線(スキャンライン)
で台形分割する。すなわちクリップ辺C0 〜C4 の座標
を順に読み込み、図7に示すような辺データ21を作成
する。この辺データ21には辺の始点、終点の座標、Y
座標の歩進1に対するxの傾き、次の辺データ21への
ポインタが格納される。辺の始点、終点の小さい方のY
座標に相当するバケット22に辺データ21のアドレス
を格納し、順次連結し辺データリストを作成する。次に
頂点CP01,CP34を通るx軸に平行な直線でクリップ
辺を台形分割する。そしてこれら2つの平行線の間に位
置する辺C0 ,C1 をアクティブ辺テーブル23に登録
する。
First, in step S1, a graphic consisting of a clip path is drawn on a horizontal line (scan line) passing through vertices and intersections.
Divide by trapezoid. That is, the coordinates of the clip sides C0 to C4 are sequentially read to create the side data 21 as shown in FIG. The side data 21 includes the coordinates of the start point and end point of the side, and Y
The inclination of x with respect to the step 1 of the coordinate and the pointer to the next side data 21 are stored. Y, the smaller of the start point and end point of the side
The addresses of the side data 21 are stored in buckets 22 corresponding to the coordinates, and sequentially linked to create a side data list. Next, the clip sides are trapezoidally divided by straight lines parallel to the x-axis passing through the vertices CP01 and CP34. Then, the sides C0 and C1 located between these two parallel lines are registered in the active side table 23.

【0020】次にステップS2 にてセグメントメモリポ
インタsmpにクリップセグメントメモリ16の先頭ア
ドレスをセットする。このステップS2の処理を詳しく
述べると図3に示す処理となる。
Next, in step S2, the start address of the clip segment memory 16 is set in the segment memory pointer smp. The processing in step S2 will be described in detail with reference to FIG.

【0021】すなわちステップS21にて図6に示すクリ
ップバケット17のY2 にセグメントメモリポインタs
mpの内容をセットする。ステップS22にてアクティブ
辺テーブル23内の辺から1組の有効なクリップ辺C0
,C1 のx座標を取出し、区間をクリップセグメント
とする。ステップS23にてスキャンラインY2 における
辺C0 のx座標X1s,辺C1 のx座標X1eをクリップセ
グメントメモリ16にセグメントメモリポインタsmp
から順に登録する。
That is, in step S21, the segment memory pointer s is set to Y2 of the clip bucket 17 shown in FIG.
Set the contents of mp. In step S22, a set of valid clip edges C0 from the edges in the active edge table 23
, C1 are taken out, and the section is set as a clip segment. In step S23, the x-coordinate X1s of the side C0 and the x-coordinate X1e of the side C1 on the scan line Y2 are stored in the segment memory pointer smp.
Register in order from.

【0022】次にステップS24にてセグメントメモリポ
インタsmpを2つ進める。そしてステップS25にてア
クティブ辺テーブル23の辺を全てサーチしたか否かを
判定するが、全てサーチしたのでステップS26にてセグ
メントメモリポインタsmpにNULLをセットし、1
つ進める。
Next, in step S24, the segment memory pointer smp is advanced by two. In step S25, it is determined whether or not all the edges of the active edge table 23 have been searched. However, since all of the edges have been searched, NULL is set in the segment memory pointer smp in step S26, and 1
Go forward.

【0023】次にステップS27にて台形が含むスキャン
ライン全てについて終了したかを判定するが、注目して
いる台形はさらにスキャンラインを含んでいるので、ス
テップS28にてスキャンラインYをインクリメントして
Y3 とし、アクティプ辺テーブル23内の辺C0 ,C1
のx座標を更新してそれぞれX2s,X2eとする。
Next, in step S27, it is determined whether or not all the scan lines included in the trapezoid have been completed. Since the trapezoid of interest further includes a scan line, the scan line Y is incremented in step S28. Let Y3 be the side C0, C1 in the active side table 23.
Are updated to X2s and X2e, respectively.

【0024】そして処理を再びステップS21に戻し、ク
リップバケット17のY3 にセグメントメモリポインタ
smpの内容をセットし、ステップS22にてx座標X2
s,X2eをクリップセグメントとし、ステップS23にて
スキャンラインY3 における辺C0 のx座標X2s,辺C
1 のx座標X2eをクリップセグメントメモリ16にセグ
メントメモリポインタsmpから順に登録する。そして
前記同様にステップS24,S25,S26,S27を順次行
う。スキャンラインY4 についても同様な処理を行い終
了する。次にステップS3 にて有効なクリップ領域のセ
グメントを求めクリップセグメントメモリ16に登録す
る。
Then, the process returns to step S21, and the content of the segment memory pointer smp is set in Y3 of the clip bucket 17, and in step S22, the x coordinate X2
s and X2e are clip segments, and in step S23, the x-coordinate X2s and the side C of the side C0 on the scan line Y3.
The x coordinate X2e of 1 is registered in the clip segment memory 16 in order from the segment memory pointer smp. Then, steps S24, S25, S26, and S27 are sequentially performed in the same manner as described above. The same processing is performed for the scan line Y4, and the process ends. Next, in step S3, a valid segment of the clip area is obtained and registered in the clip segment memory 16.

【0025】次にステップS4 にてクリップ経路の図形
は全て台形分割されたかを判定し、クリップ経路を全て
台形分割されるまでステップS1 〜S3 の処理を繰り返
す。クリップ経路が全て台形分割されるとステップS5
にて描画経路からなる図形を頂点及び交点を通る水平線
で台形分割する。すなわちステップS5 では描画辺l0
,l1 ,l2 を読み込み、ステップS1 と同様に辺デ
ータ、バケット、辺データリストを作成し、注目するス
キャンラインを通る辺をアクティブ辺テーブルに入れ、
頂点LP20,LP01を通る水平線で台形分割する。
Next, in step S4, it is determined whether or not all the graphics on the clip path have been trapezoidally divided, and the processing of steps S1 to S3 is repeated until all of the clip paths have been trapezoidally divided. When all clip paths are divided into trapezoids, step S5
The trapezoidal division of the figure composed of the drawing path is performed by a horizontal line passing through the vertices and intersections. That is, in step S5, the drawing side l0
, L1, l2 are read, edge data, buckets, and edge data lists are created in the same manner as in step S1, and edges passing through the scan line of interest are entered into the active edge table.
The trapezoid is divided by a horizontal line passing through the vertices LP20 and LP01.

【0026】そしてステップS6 にて2つの水平線で挟
まれた台形の左辺、右辺となる描画経路のセグメントを
作り、クリッピングデータからクリッピングセグメント
を取出してマッピングする。このステップS6 の処理を
詳しく述べると図4に示す処理となる。
In step S6, a segment of a drawing path corresponding to the left side and the right side of the trapezoid sandwiched between the two horizontal lines is created, and the clipping segment is extracted from the clipping data and mapped. The processing in step S6 will be described in detail with reference to FIG.

【0027】すなわちステップS61にてアクティブ辺テ
ーブル23から辺を取出し、左辺をl2 、右辺をl0 と
する。スキャンラインY3におけるx座標をそれぞれ求
めてX1s′,X1e′を得、スキャンラインY3 における
描画セグメントとする。そしてステップS62にてこの描
画セグメントをスキャンラインY3 におけるクリップセ
グメントでクリップしてマッピングする。
That is, in step S61, a side is taken out from the active side table 23, and the left side is l2 and the right side is l0. X1s 'and X1e' are obtained by obtaining the x-coordinates of the scan line Y3, respectively, and are used as drawing segments on the scan line Y3. Then, in step S62, the drawing segment is clipped with the clip segment on the scan line Y3 and mapped.

【0028】そしてステップS63にて台形が含むスキャ
ンラインを全て終了したかを判定し、終了していなけれ
ばステップS64にてスキャンラインYをインクリメント
する。そしてステップS61の処理に戻る。
In step S63, it is determined whether all the scan lines included in the trapezoid have been completed. If not, the scan line Y is incremented in step S64. Then, the process returns to step S61.

【0029】前記ステップS62の処理をさらに詳しく述
べると図5に示す処理となる。すなわちステップS6201
にてクリップセグメントの始点、終点を取出す。具体的
には注目するスキャンラインがY3 なのでY3 のクリッ
プバケット17からクリップセグメントメモリ16への
アドレスを取出す。そしてそのアドレスからクリップセ
グメントメモリ16に格納されているクリップセグメン
トのx座標の組X2s,X2eを取出す。
The processing in step S62 will be described in more detail with reference to FIG. That is, step S6201
Extract the start and end points of the clip segment with. Specifically, since the scan line of interest is Y3, the address to the clip segment memory 16 is fetched from the clip bucket 17 of Y3. Then, a set X2s, X2e of the x-coordinate of the clip segment stored in the clip segment memory 16 is extracted from the address.

【0030】続いてステップS6202にて描画セグメント
の終点がクリップセグメントの始点よりも小さいか否か
を判定する。この場合は描画セグメントの終点のx座標
X1e′がクリップセグメントの始点のx座標X2sより小
さいので描画セグメントはマッピングされない。そして
台形を横切るスキャンラインがまだ存在するので、スキ
ャンラインYをインクリメントしてY4 として図4の各
ステップS61〜S64の処理を繰り返す。結果的にはスキ
ャンラインY3 からY4 までは描画セグメントの終点の
x座標X1e′,X2e′のそれぞれがクリップセグメント
の始点のx座標X2s,X3sより小さいので描画セグメン
トはマッピングされない。
Subsequently, in step S6202, it is determined whether or not the end point of the drawing segment is smaller than the start point of the clip segment. In this case, since the x coordinate X1e 'of the end point of the drawing segment is smaller than the x coordinate X2s of the starting point of the clip segment, the drawing segment is not mapped. Then, since there is still a scan line crossing the trapezoid, the scan line Y is incremented to Y4, and the processing of steps S61 to S64 in FIG. 4 is repeated. As a result, since the x-coordinates X1e 'and X2e' of the end point of the drawing segment are smaller than the x-coordinates X2s and X3s of the starting point of the clip segment from the scan lines Y3 to Y4, the drawing segment is not mapped.

【0031】スキャンラインY5 ではステップS61にて
描画セグメントの始点、終点のx座標の組X3s′,X3
e′を得る。そしてステップS6201にてスキャンライン
Y5 におけるクリップバケット17からセグメントメモ
リポインタsmpを取出し、クリップセグメントメモリ
16からクリップセグメントの座標組X4s,X4eを得
る。描画セグメントの始点のx座標X3s′が取出したク
リップセグメントの終点のx座標X4eより大きいため、
ステップS6202,S6203,S6211と進み、セグメントメ
モリポインタsmpを2つ進める。クリップセグメント
メモリ16の内容はNULLでないので、ステップS62
01に戻る。そしてクリップセグメントメモリ16からク
リップセグメントの座標組X5s,X5eを得る。描画セグ
メントの終点のx座標X3e′がクリップセグメントの始
点のx座標より小さいので描画セグメントはマッピング
されない。
In the scan line Y5, a set X3s', X3 of the x-coordinate of the start point and the end point of the drawing segment in step S61.
Obtain e '. In step S6201, the segment memory pointer smp is fetched from the clip bucket 17 on the scan line Y5, and the coordinate set X4s, X4e of the clip segment is obtained from the clip segment memory 16. Since the x coordinate X3s' of the start point of the drawing segment is larger than the x coordinate X4e of the end point of the clip segment taken out,
The process proceeds to steps S6202, S6203, and S6211, and the segment memory pointer smp is advanced by two. Since the contents of the clip segment memory 16 are not NULL, step S62
Return to 01. Then, the coordinate sets X5s and X5e of the clip segments are obtained from the clip segment memory 16. Since the x coordinate X3e 'of the end point of the drawing segment is smaller than the x coordinate of the starting point of the clip segment, the drawing segment is not mapped.

【0032】台形を横切るスキャンラインがまだ存在す
るので、スキャンラインYをインクリメントしてY6 と
し、ステップS61にてスキャンラインY6 における左辺
l2、右辺l1 の座標X4s′,X4e′を描画セグメント
とする。そしてステップS6201にてスキャンラインY6
におけるクリップセグメントの座標X6s,X6eを取出
す。描画セグメントの始点のx座標X4s′がクリップセ
グメントの終点のx座標X6eよりも小さいので、ステッ
プS6202,S6203,S6204,S6208,S6210と進み、ス
テップS6210にて描画セグメントの始点X4s′とクリッ
プセグメントの終点X6eとの間をマッピングする。そし
てステップS6211にてセグメントメモリポインタsmp
を2つ進める。
Since there is still a scan line crossing the trapezoid, the scan line Y is incremented to Y6, and in step S61, the coordinates X4s 'and X4e' of the left side l2 and right side l1 of the scan line Y6 are used as drawing segments. Then, in step S6201, the scan line Y6
The coordinates X6s and X6e of the clip segment in are extracted. Since the x-coordinate X4s 'of the start point of the drawing segment is smaller than the x-coordinate X6e of the end point of the clip segment, the process proceeds to steps S6202, S6203, S6204, S6208, S6210, and in step S6210, the start point X4s' of the drawing segment and the clip segment Map between the end point X6e. Then, in step S6211, the segment memory pointer smp
Advance two.

【0033】NULLではないのでステップS6201に戻
り、クリップセグメントの始点、終点のx座標X7s,X
7eを取出す。描画セグメントの終点X4e′がクリップセ
グメントの終点X7eより小さいので、ステップS6202,
S6203,S6205,S6206と進み、ステップS6206にてク
リップセグメントの始点X7sと描画セグメントの終点X
4e′との間をマッピングする。そしてスキャンラインY
6 での処理を終了する。
Since it is not NULL, the process returns to step S6201 and the x-coordinates X7s, X7 of the start point and end point of the clip segment
Take out 7e. Since the end point X4e 'of the drawing segment is smaller than the end point X7e of the clip segment, step S6202,
The process proceeds to steps S6203, S6205, and S6206. In step S6206, the start point X7s of the clip segment and the end point X of the drawing segment
4e 'is mapped. And scan line Y
The processing in 6 ends.

【0034】その後ステップS61〜S64の処理をスキャ
ンラインY9 まで繰り返して終了する。水平線LP20と
LP01で挟まれる描画経路からなる台形は他に無いので
図2のステップS7 にて2つの水平線で挟まれる全ての
台形をマッピングしたかを判定し、この場合は全ての台
形をマッピングしたので、ステップS8 に進む。そして
ステップS8 では描画経路の図形を全て台形分割したか
を判定し、この場合はまだ台形分割していない図形が残
っているので、今度はステップS5 にて頂点LP01を通
る水平線と頂点LP12を通る水平線で台形分割し、ステ
ップS6,S7の処理を上記同様に行ってすべてのマッピ
ング処理を終了する。
Thereafter, the processing of steps S61 to S64 is repeated up to the scan line Y9, and the processing is terminated. Since there is no other trapezoid consisting of the drawing paths sandwiched by the horizontal lines LP20 and LP01, it is determined in step S7 in FIG. 2 whether all the trapezoids sandwiched by the two horizontal lines have been mapped. In this case, all the trapezoids have been mapped. Therefore, the process proceeds to step S8. Then, in step S8, it is determined whether or not all of the graphics on the drawing path have been trapezoid-divided. In this case, there remains graphics that have not been trapezoid-divided, so that in step S5, the horizontal line passing through vertex LP01 and the vertex LP12 are passed through. The trapezoid is divided by the horizontal line, and the processing of steps S6 and S7 is performed in the same manner as described above, and all the mapping processing ends.

【0035】このようなデータ管理方法を使用すれば従
来のような複雑なクリップセグメントメモリの管理は不
要となる。またクリップ図形及び描画図形のセグメント
作成の基本アルゴリズムが同じくなるので、管理が簡単
となる。
Using such a data management method makes it unnecessary to manage a complicated clip segment memory as in the related art. In addition, since the basic algorithm for creating segments of a clip graphic and a drawing graphic is the same, management is simplified.

【0036】またクリップセグメントメモリへのクリッ
プセグメントの格納や読出しのためのスキャンライン毎
の判定処理及び計算処理が不要で、クリップセグメント
メモリへのアクセスだけでクリップセグメントのアクセ
スができるため、高速処理が可能となる。
Further, the judgment and calculation for each scan line for storing and reading the clip segment in the clip segment memory are unnecessary, and the clip segment can be accessed only by accessing the clip segment memory. It becomes possible.

【0037】[0037]

【発明の効果】以上詳述したように本発明によれば、簡
単な管理構成で高速処理ができ、実用性を向上できるセ
グメントデータ管理方法及びこの管理方法を使用したク
リッピング処理方法を提供できるものである。
As described above, according to the present invention, it is possible to provide a segment data management method capable of performing high-speed processing with a simple management configuration and improving practicality, and a clipping processing method using this management method. It is.

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

【図1】本発明の実施例を示すブロック図。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】同実施例の要部処理を示す流れ図。FIG. 2 is a flowchart showing main part processing of the embodiment.

【図3】図2におけるステップS2 の処理を詳細に示す
流れ図。
FIG. 3 is a flowchart showing in detail a process of step S2 in FIG. 2;

【図4】図2におけるステップS6 の処理を詳細に示す
流れ図。
FIG. 4 is a flowchart showing details of the process in step S6 in FIG. 2;

【図5】図4におけるステップ62の処理をさらに詳細に
示す流れ図。
FIG. 5 is a flowchart showing the processing of step 62 in FIG. 4 in further detail;

【図6】同実施例におけるセグメントデータ管理及びク
リッピング処理を説明するための図。
FIG. 6 is an exemplary view for explaining segment data management and clipping processing in the embodiment.

【図7】同実施例において使用されるバケット、辺デー
タ、辺データリスト、アクディブ辺テーブルを説明する
ための図。
FIG. 7 is a view for explaining a bucket, side data, a side data list, and an active side table used in the embodiment.

【図8】従来例を説明するための図。FIG. 8 is a diagram for explaining a conventional example.

【図9】同従来例におけるセグメントデータ管理を説明
するための図。
FIG. 9 is a view for explaining segment data management in the conventional example.

【符号の説明】[Explanation of symbols]

11…クリップ処理部、15…制御部、16…クリップ
セグメントメモリ、17…クリップバケット。
11: clip processing unit, 15: control unit, 16: clip segment memory, 17: clip bucket.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 クリップ経路からなる図形を頂点及び交
点を通るスキャンラインで台形分割し、注目するスキャ
ンラインを順次インクリメントしてスキャンライン毎に
有効なクリップ領域における同一スキャンラインのクリ
ップセグメントを取出し、そのクリップセグメントの始
点、終点の座標を順次クリップセグメントメモリに登録
し、その登録したクリップセグメントメモリの先頭アド
レスを注目しているスキャンラインのクリップバケット
に登録することを特徴とするセグメントデータ管理方
法。
1. A graphic consisting of a clip path is trapezoidally divided by scan lines passing through vertices and intersections, and a scan line of interest is sequentially incremented to extract a clip segment of the same scan line in a valid clip area for each scan line. A segment data management method characterized by sequentially registering coordinates of a start point and an end point of the clip segment in a clip segment memory, and registering a start address of the registered clip segment memory in a clip bucket of a scan line of interest.
【請求項2】 予めクリップ経路からなる図形を頂点及
び交点を通るスキャンラインで台形分割し、注目するス
キャンラインを順次インクリメントしてスキャンライン
毎に有効なクリップ領域における同一スキャンラインの
クリップセグメントを取出し、そのクリップセグメント
の始点、終点の座標を順次クリップセグメントメモリに
登録し、その登録したクリップセグメントメモリの先頭
アドレスを注目しているスキャンラインのクリップバケ
ットに登録しておき、この状態で描画経路からなる図形
を頂点及び交点を通るスキャンラインで台形分割し、注
目するスキャンラインを順次インクリメントしてスキャ
ンライン毎に有効な描画領域におけるスキャンラインの
描画セグメントを取出し、注目しているスキャンライン
の前記クリップバケットから前記クリップセグメントメ
モリへのアドレスを取出し、そのアドレスにより前記ク
リップセグメントメモリからクリップセグメントの始
点、終点の座標を取出して描画セグメントの区間をクリ
ップセグメントの区間でクリップしてマッピングするこ
とを特徴とするクリッピング処理方法。
2. A graphic consisting of a clip path is divided into trapezoids by scan lines passing through vertices and intersections in advance, and a scan line of interest is sequentially incremented to extract a clip segment of the same scan line in a valid clip area for each scan line. The coordinates of the start point and the end point of the clip segment are sequentially registered in the clip segment memory, and the start address of the registered clip segment memory is registered in the clip bucket of the scan line of interest. Is divided into trapezoids by scan lines passing through vertices and intersections, the scan lines of interest are sequentially incremented to extract the drawing segments of the scan lines in the effective drawing area for each scan line, and the clip of the scan line of interest is extracted. Bake An address to the clip segment memory is obtained from the clip segment, coordinates of a start point and an end point of the clip segment are obtained from the clip segment memory based on the address, and a drawing segment section is clipped and mapped in the clip segment section. Clipping processing method.
JP27255291A 1991-10-21 1991-10-21 Segment data management method and clipping processing method using this management method Expired - Fee Related JP3146031B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27255291A JP3146031B2 (en) 1991-10-21 1991-10-21 Segment data management method and clipping processing method using this management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27255291A JP3146031B2 (en) 1991-10-21 1991-10-21 Segment data management method and clipping processing method using this management method

Publications (2)

Publication Number Publication Date
JPH05108837A JPH05108837A (en) 1993-04-30
JP3146031B2 true JP3146031B2 (en) 2001-03-12

Family

ID=17515496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27255291A Expired - Fee Related JP3146031B2 (en) 1991-10-21 1991-10-21 Segment data management method and clipping processing method using this management method

Country Status (1)

Country Link
JP (1) JP3146031B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204298B (en) * 2015-09-30 2017-06-30 合肥芯碁微电子装备有限公司 A kind of recessed quadrangle FPGA hardware fill method for direct-write type lithography machine pattern generator

Also Published As

Publication number Publication date
JPH05108837A (en) 1993-04-30

Similar Documents

Publication Publication Date Title
JP2865751B2 (en) Display screen scrolling method
US4975976A (en) Image transformation method and device
JP3110837B2 (en) Map figure data management method
EP0344686B1 (en) Clipping process and processor
JPH10320573A (en) Image processing apparatus and image processing method
JP3791259B2 (en) Outline smoothing processing method
JPH0540463A (en) Multi-level character generator
JP3146031B2 (en) Segment data management method and clipping processing method using this management method
JP3599198B2 (en) Figure editing device
JP2982973B2 (en) Pattern filling method
JPS63305478A (en) Pattern information restoring device
JP3322697B2 (en) Handwritten information display device
JP2768370B2 (en) Drawing method
JP2782904B2 (en) Polygon fill method
JPH0922472A (en) Image processing method
JP3530390B2 (en) Map figure deformation method, map figure deformation apparatus, and recording medium storing map figure deformation program
JPH10283495A (en) Image processing device
JPH0822555A (en) Graphic drawing method and apparatus
JP3350324B2 (en) Character output device
JPH10261095A (en) Image processing apparatus and image processing method
CN121936421A (en) Table rendering method and system based on plane rendering engine
JPH1020849A (en) Plotting processor
JPH03150684A (en) Printing device
JPH0679214B2 (en) Segment management device
JPH03150683A (en) Printing device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080105

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090105

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees