JP3057641B2 - Wind clipping method and apparatus - Google Patents

Wind clipping method and apparatus

Info

Publication number
JP3057641B2
JP3057641B2 JP1185848A JP18584889A JP3057641B2 JP 3057641 B2 JP3057641 B2 JP 3057641B2 JP 1185848 A JP1185848 A JP 1185848A JP 18584889 A JP18584889 A JP 18584889A JP 3057641 B2 JP3057641 B2 JP 3057641B2
Authority
JP
Japan
Prior art keywords
data
clipping
window
graphic
clipping window
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 - Lifetime
Application number
JP1185848A
Other languages
Japanese (ja)
Other versions
JPH02195484A (en
Inventor
リ フサン―フェング
ルイ チ―ユアン
ウェイ ティング―シ
ツアング ウェイ―フシン
Original Assignee
インダストリアル テクノロジー リサーチ インスチチュート
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 インダストリアル テクノロジー リサーチ インスチチュート filed Critical インダストリアル テクノロジー リサーチ インスチチュート
Publication of JPH02195484A publication Critical patent/JPH02195484A/en
Application granted granted Critical
Publication of JP3057641B2 publication Critical patent/JP3057641B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は1個または複数個のクリツピングウインドに
デ−タ表示を可能にするためのデイスプレイデ−タのク
リツピング方法と装置に関する。
Description: FIELD OF THE INVENTION The present invention relates to a method and an apparatus for clipping display data for enabling data to be displayed on one or more clipping windows.

(従来の技術とその問題点) これまで点、線および文字列をクリツプするクリツピ
ング技術には方形のウインドが使われてきた。ウインド
の内側に点、線および文字列が表示されるが、もちろん
外側には表示されない。従来技術は例えば、米国特許第
4,623,880号やアジソン・ウエズリ出版社、1982年発
行、フオ−リとヴアン・ダム著「対話型コンピユ−タグ
ラフイツクスの基礎」145頁から153頁に開示されてい
る。
(Prior art and its problems) A rectangular window has been used as a clipping technique for clipping points, lines and character strings. Points, lines and text are displayed inside the window, but not of course outside. The prior art is, for example, U.S. Pat.
No. 4,623,880 and Addison Wesley Publishing Company, 1982, published by Foley and Vuan Dam, "Basics of Interactive Computer Graphics," pages 145 to 153.

これらの開示によれば、次式の成立する場合のみ点が
表示される。
According to these disclosures, points are displayed only when the following equation is satisfied.

XminXXmax YminYYmax ここで(X,Y)は点の座標であり、XminとXmaxはウイ
ンドのX座標の境界であり、YminとYmaxはウインドのY
座標の境界である。
X min XX max Y min Y Y max where (X, Y) are the coordinates of the point, X min and X max are the boundaries of the X coordinate of the window, and Y min and Y max are the Y of the window.
This is the coordinate boundary.

またこれらの開示によれば、線を表示する場合、線と
クリツピングウインドのすべての境界との交叉点の計算
がいつも必要である。「コ−エン・サザ−ランドクリツ
ピング」アルゴリズムによれば、クリツピングウインド
の囲み領域を8区画に分割し、領域検査を用いることに
よりこれらの線を許容するかそれとも拒絶するかを識別
する。ある特殊な条件を満足する線に関しては交叉点の
計算を省くことができるが、他の線に関しては依然とし
て交叉点の計算を行わなければならない。米国特許第4,
623,880号には、ウインド内に一方の端点を有し、ウイ
ンド外に他方の端点を有する線に関しては、いくらか交
叉点の計算を省く技術が開示されている。しかし、もし
線がウインドを横切つていて、かつ両端点がウインドの
外側にあるとき、この技術でも交叉点の計算を行わなけ
ればならない。特に図形が非常に複雑な場合は交叉点の
計算が必要である。このように計算して線を描くのは非
常に時間がかかる。それに、クリツピングウインドが方
形でなければこのアルゴリズムは使えない。
Also, according to these disclosures, when displaying a line, it is always necessary to calculate the intersection of the line with all the boundaries of the clipping window. According to the "Coen Southland Land Clipping" algorithm, the bounding area of the clipping window is divided into eight sections, and area inspection is used to identify whether these lines are allowed or rejected. The calculation of the crossing point can be omitted for a line satisfying a specific condition, but the calculation of the crossing point must still be performed for other lines. U.S. Patent 4,
No. 623,880 discloses a technique in which a line having one end point inside a window and another end point outside the window does not need to calculate some intersections. However, if the line crosses the window and the endpoints are outside the window, the technique must also calculate the intersection. In particular, when the figure is very complicated, it is necessary to calculate the intersection. Calculating in this way and drawing a line is very time-consuming. Also, this algorithm cannot be used unless the clipping window is rectangular.

更に、これらの開示によれば文字列を表示する場合、
もし文字列が多数の線から構成されているならば、文字
があたかも一連の線であるかのように扱わなければなら
ない。もし文字列がビットマップデータで構成されるな
らば、各語または全文字列を包含するようなボックスを
つくってもよい。この場合には、クリッピング中はこの
ボックスとウィンド間の関係を判断するだけでよくな
る。しかし、クリッピングウィンドの中にボックスの全
体が含まれない場合には、完全なボックス(すなわち語
または文字列)は現れない。この技術により実行速度は
上がるが、文字列のうちの部分しかウィンド内に存在し
ない場合には表示されないから、不完全な結果に終わる
ことになる。
Further, according to these disclosures, when displaying a character string,
If a string consists of many lines, the characters must be treated as if they were a series of lines. If the string is composed of bitmap data, a box may be created to contain each word or the entire string. In this case, during clipping it is only necessary to determine the relationship between this box and the window. However, if the entire box is not included in the clipping window, the complete box (ie, word or string) will not appear. Although this technique speeds up execution, it will not be displayed if only part of the string is in the window, resulting in incomplete results.

(発明の要約) 本発明は従来技術における前述の問題点を解決するこ
とに指向するもので、その目的は、任意の形状のクリツ
ピングウインドにデ−タを配置するための速くて効率の
良い方法と装置を提供することである。本発明の目的は
また、従来の方法の欠点であるデ−タ配置の不完全性
と、複雑なアルゴリズムの使用を克服する方法と装置を
提供することにもある。
SUMMARY OF THE INVENTION The present invention is directed to overcoming the aforementioned problems in the prior art, and has as its object to provide a fast and efficient method for arranging data in a clipping window of any shape. A method and apparatus are provided. It is also an object of the present invention to provide a method and apparatus which overcomes the disadvantages of the conventional methods, data imperfection and the use of complex algorithms.

本発明の基本的な特徴を要約すると、任意の形状の1
個または複数個のウインドを記憶するためのビツトマツ
プメモリを採用し、ウインドの内側を表わす全ビツトに
書込んで、ウインドの内側と外側とを区別する。読取り
−修正−書込み命令を用いて点、線および文字列を描
き、それらを第2のビツトマツプメモリに記憶する。描
画中、クリツピングコントロ−ラを用いて、クリツピン
グウインドと描画に関する情報を含むビツトマツプデ−
タに論理演算を行う。その結果、本発明では、描画のう
ちクリッピングウィンドの外側にある区画を選んで排除
するためにする、描画とクリッピングウィンド境界との
交又点の計算を行う必要がない。
To summarize the basic features of the present invention, one of any shape
A bit map memory for storing one or a plurality of windows is employed, and all the bits representing the inside of the window are written to distinguish between the inside and the outside of the window. Draw points, lines and strings using the read-modify-write instructions and store them in the second bitmap memory. During drawing, a bitmap map including a clipping window and information on drawing is used by using a clipping controller.
Perform logical operation on data. As a result, in the present invention, it is not necessary to calculate the intersection between the drawing and the clipping window boundary in order to select and exclude a section outside the clipping window from the drawing.

本発明のさらに他の目的は、従来技術が方形のウイン
ドしか扱えないという欠点を克服することである。本発
明は1個または複数個の任意の形状のクリツピングウイ
ンドに図形デ−タを配置するウインドクリツピングの方
法と装置を提供することである。
Yet another object of the present invention is to overcome the disadvantage that the prior art can only handle square windows. SUMMARY OF THE INVENTION It is an object of the present invention to provide a window clipping method and apparatus for arranging graphic data in one or more clipping windows of any shape.

本発明は、前述の目的を達成するための技術手段とし
て、下記のものを採択し、結合する。すなわち、先ず本
発明では、グラフイツクプロセツサを採用するのが好ま
しい。グラフイツクプロセツサは第1のビツトマツプメ
モリにウインドデ−タを記憶して、ウインドの内部に対
応するビツト全部に1または0を書き込み、ウインドの
内側領域と外側領域とを区別する。それからグラフイツ
クプロセツサは書込み操作を実行して第2のビツトマツ
プメモリに図形デ−タを記憶する。それからグラフイツ
クプロセツサは浮いているデ−タバスを用いて両ビツト
マツプメモリに読取り操作を行い、すべてのデ−タビツ
トをハイ論理レベルで(デ−タバスに接続されているの
がプルアツプ抵抗器かプルダウン抵抗器かにより、ある
いはロ−論理レベルで)、読込む。両ビツトマツプメモ
リから出力された実際のデ−タはレジスタに記憶され
る。
The present invention adopts and combines the following as technical means for achieving the above-mentioned object. That is, first, in the present invention, it is preferable to employ a graphics processor. The graphics processor stores the window data in the first bit map memory, writes "1" or "0" in all the bits corresponding to the inside of the window, and distinguishes between the inner region and the outer region of the window. The graphics processor then performs a write operation to store the graphics data in the second bitmap memory. The graphics processor then performs a read operation on both bit map memories using the floating data bus, and places all data bits at a high logic level (whether a pull-up resistor is connected to the data bus or not). Read in (either through a pull-down resistor or at a low logic level). The actual data output from both bit map memories is stored in registers.

グラフイツクプロセツサは描画すべきデ−タを補足
し、描画しないデ−タは変えない。それからグラフイツ
クプロセツサは両ビツトマツプメモリに書き込み操作を
行う。
The graphics processor supplements the data to be drawn and does not change the data that is not drawn. The graphics processor then performs a write operation to both bitmap memories.

本発明で用いられるクリツピングコントロ−ラは論理
回路を含み、グリフイツクプロセツサから出力されてレ
ジスタに記憶されているデ−タビツトを受信する。それ
から各デ−タビツトを修正する。それから図形がクリツ
ピングウインドの内側にのみ描かれる。クリツピングウ
インド内のパタ−ンは描画と混合することができる。本
発明により、描画とクリツピングウインドの境界間の交
叉点を計算する必要は全くなくなり、任意の形状のクリ
ツピングウインド内にデ−タをクリツプして描く速度を
上げることができる。
The clipping controller used in the present invention includes a logic circuit and receives data output from the glyph processor and stored in a register. Then, modify each data bit. Then the figure is drawn only inside the clipping window. The pattern in the clipping window can be mixed with the drawing. According to the present invention, there is no need to calculate the intersection point between the boundary between the drawing and the clipping window, and the speed of drawing by clipping data in the clipping window of an arbitrary shape can be increased.

以下付図と共に本発明の実施例を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

(実施例) 第1図は本発明の好ましい一実施例であるシステムの
ブロツク図である。この回路はグラフイツクプロセツサ
1を含み、このプロセツサは市販の集積回路を用いるこ
とができるが、双方向性トランシ−バ3を介してビツト
マツプメモリ9,10、ラツチ8、レジスタ11,12、クリツ
ピングコントロ−ラ13の読取り−修正−書込み作用とデ
−タ転送とを制御する。この実施例におけるグラフイツ
クプロセツサはテキサスインスツルメント社製のTM3401
0GSPを用いてよい。これは32ビツトの内部構造と16ビツ
トの外部デ−タバスとを有し、各ピクセルは2ビツトで
構成されている。この集積回路はテキサスインスツルメ
ント社発行の「TMS34010ユーザガイド」1986年版に解説
されている。
FIG. 1 is a block diagram of a system according to a preferred embodiment of the present invention. This circuit includes a graphics processor 1, which can be a commercially available integrated circuit, but which includes a bit map memory 9, 10, a latch 8, a register 11, 12 via a bidirectional transceiver 3. It controls the read-modify-write action and data transfer of the clipping controller 13. The graphics processor in this embodiment is TM3401 manufactured by Texas Instruments.
0GSP may be used. It has a 32-bit internal structure and a 16-bit external data bus, and each pixel is composed of two bits. This integrated circuit is described in the 1986 edition of the TMS34010 User Guide, published by Texas Instruments.

図を簡単にするために、グラフイツクプロセツサ1に
接続される線は少しだけ示してある。接続線は16ビツト
の多重アドレス/デ−タバス(LADO−LAD15)を含む。
このシステムはラツチ2と双方向性トランシ−バ3を使
つてアドレスバス(SA0−SA25)とデ−タバス(SD0−SD
15)を選択する。行アドレスストロブ(/RAS)はメモリ
の(/RAS)入力を駆動するのに使われる。列アドレスス
トロブ(/CAS)はメモリの(/CAS)入力を駆動するのに
使われる。ロ−カルアドレスラツチ信号(/LAL)は、メ
モリの(/LAL)信号がハイレベルからローレベルに変わ
つたときに(LAD0−LAD15)ピンから列アドレスを読取
るのに使われる。書込みストロブ(/W)はメモリの(/
W)入力を駆動するのに使われる。シフトレジスタ転送
または出力イネ−ブル信号(/TR/QE)はVRAMの(/TR/Q
E)入力またはDMAMの(/QE)入力を駆動するのに使われ
る。デ−タイネ−ブル信号(/DEN)は双方向性トランシ
−バ3のロ−で有効の出力イネ−ブル入力を制御するの
に使われる。デ−タ方向出力信号(/DDUOT)は双方向性
トランシ−バ3の転送方向を制御するのに使われる。
For simplicity of illustration, the lines connected to the graphics processor 1 have been shown only slightly. The connection includes a 16-bit multiple address / data bus (LADO-LAD15).
This system uses an address bus (SA0-SA25) and a data bus (SD0-SD) using a latch 2 and a bidirectional transceiver 3.
15) Select. The row address strobe (/ RAS) is used to drive the (/ RAS) input of the memory. The column address strobe (/ CAS) is used to drive the (/ CAS) input of the memory. The local address latch signal (/ LAL) is used to read the column address from the (LAD0-LAD15) pins when the (/ LAL) signal of the memory changes from high level to low level. The write strobe (/ W) is
W) Used to drive inputs. The shift register transfer or output enable signal (/ TR / QE) is
Used to drive the E) input or the DMAM (/ QE) input. The de-enable signal (/ DEN) is used to control the low and valid output enable input of the bidirectional transceiver 3. The data direction output signal (/ DDUOT) is used to control the transfer direction of the bidirectional transceiver 3.

