JPH0113114B2 - - Google Patents

Info

Publication number
JPH0113114B2
JPH0113114B2 JP58237048A JP23704883A JPH0113114B2 JP H0113114 B2 JPH0113114 B2 JP H0113114B2 JP 58237048 A JP58237048 A JP 58237048A JP 23704883 A JP23704883 A JP 23704883A JP H0113114 B2 JPH0113114 B2 JP H0113114B2
Authority
JP
Japan
Prior art keywords
data
window
display
coordinate
bit
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
Application number
JP58237048A
Other languages
Japanese (ja)
Other versions
JPS60128497A (en
Inventor
Takeko Yumoto
Akira Fukushima
Sachiko Iida
Koichi Usuda
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.)
Tektronix Japan Ltd
Original Assignee
Sony Tektronix 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 Sony Tektronix Corp filed Critical Sony Tektronix Corp
Priority to JP58237048A priority Critical patent/JPS60128497A/en
Publication of JPS60128497A publication Critical patent/JPS60128497A/en
Publication of JPH0113114B2 publication Critical patent/JPH0113114B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はウインドウ・ビユーボート変換、即ち
表示器上の第1窓(ウインドウ)内の表示部分
(表示セグメント)を第2窓(ビユーボート)内
に表示する表示変換方法に関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention relates to window-viewport conversion, that is, displaying a display portion (display segment) in a first window (window) on a display device in a second window (viewport). The present invention relates to a display conversion method.

〔発明の背景〕[Background of the invention]

コンピユータ用表示装置は、ホスト・コンピユ
ータや入力装置等からのデータにより表示器に図
形及び文字等を表示しており、図形処理システム
等に利用されている。このような表示装置の一例
を第1図に示す。この装置においては、中央処理
装置(CPU)10、リード・オンリ・メモリ
(ROM)12、ランダム・アクセス・メモリ
(RAM)14、入力装置16、入出力インタフ
エース(I/O)18及び表示制御回路20がバ
ス22を介して共通接続している。CPU10は
例えばZ8001型マイクロプロセツサであり、
ROM12に記憶されたプログラムによりRAM
14を一時記憶回路として種々の制御及びデータ
処理を行う。入力装置16はキーボード又はタブ
レツトであり、文字情報、図形情報、種々の命令
等を入力する。I/O 18はホスト・コンピユ
ータ等の外部装置との通信を行う。表示制御回路
20は表示器24がラスタ走査型かベクトル走査
型かによりその構造は異なるが従来構成のもので
あり、入力装置16又はI/O 18を介して入
力されCPU10により処理された表示データを
表示器24に表示する。第2図及び第3図は表示
器24の表示スクリーンを示している。例えば第
2図の如く、表示部分(表示セグセメント)とし
て3角形をベクトル走査により描くには、入力装
置16又はI/O 18を介して表示データを入
力しRAM14に記憶する。このRAM14の記
憶内容の一部を第4図に示す。この記憶内容を表
示に適した形式に変換し、この変換したデータを
表示制御回路20が順次読出し、表示器24に第
2図の如く3角形を表示する。即ち、まず始点を
ピボツト・ポイント(基準点)の座標XOA,
YOAに移動(MOVE)し、更に3角形の第1頂
点XIA,YIAに移動する。次に、この第1頂点
から第2頂点X2A,Y2Aに直線を描き
(DRAW)、第2頂点から第3頂点X3A,Y3
Aに直線を描き、更に第3頂点から第1頂点に直
線を描く。これらの動作は、例えば表示制御回路
20内のベクトル発生器及び輝度制御回路により
表示器24としてのCRTのビーム偏向及び輝度
制御を行うことにより実現できる。
A computer display device displays graphics, characters, etc. on a display device based on data from a host computer, an input device, etc., and is used in graphic processing systems and the like. An example of such a display device is shown in FIG. This device includes a central processing unit (CPU) 10, a read-only memory (ROM) 12, a random access memory (RAM) 14, an input device 16, an input/output interface (I/O) 18, and a display control Circuits 20 are commonly connected via a bus 22. The CPU 10 is, for example, a Z8001 type microprocessor,
RAM by the program stored in ROM12
14 is used as a temporary storage circuit to perform various control and data processing. The input device 16 is a keyboard or a tablet, and inputs character information, graphic information, various commands, etc. I/O 18 provides communication with external devices such as a host computer. The display control circuit 20 has a conventional configuration, although its structure differs depending on whether the display 24 is a raster scanning type or a vector scanning type, and displays display data inputted via the input device 16 or I/O 18 and processed by the CPU 10. is displayed on the display 24. 2 and 3 show the display screen of display 24. FIG. For example, as shown in FIG. 2, to draw a triangle as a display portion (display segment) by vector scanning, display data is input via the input device 16 or I/O 18 and stored in the RAM 14. A part of the memory contents of this RAM 14 is shown in FIG. This stored content is converted into a format suitable for display, and the display control circuit 20 sequentially reads out the converted data and displays a triangle on the display 24 as shown in FIG. That is, first, set the starting point to the pivot point (reference point) coordinates XOA,
Move (MOVE) to YOA, and then move to the first vertices of the triangle, XIA and YIA. Next, draw a straight line from this first vertex to the second vertex X2A, Y2A (DRAW), and from the second vertex to the third vertex X3A, Y3
Draw a straight line at A, and then draw a straight line from the third vertex to the first vertex. These operations can be realized, for example, by controlling the beam deflection and brightness of the CRT serving as the display 24 using a vector generator and a brightness control circuit in the display control circuit 20.

ところで、図形処理システムにおいては、入力
装置16で設定した4角形の第1窓(ウンドウ)
26内に表示される表示部分を別に設定した4角
形の第2窓(ビユーボート)28内に表示する機
能、所謂ウインドウ・ビユーボート変換機能は重
要な機能の一つである。この機能を実行するに
は、まず4角形の各頂点の内の最大及び最小座
標、即ち対向する2頂点の座標により第1窓26
及び第2窓28を設定する。第2図において、第
1窓26は座標XmW,YmW及びXMW,
YMWにより設定でき、第3図において第2窓2
8は座標XmV,YmV及びXMV,YMVにより
設定している。これら設定値は第5図の如く、パ
ラメータとしてRAM14に記憶される。次に
CPU10は第1窓26のX方向の長さデータXW
(=XMW−XmW)及びY方向の長さYWデータ
(=YMW−YmW)、並びに第2窓28のX方向
の長さデータXV(=XMV−XmV)及びY方向
の長さデータYV(=YMV−YmV)を求める。
次に第1窓26内に表示される表示部分を、例え
ば従来のクリツピング方法により検出する。この
クリツピング方法は1968年にイバン・イー・サザ
ーランドによりクリツピング・デイバイダとして
発表されている。次に検出した表示部分、例えば
3角形の各頂点の座標について、点XmW,
YmWを基準とした相対座標を求める。ここで第
1窓26内の3角形の各頂点の相対座標を代表的
にXA,YAとし、第2窓28内に表示される3
角形の各頂点のXmV,YmVを基準とした相対
座標をXC,YCとすると次のようになる。
By the way, in a graphic processing system, the first rectangular window set by the input device 16
One of the important functions is the so-called window/viewboard conversion function, in which the display portion displayed in the display screen 26 is displayed in a separately set rectangular second window (viewboard) 28. To perform this function, first the first window 26 is
and the second window 28 is set. In FIG. 2, the first window 26 has coordinates XmW, YmW and XMW,
It can be set by YMW, and the second window 2 in Figure 3
8 is set by the coordinates XmV, YmV and XMV, YMV. These setting values are stored as parameters in the RAM 14 as shown in FIG. next
The CPU 10 is the length data XW of the first window 26 in the X direction.
(=XMW-XmW) and Y-direction length YW data (=YMW-YmW), as well as X-direction length data XV (=XMV-XmV) and Y-direction length data YV (= Find YMV−YmV).
The display portion displayed within the first window 26 is then detected using, for example, a conventional clipping method. This clipping method was published by Ivan E. Sutherland in 1968 as the clipping divider. Next, regarding the coordinates of each vertex of the detected display part, for example, a triangle, point XmW,
Find the relative coordinates based on YmW. Here, let the relative coordinates of each vertex of the triangle in the first window 26 be representatively XA, YA, and the 3
Let XC and YC be the relative coordinates of each vertex of the rectangle with reference to XmV and YmV, as follows.