バスコントロ−ラ4は双方向性コントロ−ラ3の出力
イネ−ブルピンを制御する。CLPENが無効(ロ−)のと
き、双方向性トランシ−バ3の出力イネ−ブルピンはグ
ラフイツクプロセツサから(/DEN)により制御される。
CLPENが有効(ハイ)のとき、双方向性トランシ−バ3
の出力イネ−ブルピンが無能化される。このとき(LAD
0,2,4…14)がクリツピングコントロ−ラ13に加えられ
て、グラフイツクプロセツサ1が書込み操作を実行して
いるときに、クリツピングコントロ−ラ13により処理さ
れたデ−タがビツトマツプメモリ9に記憶される。なぜ
ならば、デ−タバスの各線にはプルアツプ抵抗器14が接
続されているので、グラフイツクプロセツサ1は読取り
操作を実行中すべてのデ−タビツトをハイレベルとして
読取るからである。メモリコントロ−ラ5について述べ
ると、グラフイツクプロセツサ1から出力された信号
(/RAS)、(/CAS)、(/TR/QE)、(/W)がふたつのグ
ル−プに分類される。一方のグル−プはビツトマツプメ
モリ9の読取り/書込み動作を制御するための(/RAS
A)、(/CASA)、(/OEA)、(/WA)であり、もう一方
のグル−プはビツトマツプメモリ10の読取り/書込み動
作を制御する(/RASB)、(/CASB)、(/OEB)、(/W
B)である。したがつてビツトマツプメモリ9と10は読
取り/書込み動作中は独立に制御することができる。
The bus controller 4 controls an output enable pin of the bidirectional controller 3. When CLPEN is invalid (low), the output enable pin of the bidirectional transceiver 3 is controlled by (/ DEN) from the graphics processor.
When CLPEN is valid (high), bidirectional transceiver 3
Output enable pin is disabled. At this time (LAD
0,2,4... 14) are added to the clipping controller 13 so that the data processed by the clipping controller 13 when the graphics processor 1 is executing a write operation. It is stored in the bitmap memory 9. This is because the pull-up resistor 14 is connected to each line of the data bus, so that the graphics processor 1 reads all data bits at a high level during the read operation. Referring to the memory controller 5, the signals (/ RAS), (/ CAS), (/ TR / QE), and (/ W) output from the graphics processor 1 are classified into two groups. . One group is used to control the read / write operation of the bit map memory 9 (/ RAS
A), (/ CASA), (/ OEA), and (/ WA), and the other group controls the read / write operation of the bit map memory 10 (/ RASB), (/ CASB), (/ / OEB), (/ W
B). Thus, bit map memories 9 and 10 can be independently controlled during read / write operations.