XW:XV=XA:XC よつて XC=XV・
XA/XW また YW:YV=YA:YC よつ
て YC=YV・YA/YW この計算を各頂点についてCPU10が行い、
得られた座標をビボツト・ポイントXOC,YOC
を基準とした座標に変換する。この最終座標によ
り、表示制御回路20が表示器24に第3図の如
き表示を行う。なお、第2窓28内の各頂点の座
標は、ベクトルを描く順序に従い、直前の座標を
基準とした相対座標であつてもよい。
XW:XV=XA:XC Therefore, XC=XV・
XA/XW Also, YW:YV=YA:YC YC=YV・YA/YW This calculation is performed by the CPU 10 for each vertex,
The obtained coordinates are pivot points XOC, YOC
Convert to coordinates based on . Based on these final coordinates, the display control circuit 20 displays a display as shown in FIG. 3 on the display 24. Note that the coordinates of each vertex within the second window 28 may be relative coordinates based on the immediately previous coordinates according to the order in which vectors are drawn.

上述の如くこの表示変更を行うには、座標デー
タの乗除算を行わなければならない(XV・
XA/XW及びYV・YA/YW)。この演算を行
う第1の方法は、まずXVとXA又はYVとYAの
乗算を行い、得られた値をXW又はYWで除算す
る。この方法は、各頂点のX又はY座標ごとに乗
算及び除算を行わなければならず、表示変換に長
時間を要する。これは演算する座標点の数が増え
るほど顕著になる。また第2の方法ではXV/
XW又はYV/YWを求め、この求めた値にXA又
はYAを乗算する。この第2の方法によれば、
XV/XW又はYV/YWは各座標点に共通な値な
ので、この値は1度演算すればよく、第1の方法
よりも高速となる。
As mentioned above, in order to change the display, it is necessary to multiply and divide the coordinate data (XV・
XA/XW and YV/YA/YW). The first method of performing this operation is to first multiply XV and XA or YV and YA, and then divide the resulting value by XW or YW. This method requires multiplication and division for each X or Y coordinate of each vertex, and requires a long time for display conversion. This becomes more noticeable as the number of coordinate points to be calculated increases. In the second method, XV/
Find XW or YV/YW and multiply this found value by XA or YA. According to this second method,
Since XV/XW or YV/YW is a value common to each coordinate point, this value only needs to be calculated once, which is faster than the first method.

ところでCPU10による演算方法には整数演
算法と浮動小数点演算法とがある。整数演算法は
高速であるが、小数点以下を切捨ててしまう。ま
た、浮動小数点演算法は低速であるが、小数点以
下の値も得られる。上述の第2の方法において、
XV/XWまたはYV/YWの除算は、整数演算法
では演算結果の小数点以下が切捨てられるので、
浮動小数演算法でなければならない。また、除算
結果に小数点が含まれている可能性が非常に大き
いので、この除算結果にXA又はYAを乗算する
のも浮動小数点演算法でなければならない。よつ
て、第2の方法もより高速な表示変換、即ちウイ
ンドウ・ビユーボート変換をより高速に行うには
不適当である。
By the way, the calculation methods by the CPU 10 include an integer calculation method and a floating point calculation method. Integer arithmetic is fast, but decimals are rounded down. Also, although floating point arithmetic is slow, it can also obtain values below the decimal point. In the second method described above,
When dividing XV/XW or YV/YW, in the integer arithmetic method, the decimal part of the result is rounded down, so
Must be floating point arithmetic. Furthermore, since there is a very high possibility that the division result contains a decimal point, the floating-point arithmetic method must be used to multiply the division result by XA or YA. Therefore, the second method is also inappropriate for performing faster display conversion, that is, faster window-to-view conversion.

〔発明の目的〕[Purpose of the invention]

したがつて本発明の目的は処理が一層高速な表
示変換方法の提供にある。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a display conversion method that allows faster processing.

〔発明の概略〕[Summary of the invention]

本発明によれば、第1及び第2窓のX及びY方
向の各辺の長さを求め、第2窓の各辺の長さデー
タの最下位桁の次にN桁(Nは正の整数)分の
「0」を付加する。なお、「0」を付加するという
ことは、シフト・レジスタ等において第2窓の各
辺の長さデータを左方向(上位桁方向)にシフト
することと同じであり、高速に処理できる。ここ
でNは第1及び第2窓の座標データの桁数により
決まり、例えば座標データが2進16桁(16ビツ
ト)の場合、N=16である。次に0を付加したデ
ータを整数演算により第1窓の各辺の長さデータ
でそれぞれ除算し、この除算により得たデータに
整数演算により第1窓内の表示部分の各座標デー
タを乗算する。更に、この乗算により得たデータ
及びNにより、第2窓内に表示部分の新たな表示
を行つている。よつて、本発明は整数演算法を用
いているので高速であり、また第2窓の各辺の長
さデータの最下位桁以下にN桁の「0」を付加し
ているので演算したデータの精度を損なわずにす
む。
According to the present invention, the length of each side of the first and second windows in the X and Y directions is determined, and N digits (N is a positive Add "0" for the integer). Note that adding "0" is the same as shifting the length data of each side of the second window to the left (in the direction of the upper digits) in a shift register or the like, and can be processed at high speed. Here, N is determined by the number of digits of the coordinate data of the first and second windows; for example, when the coordinate data is 16 binary digits (16 bits), N=16. Next, the data with 0 added is divided by the length data of each side of the first window using integer operations, and the data obtained by this division is multiplied by each coordinate data of the display part in the first window using integer operations. . Furthermore, the data obtained by this multiplication and N are used to newly display the display portion within the second window. Therefore, since the present invention uses an integer arithmetic method, it is fast, and since N digits of "0" are added below the least significant digit of the length data of each side of the second window, the calculated data without sacrificing accuracy.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の実施例を説明する。まず、上述
の如く、入力装置16又はI/O 18を介して
表示データを入力して、RAM14に記憶する。
RAM14に記憶されたデータは第4図に示す如
きデータなので、第2図のような表示が行われ
る。次に第1窓26及び第2窓28を設定するた
め、パラメータXmW,YmW及びXMW,
YMWとパラメータXmV,YmV及びXMV,
YMVとを入力装置16により入力して、これら
パラメータの種類を表すデータ(図示せず)と共
に第5図の如くRAM14に記憶する。CPU10
は第1窓26に関するパラメータから、この第1
窓26内に存在する表示部分を検出する。この実
施例では検出された表示部分は3角形である。こ
こまでの処理は上述の「発明の背景」で説明した
のと同じである。
Examples of the present invention will be described below. First, as described above, display data is input via the input device 16 or I/O 18 and is stored in the RAM 14.
Since the data stored in the RAM 14 is as shown in FIG. 4, a display as shown in FIG. 2 is performed. Next, in order to set the first window 26 and the second window 28, parameters XmW, YmW and XMW,
YMW and parameters XmV, YmV and XMV,
YMV is input through the input device 16 and stored in the RAM 14 as shown in FIG. 5 along with data (not shown) representing the types of these parameters. CPU10
is determined from the parameters related to the first window 26.
A display portion existing within window 26 is detected. In this example, the detected display portion is a triangle. The processing up to this point is the same as that described in the above-mentioned "Background of the Invention".

次に流れ図を参照して本発明の実施例を更に説
明するが、これらの処理方法はプログラムとして
ROM12に記憶されており、CPU10により実
行される点に注意されたい。まず第6図を参照し
てX座標の前処理を説明する。ステツプ30にお
いて、第2窓28のX方向の長さデータXVをパ
ラメータXMV及びXmVから求める。この実施
例では座標データを16ビツトとし、データXVを
「0011 0000 0010 1011」(16進表示では302B)と
する。この値はCPU10内のレジスタAに第7
図Aに示す如く蓄積される。同様にステツプ32
において、第1窓26のX方向の長さデータXW
をパラメータXMW及びXmWから求め、その値
をCPU10のレジスタCに第7図Cの如く蓄積
する。なおデータXWは例えば「0101 1010 0110
0000」(16進表示で5A60)とする。なお、この実
施例でのデータは16ビツトであるが、最上位ビツ
トMSBはサイン・ビツトでありデータが正であ
る0か、負である1かを示している。よつて、デ
ータのアドレス領域は215×215 即ち32768×32768となる。
Next, embodiments of the present invention will be further explained with reference to flowcharts, but these processing methods will be explained as programs.
Note that it is stored in the ROM 12 and executed by the CPU 10. First, the preprocessing of the X coordinate will be explained with reference to FIG. In step 30, the length data XV of the second window 28 in the X direction is obtained from the parameters XMV and XmV. In this embodiment, the coordinate data is 16 bits, and the data XV is "0011 0000 0010 1011" (302B in hexadecimal notation). This value is stored in register A in CPU10.
The information is accumulated as shown in Figure A. Similarly, step 32
, the length data XW of the first window 26 in the X direction
is determined from the parameters XMW and XmW, and the value is stored in register C of the CPU 10 as shown in FIG. 7C. Note that the data XW is, for example, "0101 1010 0110
0000" (5A60 in hexadecimal). Although the data in this embodiment is 16 bits, the most significant bit MSB is a sign bit and indicates whether the data is positive (0) or negative (1). Therefore, the data address area is 2 15 × 2 15 , or 32768 × 32768.