アドレスデコ−ダ6はビツトマツプメモリ選択信号
(/BMMSEL)を発生する。この信号はグラフイツクプロ
セツサ1がビツトマツプメモリ9と10にアクセス中であ
ることを示す。またアドレスデコーダ6はクリツピング
機能設定信号(/CFSET)をも発生する。この信号は双方
向性トランシ−バ3から出力されるデ−タビツト(SD
0)と(SD1)をラツチ8にラツして、クリツピングイネ
−ブル信号(CLPEN)とクリツピング状態信号(CLPST)
をつくることができる。これらの信号はクリツピングコ
ントロ−ラ13の動作を制御するために使うことができ
る。
The address decoder 6 generates a bit map memory selection signal (/ BMMSEL). This signal indicates that the graphics processor 1 is accessing the bitmap memories 9 and 10. The address decoder 6 also generates a clipping function setting signal (/ CFSET). This signal is the data (SD) output from the bidirectional transceiver 3.
(0) and (SD1) are latched on a latch 8, and a clipping enable signal (CLPEN) and a clipping state signal (CLPST) are provided.
Can be made. These signals can be used to control the operation of clipping controller 13.

デ−タバスの(SA0−SA17)はマルチプレクサ7の入
力である。(/LAL)がハイ論理レベルにあるとき、(SA
9−SA17)が出力として選択されて、ビツトマツプメモ
リ9と10のアドレス入力に加えられる。この信号がロ−
論理レベルにあるとき、(SA0−SA8)が出力として選択
されて、ビツトマツプメモリ9と10のアドレス入力に加
えられる。
The data bus (SA0-SA17) is an input of the multiplexer 7. When (/ LAL) is at the high logic level, (SA
9-SA17) is selected as an output and applied to the address inputs of bitmap memories 9 and 10. This signal is low.
When at logic level, (SA0-SA8) is selected as an output and applied to the address inputs of bitmap memories 9 and 10.

グラフイツクプロセツサ1がビツトマツプメモリ9と
10に対して読取り操作を実行すると、レジスタ11はビツ
トマツプメモリ9からデ−タビツト(SD0,SD2,…SD14)
を受取つて記憶し、レジスタ12はビツトマツプメモリ10
からデ−タビツトSD1,SD3,…SD15)を受取つて記憶す
る。これらのレジスタの出力はそれぞれ(XD0,XD2,…XD
14)と(XD1,XD3,…XD15)である。
The graphic processor 1 has a bit map memory 9
When a read operation is performed on the register 10, the register 11 stores the data bits (SD0, SD2,... SD14) from the bit map memory 9.
The register 12 stores the bit map memory 10
, And receive and store the data bits SD1, SD3,... SD15). The outputs of these registers are (XD0, XD2, ... XD
14) and (XD1, XD3, ... XD15).

クリツピングコントロ−ラ13はプログラム可能なアレ
イロジツク(PAL)である。この実施例の回路ではMMI社
により開発されたPAL20L8プログマブルアレイロジツク
チツプを採用している。クリツピングイネ−ブル信号
(CLPEN)が有効化された後、グラフイツクプロセツサ
1が書込み操作を実行すると、クリツピングコントロ−
ラ13はビツトマツプメモリ9を制御して負論理状態(す
なわちロ−で有効にし、ビツトマツプメモリ10を制御し
て正論理状態(すなわちハイで有効)にする。
Clipping controller 13 is a programmable array logic (PAL). The circuit of this embodiment employs a PAL20L8 programmable array logic chip developed by MMI. After the clipping enable signal (CLPEN) is validated, when the graphics processor 1 executes a write operation, the clipping control is performed.
The latch 13 controls the bitmap memory 9 to be in a negative logic state (i.e., valid at low), and controls the bitmap memory 10 to be in a positive logic state (i.e., valid at high).

(IF):もしデ−タバス上のデ−タビツトが0(ビツト
マツプメモリ9が正論理状態のとき1)ならば、 (THEN): (IF):もしクリツピング状態信号CLSTが0ならば (THEN): SDi=XDiOR(XDi+1); i=0,2,…,14 ……(1) (ELSE):さもなくば SDi=XDiAND(NOT XDi+1); i=0,2,…,14 ……(2) (ELSE):さもなくば SDi=XDi;i=0,2,…,14 …(3) ここでOR,AND,NOTは論理演算子である。
(IF): If the data bit on the data bus is 0 (1 when the bit map memory 9 is in a positive logic state), (THEN): (IF): If the clipping state signal CLST is 0, (THEN) ): SDi = XDiOR (XDi + 1); i = 0,2, ..., 14 (1) (ELSE): Otherwise SDi = XDiAND (NOT XDi + 1); i = 0,2, ..., 14 ... ( 2) (ELSE): Otherwise SDi = XDi; i = 0, 2,..., 14 (3) where OR, AND, NOT are logical operators.

ビツトマツプメモリ10が負の論理状態にあるとき、
(1)式は次のようになる。
When bit map memory 10 is in a negative logic state,
Equation (1) is as follows.

SDi=XDiAND XDi+1,i=0,2,…,14 また(2)式は次のようになる。 SDi = XDiAND XDi + 1, i = 0, 2,..., 14 Further, the expression (2) is as follows.