ステツプ34において、CPU10のレジスタ
AのデータXVを所定ビツト、例えば、16ビツト
だけ左に、即ち高位ビツト側にシフトする。これ
はデータXVの最下位ビツトLSBの次にNビツト
(N=16)分の「0」を付加したことになる。特
に、この処理をレジスタ内でのデータのシフトと
して行うと高速処理が可能となる。「0」を付加
した新たなデータXVSは「0011 0000 0010 1011
0000 0000 0000 0000」(16進表示では302B
0000)となり、レジスタAの新たな蓄積内容を第
7図Bに示す。ステツプ36において、整数演算
法によりデータXVSをデータXWで除算し、結
果Dを得る。この結果Rは「0000 0000 0000
0000 1000 1000 0111 0001」(16進表示で0000
8871)となり、CPU10内のレジスタDに第7
図Dの如く蓄積される。次にステツプ38におい
て、レジスタDのデータDをMSBから各ビツト
を順次検査し、最初に「1」となるビツトから
LSB側に15ビツト分だけ抽出する。なお、最初
に「1」となるビツトがLSBから14ビツト目以
内にあるときは、LGB以下に「0」が連続して
いると見なして、15ビツトを抽出する。抽出した
15ビツト・データのMSBの上位ビツトにサイ
ン・ビツト(例えば正を表す「0」)を付加し、
16ビツトのフアクタFとする。このフアクタF
「0100 0100 0011 1000」(16進表示で4438)を
CPU10のレジスタFに第7図Fの如く蓄積す
る。また、このフアクタFにおいて、小数点の位
置はLSBから15ビツト目なので、シフト・カウ
ントSCとして「1111」(10進表示で15、16進表示
でF)をCPU10のレジスタEに第7図Eの如
く蓄積する。なお、このシフト・カウントSCの
値は、16ビツトのフアクタFのLSB側から何ビ
ツト目に小数点があるかを示すデータであり、デ
ータXVを高位ビツト側にシフトとするビツト数
16と、データDのMSBから最初に「1」となる
ビツト位置との関係から決まる。したがつて、デ
ータXVをデータXWで除算した値は、フアクタ
F及びシフト・カウントSCの両方の値で表して
いることになる。ステツプ38が終わると、X座
標の前処理を終了する。なおステツプ30〜38
は整数演算とシフト動作のみなので高速処理とな
る。これらステツプ30〜38と同様な処理をY
座標についても行うが、第1窓26のXWとYW
の比が第2窓28のXVとYVの比に等しければ、
Y座標に関する前処理は不要である。
In step 34, data XV in register A of the CPU 10 is shifted by a predetermined bit, for example 16 bits, to the left, that is, to the higher bit side. This means that N bits (N=16) of "0" are added next to the least significant bit LSB of data XV. In particular, if this processing is performed as a data shift within a register, high-speed processing becomes possible. The new data XVS with “0” added is “0011 0000 0010 1011
0000 0000 0000 0000” (302B in hexadecimal format)
0000), and the new contents stored in register A are shown in FIG. 7B. At step 36, data XVS is divided by data XW using integer arithmetic to obtain result D. This result R is “0000 0000 0000
0000 1000 1000 0111 0001” (0000 in hexadecimal
8871), and the seventh register is stored in register D in CPU10.
It is accumulated as shown in Figure D. Next, in step 38, each bit of the data D in the register D is checked sequentially starting from the MSB, starting with the bit that becomes "1" first.
Extract only 15 bits on the LSB side. Note that if the first bit that becomes ``1'' is within the 14th bit from LSB, it is assumed that ``0'' continues below LGB, and 15 bits are extracted. Extracted
Add a sign bit (for example, "0" indicating positive) to the MSB upper bit of the 15-bit data,
Let it be a 16-bit factor F. This factor F
"0100 0100 0011 1000" (4438 in hexadecimal)
The data is accumulated in the register F of the CPU 10 as shown in FIG. In addition, in this factor F, the decimal point is at the 15th bit from the LSB, so "1111" (15 in decimal notation, F in hexadecimal notation) is stored in register E of CPU 10 as shown in Figure 7E as shift count SC. Accumulate as if The value of this shift count SC is data indicating which bit from the LSB side of the 16-bit factor F the decimal point is located, and is the number of bits to shift data XV to the higher bit side.
16 and the position of the bit that first becomes "1" from the MSB of data D. Therefore, the value obtained by dividing data XV by data XW is represented by the values of both factor F and shift count SC. When step 38 is completed, the preprocessing of the X coordinate is completed. Note that steps 30 to 38
requires only integer operations and shift operations, resulting in high-speed processing. Perform the same processing as steps 30 to 38.
This is also done for the coordinates, but the XW and YW of the first window 26
If the ratio of is equal to the ratio of XV and YV of the second window 28,
No preprocessing regarding the Y coordinate is required.