SDi=XDiOR(NOT XDi+1),i=0,2,…,14. 本発明の実施例は第5図の流れ図に示すように、以下
の如く動作する。
SDi = XDiOR (NOT XDi + 1), i = 0, 2,..., 14. The embodiment of the present invention operates as follows, as shown in the flowchart of FIG.

1. グラフイツクプロセツサ1はビツトマツプメモリ10
のビツトをクリアして、全ビツトの論理値を0にする
(ブロツク200)。
1. Graphic processor 1 is bitmap memory 10
Is cleared, and the logical values of all the bits are set to 0 (block 200).

2. グラフイツクプロセツサ1はビツトマツプメモリ10
の中にクリツピングウインドを描き、クリツピングウイ
ンドの内側に対応する全ビツトに1を書込む(ブロツク
210)。
2. Graphic processor 1 is bitmap memory 10
Draw a clipping window inside and write 1 to all bits corresponding to the inside of the clipping window (block
210).

3. もしクリツピングウインドの内側にパタ−ンが全く
なければ、プログラムはステツプ9にジヤンプする(ブ
ロツク220)。
3. If there is no pattern inside the clipping window, the program jumps to step 9 (block 220).

4. グラフイツクプロセツサ1のビツトブロツク転送機
能を用いて、ビツトマツプメモリ10全体をパタ−ンデ−
タで走査する。その間に、パタ−ンデ−タとビツトマツ
プメモリ10にAND論理演算を行つて、パタ−ンデ−タを
クリツピングウインドの内側のみに書込む(ブロツク23
0)。
4. By using the bit block transfer function of the graphic processor 1, the entire bit map memory 10 is patterned.
Scan with In the meantime, an AND logic operation is performed on the pattern data and the bit map memory 10 to write the pattern data only inside the clipping window (block 23).
0).

5. グラフイツクプロセツサ1はCLPEN信号を有効にし
て、信号CLPSTを0にセツトする。
5. Graphics processor 1 validates the CLPEN signal and sets signal CLPST to zero.

6. グラフイツクプロセツサ1は読取り−修正−書込み
操作を行うことにより、ビツトマツプメモリ9に図形デ
−タを書込む(ブロツク240)。読取り操作実行時に、
バスコントロ−ラ4は双方向性トランシ−バ3を無能化
するので、ビツトマツプメモリ9と10内のデ−タをグラ
フイツクプロセツサ1に送ることはできない。デ−タバ
スにはプルアツプ抵抗器14が接続されているので、グラ
フイツクプロセツサ1はすべてのデ−タを1として読
む。ビツトマツプメモリ9と10の出力はレジスタ11と12
に別々に記憶される。それからグラフイツクプロセツサ
は描画すべきデ−タビツトを0に修正し(ブロツク25
0)、描画しないデ−タをそのまま保持して、それから
書込み操作を実行する。書込み操作を実行するとき、グ
ラフイツクプロセツサ1から出力されるすべてのデ−タ
ビツトはクリツピングコントロ−ラ13により処理され
て、ビツトマツプメモリ9に書込まれる。この時、ビツ
トマツプメモリ10には書込みが行われない(ブロツク26
0)。
6. The graphics processor 1 writes graphic data to the bit map memory 9 by performing a read-modify-write operation (block 240). When performing a read operation,
Since the bus controller 4 disables the bidirectional transceiver 3, the data in the bit map memories 9 and 10 cannot be sent to the graphics processor 1. Since the pull-up resistor 14 is connected to the data bus, the graphics processor 1 reads all data as 1. The outputs of bitmap memories 9 and 10 are stored in registers 11 and 12
Are stored separately. The graphics processor then modifies the data to be drawn to zero (block 25).
0), the data not to be drawn is held as it is, and then the write operation is executed. When performing a write operation, all data bits output from the graphics processor 1 are processed by the clipping controller 13 and written to the bit map memory 9. At this time, no data is written to the bit map memory 10 (block 26).
0).

7. グラフイツクプロセツサ1は信号CLPENを無能化す
る。
7. Graphics processor 1 disables signal CLPEN.

8. グラフイツクプロセツサ1はビツトマツプメモリ10
にあるクリツピングウインド内部のデ−タをすべて論理
レベルを反転させるが、ウインド外部のデ−タは変えな
い(ブロツク270)。
8. Graphic processor 1 is bitmap memory 10
The logic level of all the data inside the clipping window is inverted, but the data outside the window is not changed (block 270).

9. グラフイツクプロセツサ1はCLPEN信号を有効化し
て、信号CLPSTを1にセツトする。
9. Graphics processor 1 validates the CLPEN signal and sets signal CLPST to one.

10. グラフイツクプロセツサ1は図形をビツトマツプ
メモリ9に書き込む(ブツク280)。やり方はステツプ
6と同じである。
10. The graphic processor 1 writes the graphic into the bit map memory 9 (book 280). The procedure is the same as step 6.

11. クリツピングイネーブル信号、CLPENを無効化す
る。
11. Disable the clipping enable signal, CLPEN.

12. クリツピングを終了する。これらの結果、期待し
たグラフイツクパターンがビツトマツプメモリ9の中に
得られている。
12. End clipping. As a result, the expected graphic pattern is obtained in the bit map memory 9.

以上の説明を理解しやすくするために、第2図にメモ
リの内容を図示してある。説明を簡単にするために、1
個のアドレスXのみを説明する。第2図(a)と(b)
はステツプ1から4を実行した結果を示す。最初にビツ
トマツプメモリ9に記憶されていたアドレスXの内容は
第2図(a)に示すように01100011である。点線で囲ま
れた方形のパターンは描画の境界を表わす。第2図
(b)はビツトマツプメモリ10の内容を示す。点線で囲
まれた三角形はクリツピングウインドの形状を表わし、
ウインドの内側にパターンが含まれている。あるものは
値1を有しまたあるものは値0を有する。ウインド外に
あるメモリにはすべて0が書込まれている。アドレスX
の一部はクリツピングウインドの内側にあり、一部はウ
インドの外側にあり、その値は01010000である。ステツ
プ5が実行された後、CLPENが有効化されてCLPSTが0に
セツトされる。それからステツプ6が実行される。グラ
フイツクプロセツサ1がアドレスXに読取り操作を実行
すると、ビツトマツプメモリ9から値01100011が出力さ
れてレジスタ11に記憶され、ビツトマツプメモリ10から
値01010000が出力されてレジスタ12に記憶される。双方
向性トランシ−バ3が無能化されているので、プルアツ
プ抵抗器を使用しているためグラフイツクプロセツサ1
が読取る値は1111111111111111である。この値は直ちに
1100000000000000に修正される。グラフイツクプロセツ
サ1が書込み操作を実行すると、値1100000000000000が
アドレス/デ−タバス上にも現われる。このときビツト
マツプメモリ10は書込み操作により制御されていないの
で、奇数ビツトは考慮しない。したがつて、配置のため
にクリツピングコントロ−ラ13には奇数ビツトの値1000
0000を入力するだけでよい。この配置法により次の結果
が得られる。
FIG. 2 shows the contents of the memory so that the above description can be easily understood. To simplify the explanation, 1
Only the addresses X will be described. FIG. 2 (a) and (b)
Indicates the result of executing steps 1 to 4. The content of the address X initially stored in the bitmap memory 9 is 01100011 as shown in FIG. A rectangular pattern surrounded by a dotted line represents a drawing boundary. FIG. 2 (b) shows the contents of the bitmap memory 10. The triangle surrounded by the dotted line represents the shape of the clipping window,
A pattern is included inside the window. Some have the value 1 and some have the value 0. All 0s are written in the memory outside the window. Address X
Is inside the clipping window and part is outside the window, and its value is 01010000. After step 5 is performed, CLPEN is enabled and CLPST is set to zero. Then step 6 is executed. When the graphics processor 1 executes a read operation on the address X, the value 01100011 is output from the bit map memory 9 and stored in the register 11, and the value 01010000 is output from the bit map memory 10 and stored in the register 12. Since the bidirectional transceiver 3 is disabled, a pull-up resistor is used, so that the graphic processor 1 is not used.
Is 1111111111111111. This value is immediately
Corrected to 1100000000000000. When graphics processor 1 performs a write operation, the value 1100000000000000 also appears on the address / data bus. At this time, since the bit map memory 10 is not controlled by the write operation, odd bits are not considered. Therefore, the clipping controller 13 has an odd bit value of 1000 for placement.
Just enter 0000. This arrangement yields the following results.

その結果第2図(c)に示すように、SD0,2,…,14=0
1110011となる。
As a result, as shown in FIG. 2 (c), SD0,2,.
1110011.

第2図(d)はステツプ7と8の実行結果を示す。こ
こでクリツピングウインドの内側のデ−タは反転してお
り、アドレスXの内容は10101000に修正されている。ス
テツプ9を実行すると、信号CLPENが有効化され、CLPST
が1にセツトされ、それからステツプ10が実行される。
グラフイツクプロセツサ1がアドレスXに読取り操作を
実行すると、ビツトマツプメモリ9から出力された値01
110011がレジスタ11に記憶され、ビツトマツプメモリ10
から出力された値10101000がレジスタ12に記憶される。
同じ時にグラフイツクプロセツサが読取る値は依然とし
て1111111111111111であり、これが1100000000000000に
修正され、それから書込み操作が実行される。クリツピ
ングコントロ−ラ13の配置方法は次の通りである。
FIG. 2 (d) shows the results of performing steps 7 and 8. Here, the data inside the clipping window is inverted, and the content of the address X is corrected to 10101000. Executing step 9, the signal CLPEN is activated, and CLPST
Is set to 1 and then step 10 is executed.
When the graphics processor 1 executes a read operation on the address X, the value 01 output from the bit map memory 9 is read.
110011 is stored in the register 11 and the bit map memory 10
The value 10101000 output from is stored in the register 12.
At the same time, the value read by the graphics processor is still 1111111111111111, which is modified to 1100000000000000 and then the write operation is performed. The arrangement method of the clipping controller 13 is as follows.

結果は第2図(e)に示すようにSD0,2,…,14=01010
011である。このことは、描画はクリツピングウインド
の内側でのみ行われ、ウインドの内側のパターンと混合
することもできるが、ウインドの外側のデ−タは元の値
を保つことを意味する。最後にステツプ11と12が実行さ
れて、ウインドクリツピング配置の処理を終る。
The result is SD0,2, ..., 14 = 001010 as shown in FIG.
011. This means that the drawing is performed only inside the clipping window and can be mixed with the pattern inside the window, but the data outside the window keeps its original value. Finally, steps 11 and 12 are executed to end the processing of the wind clipping arrangement.

第3図と第4図は本発明の最終結果を示す。第3図
(a)には「ERSO」の4文字の輪郭が任意の形のクリツ
ピングウインドとして使われており、内側のパタ−ンは
ない。第3図(b)は「ERSO」の内側に描こうとする図
形である。第3図(c)は本発明による最終結果であ
る。
3 and 4 show the end result of the present invention. In FIG. 3 (a), the outline of the four characters "ERSO" is used as an arbitrary clipping window, and there is no inner pattern. FIG. 3B shows a figure to be drawn inside “ERSO”. FIG. 3 (c) shows the final result according to the present invention.