次に第8図の流れ図を参照して、前処理に続く
表示データの変更について説明する。まず、
CPU10はステツプ40において、RAM14か
ら表示データ(第4図参照)を読出し、ステツプ
42において、読出したデータが座標データか否
かを判断する。読出したデータが座標データの場
合(肯定の場合)はステツプ44に進み、この座
標データと前処理で得たフアクタFとの乗算を整
数演算により行う。なお、座標データが第1窓2
6内の相対座標でない場合、即ちXmW,YmW
を基準とした相対データでない場合は、フアクタ
Fとし乗算を行う前に相対データに変換する必要
がある。またX座標データかY座標データかによ
つて、対応するフアクタFを用いる点に注意され
たい。なお、ここまでは、シフト・カウントSC
を用いていないが、乗算のため、その結果(16ビ
ツト・データと16ビツト・データの乗算結果も16
ビツト・データ)の小数点位置は、依然、シフ
ト・カウントSCが示す位置である。よつて、ス
テツプ44では、更に、シフト・カウントSCを
基にして、乗算結果を、小数点が考慮された座標
を表す16ビツト・データに変換する。ステツプ4
2に戻り、読出したデータが座標データでない場
合(否定の場合)即ち、読出したデータが
「MOVE」「DRAW」等の命令の場合、ステツプ
46に進み、読出したデータをそのままセーブ
(SAVE)する。よつて、ステツプ44及び46
を通過したデータは第4図と対応する第9図のよ
うに仮想的に表せる。
Next, with reference to the flowchart of FIG. 8, changing of display data following preprocessing will be described. first,
The CPU 10 reads display data (see FIG. 4) from the RAM 14 in step 40, and determines in step 42 whether or not the read data is coordinate data. If the read data is coordinate data (if affirmative), the process proceeds to step 44, where this coordinate data is multiplied by the factor F obtained in the preprocessing by integer arithmetic. Note that the coordinate data is from the first window 2.
If the relative coordinates are not within 6, that is, XmW, YmW
If it is not relative data based on , it is necessary to convert it into relative data before performing multiplication using factor F. It should also be noted that the corresponding factor F is used depending on whether the data is X coordinate data or Y coordinate data. Up to this point, the shift count SC
However, due to multiplication, the result (the result of multiplying 16-bit data by 16-bit data is also 16
The decimal point position for bit data) is still the position indicated by shift count SC. Therefore, in step 44, the multiplication result is further converted into 16-bit data representing coordinates with the decimal point taken into account, based on the shift count SC. Step 4
Returning to step 2, if the read data is not coordinate data (if negative), that is, if the read data is a command such as "MOVE" or "DRAW", proceed to step 46 and save the read data as is. . Therefore, steps 44 and 46
The data passed through can be virtually represented as shown in FIG. 9, which corresponds to FIG.