第4図(a)にも、「ERSO」の輪郭が任意の形のクリ
ツピングウインドとして使われているが、内側にパタ−
ンを含んでおり、その一部は薄く、一部は濃い。第4図
(b)は描こうとする図形であり、第4図(c)は最終
結果である。クリツピングウインドの内側の最終図形は
クリツピングウインドの内側のパタ−ンと描こうとする
図形とが結合したものとなつている。クリツピングウイ
ンドの外側のデ−タは変わらない。
Fig. 4 (a) also shows that the contour of "ERSO" is used as a clipping window of any shape,
, Some of which are light and some of which are dark. FIG. 4 (b) shows the figure to be drawn, and FIG. 4 (c) shows the final result. The final figure inside the clipping window is a combination of the pattern inside the clipping window and the figure to be drawn. The data outside the clipping window remains unchanged.

本発明の他の実施例では、第6図に示すように、前述
のステツプ4が省略され、前述のステツプ8が次のよう
に修正される(ステツプ4が省略されたので、こんどは
ステツプ7になる)。
In another embodiment of the present invention, as shown in FIG. 6, the aforementioned step 4 is omitted and the aforementioned step 8 is modified as follows (since step 4 is omitted, step 7 is now performed). become).

7. グラフイツクプロセツサ1のビツトブロツク転送機
能を使つて、ビツトマツプメモリ10全体を転送したパタ
−ンデ−タにより走査する。その間に、反転したパタ−
ンデ−タとビツトマツプメモリ10とにAND論理演算を施
して、反転パタ−ンデ−タをクリツピングウインドの内
側だけに書込む。
7. Using the bit block transfer function of the graphics processor 1, the entire bit map memory 10 is scanned by the transferred pattern data. Meanwhile, the inverted pattern
An AND logic operation is performed on the data and the bit map memory 10, and the inverted pattern data is written only inside the clipping window.

残りのステツプは前のままである。 The remaining steps remain as before.

第6図はこの実施例におけるメモリの内容を示す。第
6図の(a)と(b)はステツプ1から3を実行した結
果を示す。第6図(c)は次の論理演算を行つた後の結
果のSD0,2,…,14=01111011を示す。
FIG. 6 shows the contents of the memory in this embodiment. FIGS. 6A and 6B show the results of executing steps 1 to 3. FIG. FIG. 6C shows SD0, 2,..., 14 = 01111011 as a result after performing the following logical operation.

第6図(d)はステツプ6と7(前の実施例のステツ
プ7と8に対応)の結果を示す。ここでウインドの内側
のデ−タは反転パタ−ン、すなわち元のパタ−ンとの逆
の論理レベルを含んでいる。第6図(e)は最終結果で
あり、SD0,2,…,14=01010011である。これは次の論理
演算によりつくられる。
FIG. 6 (d) shows the results of steps 6 and 7 (corresponding to steps 7 and 8 of the previous embodiment). Here, the data inside the window includes an inverted pattern, that is, a logic level opposite to the original pattern. FIG. 6 (e) shows the final result, where SD0,2,..., 14 = 01010011. It is created by the following logical operation:

結果は先に述べた方法と同じであるが、新しい方法の
方が簡単で速い。
The result is the same as the previous one, but the new one is simpler and faster.

このように本発明は任意の形状のクリツピングウイン
ド、パタ−ン、階調などに係わる問題を解決するため
の、効果的なウインドクリツピング方法と装置を提供す
るものである。クリツピングウインドの描画と境界の交
叉点の計算をする必要が全くなくなり、かつ演算速度が
速くなる。
As described above, the present invention provides an effective window clipping method and apparatus for solving problems relating to clipping windows, patterns, gradations, and the like of arbitrary shapes. There is no need to draw the clipping window and calculate the intersection of the boundaries, and the calculation speed is increased.

本発明を一実施例について説明したが、変形や修正を
施しうることは明らかである。したがつて、請求の範囲
には本発明の思想の範囲に入るそうした変形や修正を含
むように記載してある。
Although the invention has been described with reference to an embodiment, it will be apparent that variations and modifications may be made. It is, therefore, intended that the appended claims cover any such modifications or changes as fall within the true spirit of the invention.

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

第1図は本発明の一実施例によるシステムのハ−ドウエ
アのブロツク図である。第2図は本発明の方法を実施
中、異なる時間におけるメモリ内のデ−タを示す。第3
図はデ−タとウインド、および本発明の方法を用いたと
きの結果の一例を示す図。第4図はデ−タとウインド、
および本発明の方法を用いたときの結果の他の例を示す
図。第5図は本発明による方法の流れ図を示す。第6図
は本発明の方法の他の実施例で異なる時間におけるメモ
リ内のデ−タを示す図。
FIG. 1 is a block diagram of hardware of a system according to an embodiment of the present invention. FIG. 2 shows the data in the memory at different times during the implementation of the method of the invention. Third
The figure shows an example of data and windows, and the results when using the method of the present invention. Figure 4 shows the data and window,
FIG. 7 is a diagram showing another example of a result when the method of the present invention is used. FIG. 5 shows a flow chart of the method according to the invention. FIG. 6 is a diagram showing data in a memory at different times according to another embodiment of the method of the present invention.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 チ―ユアン ルイ 台湾,フシン‐チュ,チューペイ シア ング,チュング シャン ロード,ナン バー 529 (72)発明者 ティング―シ ウェイ 台湾,フシン‐チュ,ハング‐シアン グ,フシン フシング ツェン ナンバ ー 167‐10 (72)発明者 ウェイ―フシン ツアング 台湾,台北,フシン ティエン,セント テ チャング,レーン 27,アレイ 29,ナンバー 15,2エフ (56)参考文献 特開 昭63−271672(JP,A) ──────────────────────────────────────────────────の Continuing on the front page (72) Inventor Chi Yuan Lui Taiwan, Husin-chu, Chu Pei-Shing, Chung-Shang Road, Number 529 (72) Inventor Ting-Si-Wei Taiwan, Husin-chu, Hang- Singh, Fusin Fussing Zen Number 167-10 (72) Inventor Wei-Fusin Zuang Taiwan, Taipei, Fussin Tien, St. Techang, Lane 27, Array 29, Number 15, 2F (56) References 63-271672 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】図形パターンの点、線および文字列をクリ
ツピングするための、図形処理システムに用いるウイン
ドクリツピング方法において、 任意形状のクリツピングウインドを表す初期データを第
1のビツトマツプメモリに書き込み、前記クリツピング
ウインドの内側のデータのビツトを満たすことにより前
記クリツピングウインドの内側と外側を区別するように
し、このクリツピングウインドの内側のデータのビツト
が満たされた前記初期データと内部パターンの内部パタ
ーンデータとにAND演算を施すことにより、任意の形状
をして内側に内部パターンを有するクリツピングウイン
ドを表すクリツピングウインドデータを決定すること
と、 このクリツピングウインドデータを前記第1のビツトマ
ツプメモリに書き込むことと、 前記図形パターンを表す初期図形データを第2のビツト
マツプメモリに書き込むことと、 前記クリツピングウインドデータと前記初期図形データ
をそれぞれ第1と第2のレジスタにラツチすることと、 クリツピングコントローラにより前記第1と第2のレジ
スタからの前記クリツピングウインドデータと初期図形
データにOR演算を施すことにより修正図形データを決定
し、この修正図形データを前記第2のビツトマツプメモ
リに書込むことと、 前記第1ビツトマツプメモリに書き込まれた前記クリツ
ピングウインドデータより、前記内側のデータのみ反転
されたクリツピングウインドデータを得ることと、 前記内側のデータのみ反転されたクリツピングウインド
データの前記内側と外側を含んだ全体を更に反転したデ
ータと前記修正図形データに前記クリツピングコントロ
ーラによるAND演算を施すことにより、前記内側に内部
パターンを有するクリツピングウインドによりクリツプ
された前記図形パターンの結果を示す結果図形データを
決定することと、 前記結果図形データを前記第2のビツトマツプメモリに
書込むことと を含むウインドクリツピング方法。
1. A window clipping method used in a graphic processing system for clipping points, lines and character strings of a graphic pattern, wherein initial data representing an arbitrary-shaped clipping window is written into a first bitmap memory. By satisfying the bit of the data inside the clipping window, the inside and the outside of the clipping window are distinguished, and the initial data and the internal pattern of the filled data bit inside the clipping window are satisfied. Performing an AND operation on the internal pattern data to determine clipping window data representing a clipping window having an arbitrary shape and an internal pattern on the inside; and determining the clipping window data in the first bit. Writing to the map memory; and Writing initial graphic data representing a turn into a second bit map memory; latching the clipping window data and the initial graphic data into first and second registers, respectively; ORing the clipping window data and the initial graphic data from the second register and the initial graphic data to determine corrected graphic data, and writing the corrected graphic data to the second bit map memory; Obtaining the clipping window data in which only the inner data is inverted from the clipping window data written in the one-bit map memory; and obtaining the inner and outer clipping window data in which only the inner data is inverted. The data including the whole is further inverted and the corrected graphic data Determining the result graphic data indicating the result of the graphic pattern clipped by the clipping window having the internal pattern by performing an AND operation by the clipping controller; Writing to a bitmap memory.
JP1185848A 1989-01-09 1989-07-18 Wind clipping method and apparatus Expired - Lifetime JP3057641B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US29483789A 1989-01-09 1989-01-09
US294837 1989-01-09

Publications (2)

Publication Number Publication Date
JPH02195484A JPH02195484A (en) 1990-08-02
JP3057641B2 true JP3057641B2 (en) 2000-07-04

Family

ID=23135152

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1185848A Expired - Lifetime JP3057641B2 (en) 1989-01-09 1989-07-18 Wind clipping method and apparatus

Country Status (1)

Country Link
JP (1) JP3057641B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63271672A (en) * 1987-04-30 1988-11-09 Toshiba Corp Graphic output controller

Also Published As

Publication number Publication date
JPH02195484A (en) 1990-08-02

Similar Documents

Publication Publication Date Title
KR970003327B1 (en) Pattern data generating system
US4882687A (en) Pixel processor
JP2541539B2 (en) Graphic processing device
KR850004826A (en) Shape processing device
EP0280320B1 (en) Graphics display controller equipped with boundary searching circuit
US5274364A (en) Window clipping method and device
CA1319996C (en) Method and apparatus for decomposing a quadrilateral figure for display and manipulation by a computer system
JP3057641B2 (en) Wind clipping method and apparatus
JPH024938B2 (en)
JPH04291684A (en) Thick line plotter
US4899294A (en) Graphics processing system
US5887197A (en) Apparatus for image data to be displayed by transferring only data which is determined to be valid after shifting the data over a range of given length
US4988985A (en) Method and apparatus for a self-clearing copy mode in a frame-buffer memory
JPH0727572B2 (en) Apparatus and method for comparing and generating signals
JPH06180566A (en) Drawing controller
JP2773458B2 (en) Vector controller
JPS5828588B2 (en) Graphics
JPH011075A (en) Image processing device
JP2626894B2 (en) Straight line drawing circuit of bitmap type display device
KR960006881B1 (en) Video ram interface control circuit using designation of coordinate
KR940007821B1 (en) Double size character display apparatus
JPS61116386A (en) Character pattern writing control system
JPS6215593A (en) Memory
JPH0232670B2 (en)
JPH01255887A (en) Character and graphic editing device

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100421

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100421

Year of fee payment: 10