ところで、ステツプ44により得られた座標デ
ータは第2窓28の座標XmV,YmVを基準と
する相対座標であるので、ステツプ48において
表示に適した座標データXC,YCに変換する。例
えば、この実施例ではデータ領域での精度は16ビ
ツトであるが、表示器24のアドレス空間は12ビ
ツト×12ビツトである。よつてこの場合XmV,
YmV及びXMV,YMVも12ビツトの座標データ
なので、ステツプ44で得られたデータも12ビツ
トとなる。残りの4ビツトに命令等を付加すれ
ば、RAM14の容量を節約できる。また座標デ
ータはベクトル走査に都合の良いような相対座標
に変換しておく。この場合、基準点の座標XOC,
YOCを変形するのみで、表示部分を移動できる。
しかし、このステツプ48は使用する表示システ
ムにとつて最適な処理を行えばよい。ステツプ5
0では、全データを処理したかを判断し、まだ全
データを処理していない場合(否定の場合)はス
テツプ40に戻り、RAM14から次のデータを
読出す。また全データを処理した場合(肯定の場
合)は、表示データの変更は終了し、RAM14
には第10図に示す如く変更したデータが記憶さ
れる。なお、第10図の場合、各データは座標デ
ータ及び命令を含んでいる。
By the way, since the coordinate data obtained in step 44 are relative coordinates with respect to the coordinates XmV, YmV of the second window 28, in step 48 they are converted into coordinate data XC, YC suitable for display. For example, in this embodiment, the precision in the data area is 16 bits, but the address space of display 24 is 12 bits by 12 bits. So in this case XmV,
Since YmV, XMV, and YMV are also 12-bit coordinate data, the data obtained in step 44 is also 12-bit. By adding instructions, etc. to the remaining 4 bits, the capacity of the RAM 14 can be saved. Further, the coordinate data is converted into relative coordinates convenient for vector scanning. In this case, the coordinates of the reference point XOC,
You can move the displayed part just by transforming the YOC.
However, this step 48 may be performed as appropriate for the display system in use. Step 5
If the value is 0, it is determined whether all data has been processed, and if all data has not been processed yet (in the case of negative), the process returns to step 40 and the next data is read from the RAM 14. In addition, if all data has been processed (if affirmative), the display data change is completed and the RAM 14
The changed data is stored as shown in FIG. In the case of FIG. 10, each data includes coordinate data and commands.

表示制御回路20はRAM14から第10図に
示すデータを順次読出し、表示器24に第3図に
示す如き表示を行う。なお、XOC,YOCは
XOA,YOAに対応し、XIC,YICはXIA,YIA
に対応し、X2C,Y2CはX2A,Y2Aに対応し、
X3C,Y3CはX3A,Y3Aに対応する。よつて、
表示変換、即ちウインドウ・ビユーボート変換が
完了する。
The display control circuit 20 sequentially reads out the data shown in FIG. 10 from the RAM 14, and displays the data shown in FIG. 3 on the display 24. Furthermore, XOC and YOC are
Compatible with XOA, YOA, XIC, YIC is XIA, YIA
, X2C, Y2C corresponds to X2A, Y2A,
X3C and Y3C correspond to X3A and Y3A. Then,
The display conversion, ie, window viewport conversion, is completed.

なお、上述は本発明の好適な一実施例について
説明したが、当業者には本発明の要旨を逸脱する
ことなく種々の変更が可能なことが理解できよ
う。例えば、座標データの桁数(ビツト数)は任
意でよいし、また、第2窓の各辺の長さデータの
最下位桁LSBの次に付加する「0」の桁数(ビ
ツト数)も演算の精度を考慮した任意数でよい。
更に第1窓及び第2窓を座標軸に対して回転させ
た場合は、回転角を考慮した上で上述と同様の処
理を行えばよい。
It should be noted that although the above description describes one preferred embodiment of the present invention, those skilled in the art will understand that various changes can be made without departing from the gist of the present invention. For example, the number of digits (number of bits) of the coordinate data can be arbitrary, and the number of digits (number of bits) of "0" added after the least significant digit LSB of the length data of each side of the second window can also be set as desired. Any number may be used in consideration of calculation accuracy.
Furthermore, when the first window and the second window are rotated with respect to the coordinate axes, the same processing as described above may be performed while taking the rotation angle into consideration.

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

上述の如く本発明によれば、浮動小数点演算の
代わりにシフト動作と整数演算を行つているの
で、表示変換を高速で行える。特に第1窓内に変
換する座標点が多いほど、即ち複雑な図形ほど、
本発明の効果が顕著になる。
As described above, according to the present invention, shift operations and integer operations are performed instead of floating point operations, so display conversion can be performed at high speed. In particular, the more coordinate points there are to convert within the first window, that is, the more complex the figure, the more
The effect of the present invention becomes remarkable.

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

第1図は本発明を実行する表示装置のブロツク
図、第2図及び第3図は本発明を説明するための
表示例を示す図、第4図及び第5図は本発明を説
明するためのメモリの記憶内容を示す図、第6図
は本発明を説明するための流れ図、第7図は本発
明を説明するためのレジスタの蓄積内容を示す
図、第8図は本発明を説明するための流れ図、第
9図及び第10図は本発明を説明するためのメモ
リの記憶内容を示す図である。 26:第1窓、28:第2窓。
FIG. 1 is a block diagram of a display device for implementing the present invention, FIGS. 2 and 3 are diagrams showing display examples for explaining the present invention, and FIGS. 4 and 5 are for explaining the present invention. 6 is a flowchart for explaining the present invention, FIG. 7 is a diagram showing the stored contents of a register for explaining the present invention, and FIG. 8 is a diagram for explaining the present invention. FIGS. 9 and 10 are flowcharts showing the contents stored in the memory for explaining the present invention. 26: 1st window, 28: 2nd window.

Claims (1)

【特許請求の範囲】 1 X及びY座標データに応じて表示器に表示部
分を表示し、上記表示器上に4角形の第1及び第
2窓を設定し、上記第1窓内の上記表示部分を上
記第2窓内に新たに表示する表示変換方法におい
て、 上記第1窓及び第2窓のX及びY方向の各辺の
長さを求め、 上記第2窓の各辺の長さデータの最下位桁の次
にN桁(Nは正の整数)分の「0」を付加して桁
上げし、 該「0」を付加したデータを整数演算により上
記第1窓の各辺の長さデータで夫々除算し、 該除算して得たデータの最上位桁から最初に
「0」以外になる桁から最下位桁側にM桁(Mは
正の整数)のデータを抽出すると共に、小数点に
対応する桁のデータを求め、 整数演算により、上記M桁のデータと上記第1
窓内の上記表示部分の各座標データとを乗算し、 該乗算して得たデータ及び上記小数点に対応す
る桁のデータにより上記第2窓内に表示部分の新
たな表示を行うことを特徴とする表示変換方法。
[Claims] 1. Displaying a display portion on a display according to X and Y coordinate data, setting rectangular first and second windows on the display, and displaying the display in the first window. In the display conversion method for newly displaying a part in the second window, the length of each side in the X and Y directions of the first window and the second window is determined, and the length data of each side of the second window is calculated. Next to the least significant digit of , N digits (N is a positive integer) of ``0'' are added and carried, and the data with the ``0'' added is calculated by integer operation to calculate the length of each side of the first window. Divide by each data, and extract data of M digits (M is a positive integer) from the most significant digit of the data obtained by the division to the least significant digit from the first digit that becomes other than "0", Find the data of the digit corresponding to the decimal point, and use integer arithmetic to combine the data of the M digits above and the 1st digit above.
It is characterized by multiplying each coordinate data of the display part in the window, and newly displaying the display part in the second window using the data obtained by the multiplication and the data of the digit corresponding to the decimal point. Display conversion method.
JP58237048A 1983-12-15 1983-12-15 Display conversion Granted JPS60128497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58237048A JPS60128497A (en) 1983-12-15 1983-12-15 Display conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58237048A JPS60128497A (en) 1983-12-15 1983-12-15 Display conversion

Publications (2)

Publication Number Publication Date
JPS60128497A JPS60128497A (en) 1985-07-09
JPH0113114B2 true JPH0113114B2 (en) 1989-03-03

Family

ID=17009630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58237048A Granted JPS60128497A (en) 1983-12-15 1983-12-15 Display conversion

Country Status (1)

Country Link
JP (1) JPS60128497A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101501980B (en) * 2006-08-02 2013-07-03 Thk株式会社 Power branch system and power branch method

Also Published As

Publication number Publication date
JPS60128497A (en) 1985-07-09

Similar Documents

Publication Publication Date Title
EP0212563B1 (en) Display control method for multi-window system
KR900006042B1 (en) Display control apparatus for use in composite document processing apparatus
US4845656A (en) System for transferring data between memories in a data-processing apparatus having a bitblt unit
JPH0113114B2 (en)
JP2616353B2 (en) Input indicating device
JP2678270B2 (en) Display control device
JP2971765B2 (en) Polygon drawing method and polygon drawing device
JP3363611B2 (en) Graphic information processing method and apparatus
JPS61240380A (en) Graphic display device
JPH054718B2 (en)
EP0293698B1 (en) Graphic controller having function of painting designated area
JP3358698B2 (en) Drawing equipment
JP2554876B2 (en) Address translation device
JPS58146931A (en) Display
JP2880605B2 (en) Graphic display device
EP0339588A2 (en) Coordinate input method employing touch panel
JPH0350686A (en) Graphic processing system
JPS6244882A (en) Graphic display device
JP3358891B2 (en) Z-value perspective transformation processing method and image processing apparatus
JPH0248942B2 (en)
JPS6360397B2 (en)
JPH06124106A (en) Method for setting screen output from digitizer
JPS63118882A (en) Image editing device
JPH0594519A (en) Vector data converter for graphic processor
JPS6242222A (en) Transmission system for coordinate data