JPH0318195B2 - - Google Patents

Info

Publication number
JPH0318195B2
JPH0318195B2 JP58053104A JP5310483A JPH0318195B2 JP H0318195 B2 JPH0318195 B2 JP H0318195B2 JP 58053104 A JP58053104 A JP 58053104A JP 5310483 A JP5310483 A JP 5310483A JP H0318195 B2 JPH0318195 B2 JP H0318195B2
Authority
JP
Japan
Prior art keywords
pixel
cursor
area
maximum
search
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
JP58053104A
Other languages
Japanese (ja)
Other versions
JPS59177593A (en
Inventor
Shigeki Morioka
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP58053104A priority Critical patent/JPS59177593A/en
Publication of JPS59177593A publication Critical patent/JPS59177593A/en
Publication of JPH0318195B2 publication Critical patent/JPH0318195B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 本発明はCRTを備えこの画面に図形などを表
示する装置において、カーソルで指示したこの図
形の部分を見つけ出す方法の改良に関するもので
ある。更に詳述すると、上記のような装置におい
ては、通常、図形は複数の画素から構成される。
そそして装置の操作上、この図形の中から特定の
画素をカーソルで選択したい場合がある。本発明
はカーソルの位置に一番近い画素を見つけ出す方
法に関するものである。 本発明は主として
CAD(Computer Aided Design)装置に使用さ
れることが多いのでCAD装置を例に取つて本発
明の説明を行なう。CAD装置においては、CRT
の画面上に図形を表示しつつコンピユータと対話
しながら各種の設計を行なうものである。このよ
うな設計操作を行なう場合、CRTに表示された
図形の一部をカーソルで指し示めして、その部分
を特別に表示したり認識したいようなことがあ
る。カーソルで指し示めされた図形の部分を認識
してこの部分を特別に表示するためには、カーソ
ルと各画素との距離を計算してその距離が一番近
い画素を選択する必要がある。このカーソルに一
番近い画素を探す方法としては、次の(イ)と
(ロ)の方法が知られている。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an improvement in a method for finding a part of a figure indicated by a cursor in a device equipped with a CRT and displaying figures on the screen. To explain in more detail, in the above-described apparatus, a figure is usually composed of a plurality of pixels.
Furthermore, in order to operate the device, there are cases where it is desired to select a specific pixel within this figure using a cursor. The present invention relates to a method for finding the pixel closest to the cursor position. The present invention mainly consists of
Since the present invention is often used in CAD (Computer Aided Design) devices, the present invention will be explained using a CAD device as an example. In CAD equipment, CRT
Various designs are performed while interacting with a computer while displaying figures on the screen. When performing such design operations, you may want to point a cursor at a part of a figure displayed on a CRT and specifically display or recognize that part. In order to recognize the part of the figure pointed to by the cursor and specially display this part, it is necessary to calculate the distance between the cursor and each pixel and select the pixel with the closest distance. The following methods (a) and (b) are known as methods for finding the pixel closest to this cursor.

(イ) 図形の全画素についてカーソルとの距離を計
算してその結果所望の画素を検出する方法。
(b) A method of calculating the distance from the cursor for all pixels of a figure and detecting the desired pixel as a result.

この方法によれば総べての画素について距離
計算を行なわなければならない。通常、CAD
装置に表示される画素は多数のものであるた
め、この(イ)の方法では膨大な計算を必要とす
る。その結果カーソルに一番近い画素を取り出
すのに長時間を要する欠点がある。
According to this method, distance calculations must be performed for all pixels. Typically, CAD
Since the number of pixels displayed on the device is large, method (a) requires a huge amount of calculation. As a result, there is a drawback that it takes a long time to extract the pixel closest to the cursor.

(ロ) CRTの画面をX方向、Y方向でN等分して
幾つかのブロツクに分け、カーソルが存在する
ブロツク内の画素についてのみカーソルとの距
離計算をする方法。
(b) A method in which the CRT screen is divided into N equal parts in the X and Y directions into several blocks, and the distance from the cursor is calculated only for pixels within the block where the cursor exists.

この方法によれば、上記(イ)の方法よりは計算
量が減少するとはいえ、まだ計算の量が多く、
所定の画素を取り出すのに長時間を要する。そ
してカーソルの位置によつては最悪で4ブロツ
クをサーチ対象としなければならない場合があ
る。また画素がどこに属するかは画面の状態
(拡大、縮小、平行移動)により変るので、
RERAINT動作ごとにどのブロツクに存在す
るかというBITを更新しなければならない欠点
もある。
Although this method reduces the amount of calculations compared to method (a) above, it still requires a large amount of calculations.
It takes a long time to extract a given pixel. Depending on the position of the cursor, at worst four blocks may have to be searched. Also, where a pixel belongs changes depending on the state of the screen (enlargement, reduction, parallel movement), so
There is also the drawback that the BIT indicating which block exists must be updated for each RERAINT operation.

以上説明してきた点に鑑みて本発明はなされた
ものである。本発明の概要を述べると、カーソル
の動きにつれて移動するエリアであつて、そのエ
リア内において最大または最小の座標データの有
無をサーチする第1工程と、このサーチで最大ま
たは最小の座標データを検出すると、その時点
で、カーソルを中心としてこの検出された最大ま
たは最小の座標データに対応する画素に接する新
しいエリアに縮小する第2工程と、前記第1工程
と第2工程を繰返し、前記エリアを予め設定され
た大きさを限度として次々と縮小し、最小のエリ
アに残つた画素がカーソル位置に一番近い画素と
認識する第3工程と、を備えるようにしたもので
ある。
The present invention has been made in view of the points explained above. To summarize the present invention, the first step is to search for the presence or absence of maximum or minimum coordinate data in an area that moves as the cursor moves, and to detect the maximum or minimum coordinate data in this search. Then, at that point, a second step of shrinking to a new area touching the pixel corresponding to the detected maximum or minimum coordinate data with the cursor as the center is performed, and the first and second steps are repeated to expand the area. A third step of successively reducing the size up to a preset size and recognizing the pixels remaining in the smallest area as the pixels closest to the cursor position.

以下図面を用いて本発明の動作を詳細に説明す
る。第1図はCAD装置のCRT画面の表示例を示
したものである。同図において、1はカーソルで
ありCAD装置を操作する者がジヨイステイツク
(joy stick)などを使用してCRT上の任意の位置
に設定できるものである。A1〜A6は画素である。
第1図では、各画素な1つの独立した図形(丸と
か3角)として表現したがもつと細かいレベル
(線分)に分けたものであつてもよい。例えば画
素A5を4本の直線に分けて構成してもよい。し
かし、電気回路図等を作成するCAD装置の分野
においては、1本1本の直線を意味することよ
り、各画素は、それぞれトランジスタ、IC、ダ
イオード等を表わす図形であることが多い。
The operation of the present invention will be explained in detail below using the drawings. FIG. 1 shows an example of a display on a CRT screen of a CAD device. In the figure, numeral 1 is a cursor that can be set at any position on the CRT by the person operating the CAD device using a joy stick or the like. A1 to A6 are pixels.
In FIG. 1, each pixel is expressed as an independent figure (circle or triangle), but it may be divided into finer levels (line segments). For example, pixel A5 may be divided into four straight lines. However, in the field of CAD devices that create electrical circuit diagrams, etc., each pixel is often a figure representing a transistor, IC, diode, etc., rather than a single straight line.

このようなCRT画面において例えば画素A2
選択してこれを修正しようとした場合、まず画素
A2をコンピユータへ認識させる必要がある。そ
のためにカーソル1を画素A2のところへ移動さ
せるわけであるが、カーソル1を正確に画素A2
の線上に重ねることは神経のいる操作である。そ
こで前記したようにカーソルに一番近い位置の画
素をコンピユータでサーチして、そのサーチの結
果得られた画素を選択するようにしている。そし
てこのサーチする方法が従来の方法では、欠点を
有しているので本発明がなされたのである。
For example, if you select pixel A 2 on such a CRT screen and try to modify it, first
A 2 needs to be recognized by the computer. To do this, cursor 1 is moved to pixel A 2 , but cursor 1 must be moved to pixel A 2
Superimposing it on the line is a nerve-wracking operation. Therefore, as described above, the computer searches for the pixel closest to the cursor, and the pixel obtained as a result of the search is selected. The present invention was developed because the conventional search method has drawbacks.

CAD装置の操作者などからの入力により総べ
ての画素には名前が付され、その情報は2次元デ
ータベースとして管理されている。また、各画素
は、定義空間で最大、最小(MIN−MAX)値を
持つている。説明を加える。各画素をX−Y平面
上に配置したと仮定する。各画素は、このX−Y
平面上の或る領域を占有するわけであるから、こ
の占有領域のx座標上の最大と最小値、Y座標上
の最大と最小値が存在する。各画素をCAD装置
へ入力する際に、コンピユータによりその最大と
最小の座標値が計算され、各画素ごとにその名前
の情報と共にデータベースとして管理されてい
る。このデータベースの概念を第3図に示す。例
えば、第1図において画素A6の最大、最小値は
Xn,YnとXm,Ymである。そこでこの画素の
名前がA6であるとすれば第3図のように最大と
最小の座標値が格納されている。
All pixels are given names based on input from the CAD device operator, and this information is managed as a two-dimensional database. Also, each pixel has a maximum and minimum (MIN-MAX) value in the definition space. Add explanation. Assume that each pixel is arranged on the XY plane. Each pixel is
Since it occupies a certain area on a plane, there are maximum and minimum values on the x-coordinate and maximum and minimum values on the y-coordinate of this occupied area. When inputting each pixel to a CAD device, a computer calculates its maximum and minimum coordinate values, and each pixel is managed as a database along with its name information. The concept of this database is shown in Figure 3. For example, in Figure 1, the maximum and minimum values of pixel A 6 are
They are Xn, Yn and Xm, Ym. Therefore, if the name of this pixel is A6 , the maximum and minimum coordinate values are stored as shown in Figure 3.

以上のようなCRTの表示及びデータベースの
状態を基にして、本発明の表示図形の検出方法は
次のように動作する。
Based on the CRT display and database status as described above, the display graphic detection method of the present invention operates as follows.

第1図において例えば画素A2を選択する場合
の動作を説明する。まず、ジヨイステイツク等を
用いてカーソルを画素A2の近傍まで移動させる。
ここまでの動作は従来のものと同様である。しか
し、以下に説明するサーチ動作が従来のものと異
なる。
The operation when selecting, for example, pixel A2 in FIG. 1 will be explained. First, move the cursor to the vicinity of pixel A2 using a joystick or the like.
The operation up to this point is the same as the conventional one. However, the search operation described below is different from the conventional one.

本発明ではカーソルの動きにつれて移動するエ
リアを設定している。このエリアは例えば第2図
のB1〜B3に示すようなものである。即ち、一番
大きなエリアはカーソルの+マークを基にした四
角形のエリアである。ここで第2図は第1図のカ
ーソル付近の拡大図である。
In the present invention, an area is set that moves as the cursor moves. This area is, for example, as shown in B1 to B3 in FIG. That is, the largest area is a rectangular area based on the + mark of the cursor. Here, FIG. 2 is an enlarged view of the vicinity of the cursor in FIG. 1.

まず始めに、カーソルが移動された位置におい
て最大のエリアB1の範囲内でコンピユータはサ
ーチを行なう。何をサーチするかと言えば、第3
図に示すデータベースにおいて各画素の最大、最
小の座標値が上記エリアB1に含まれているか否
かである。
First, the computer searches within the largest area B1 at the position where the cursor has been moved. What to search for is the third
This is whether or not the maximum and minimum coordinate values of each pixel in the database shown in the figure are included in the area B1 .

コンピユータがデータベース上を順にスキヤン
して行きこのエリアB1内に属する最大、又は最
小の座標値を検出するとその時点でサーチするエ
リアを変更する。どのように変更するかと言え
ば、、カーソルの原点0を中心としてこの検出さ
れた最大または最小の座標データに対応する画素
に接する大きさのエリアに縮小するのである。
The computer sequentially scans the database and, when it detects the maximum or minimum coordinate value belonging to this area B1 , changes the area to be searched at that point. How to change it is to reduce the size of the area to a size that is centered on the origin 0 of the cursor and touches the pixel corresponding to the detected maximum or minimum coordinate data.

第2図を用いて具体的に説明すると、データベ
ース上をサーチして行き画素A1の最大値を検出
したとする。するとその時点でサーチエリアを第
2図に示すように、画素A1に接するエリアB2
縮小する。
To explain specifically using FIG. 2, it is assumed that a database is searched and the maximum value of pixel A1 is detected. At that point, the search area is reduced to area B2 adjacent to pixel A1 , as shown in FIG.

そして、この縮小したエリア内でコンピユータ
はサーチを再びすることになる。その結果、コン
ピユータは画素A2の最小値を検出するのでサー
チするエリアは更に小さいB3となる。
The computer then searches again within this reduced area. As a result, the computer detects the minimum value of pixel A2 , so the search area becomes B3 , which is even smaller.

次にコンピユータはこのエリアB3内でサーチ
を行なうが、その結果もはや他の最大、最小の座
標を検出できないので、この画素A2を求める画
素として認識する。この画素A2が、カーソルに
最も近接した画素であることについて説明を加え
る。
Next, the computer searches within this area B3 , but as a result, the other maximum and minimum coordinates can no longer be detected, so this pixel A2 is recognized as the pixel to be sought. An explanation will be added regarding the fact that this pixel A2 is the pixel closest to the cursor.

本発明においては、或るサーチエリアでサーチ
し、最大または最小の座標値を検出すると、その
時点で直ちにサーチ範囲を縮小している。従つ
て、上記或るサーチエリアの中には、他の画素が
存在している可能性もあるが、他の画素を検出す
る動作を省いても、本発明は、確実にカーソル位
置に最も近接した画素を選び出すことができる。
In the present invention, when a certain search area is searched and the maximum or minimum coordinate value is detected, the search range is immediately reduced at that point. Therefore, there is a possibility that other pixels exist in the certain search area, but even if the operation of detecting other pixels is omitted, the present invention reliably detects the pixels closest to the cursor position. It is possible to select pixels that are

その理由は簡単である。縮小するサーチエリア
の大きさが、第2図に示すように検出した画素に
接する大きさだからである。
The reason is simple. This is because the size of the search area to be reduced is the size that touches the detected pixel as shown in FIG.

第2図を用いて補足説明する。例えば、サーチ
エリアB1でサーチした場合、最初に画素A1を検
出すると、画素A2が存在しているにもかかわら
ず、直ちに画素A1に接するサーチエリアB2に縮
小する。次に、このサーチエリアB2でサーチす
るとカーソルに最も近接した画素A2が検出され
る。
A supplementary explanation will be provided using FIG. 2. For example, when searching in search area B1 , when pixel A1 is detected first, the search area is immediately reduced to search area B2 adjacent to pixel A1 , even though pixel A2 exists. Next, when searching in this search area B2 , the pixel A2 closest to the cursor is detected.

もし、サーチエリアB1で最初に画素A2が検出
されると、直ちにサーチエリアB3でサーチする
ことになるので、もはや座標を検出できず、画素
A2がカーソルに最も近接した画素となる。
If pixel A 2 is detected first in search area B 1 , it will be searched immediately in search area B 3 , so the coordinates can no longer be detected and the pixel
A 2 is the pixel closest to the cursor.

このような動作のフローを第4図に示す。 The flow of such operation is shown in FIG.

以上説明したように本発明によれば次のような
効果が得られる。
As explained above, according to the present invention, the following effects can be obtained.

(a) サーチする範囲は第2図のところで述べたよ
うに狭い範囲であるため従来の場合と比較して
サーチ時間が短縮される。
(a) Since the search range is narrow as described in FIG. 2, the search time is shortened compared to the conventional case.

なお、最初のサーチ範囲B1は、第2図では
カーソルの大きさに合せた四角形としたがこれ
に限定するものではない。即ち、カーソルの大
きさより大きくても小さくてもよい。また四角
形でなく他の形状であつてもよい。
Although the first search range B1 is a rectangle matching the size of the cursor in FIG. 2, it is not limited to this. That is, it may be larger or smaller than the cursor size. Further, the shape may be other than a rectangle.

(b) (a)のところで説明したようなサーチの結果、
最初に或る座標値を検出すると、その時点で直
ちにサーチ範囲を縮小するのでエリアB1で残
された部分のサーチをしなくても済むので更に
サーチ時間が短縮される。
(b) The results of a search as described in (a),
When a certain coordinate value is detected for the first time, the search range is immediately reduced at that point, so there is no need to search the remaining area in area B1 , and the search time is further shortened.

(c) サーチ範囲に属するか否かの判断はデータベ
ースの最大、最小の座標値を用いているため画
素の形状の影響を受けずスキヤンスピードが速
い。
(c) Since the maximum and minimum coordinate values of the database are used to determine whether an object belongs to the search range, it is not affected by the shape of the pixel and the scanning speed is fast.

なお、サーチ範囲の面積を無限に小さくして行
くとすればサーチはいつ終るか図り知れない。そ
こで本発明では、サーチ範囲を小さくした場合の
面積(第2図ではB3)に一定の限界を設けその
範囲でサーチは終了としている。
Note that if the area of the search range is made infinitely small, it is impossible to predict when the search will end. Therefore, in the present invention, a certain limit is set for the area (B 3 in FIG. 2) when the search range is reduced, and the search ends within that range.

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

第1図はCAD装置のCRT画面の表示例を示し
た図、第2図は第1図のカーソル部分の周辺拡大
図、第3図はデータベースの概念を示した図、第
4図は本発明の動作フローの例を示した図であ
る。 1……カーソル、A1〜A6……画素、B1〜B3
…エリア。
Figure 1 is a diagram showing a display example of a CRT screen of a CAD device, Figure 2 is an enlarged view of the cursor area in Figure 1, Figure 3 is a diagram showing the concept of a database, and Figure 4 is a diagram showing the invention of the present invention. FIG. 3 is a diagram showing an example of an operation flow. 1...Cursor, A1 to A6 ...Pixels, B1 to B3 ...
…area.

Claims (1)

【特許請求の範囲】 1 各画素ごとに表示平面上の最大・最小の座標
データを持たせ、これらの各画素をCRT上の表
示する装置であつて、CRT画面に表示された複
数の画素のうちカーソルの位置に一番近い画素を
検出する方法において、 カーソルの動きにつれて移動するエリアであつ
て、そのエリア内において前記最大または最小の
座標データの有無をサーチする第1工程と、 このサーチで最大または最小の座標データを検
出すると、その時点で、カーソルを中心としてこ
の検出された最大または最小の座標データに対応
する画素A1に接する新しいエリアに縮小する第
2工程と、 前記第1工程と第2工程を繰返し、前記エリア
を予め設定された大きさを限度として次々と縮小
し、最小のエリアに残つた画素がカーソルの位置
に一番近い画素A2と認識する第3工程と、 を備えた表示図形の検出方法。
[Scope of Claims] 1. A device that displays each pixel on a CRT by providing maximum and minimum coordinate data on a display plane for each pixel, and which displays a plurality of pixels displayed on a CRT screen. In the method of detecting the pixel closest to the cursor position, the first step is to search for the presence or absence of the maximum or minimum coordinate data in an area that moves as the cursor moves; When the maximum or minimum coordinate data is detected, a second step of reducing the cursor to a new area touching the pixel A1 corresponding to the detected maximum or minimum coordinate data at that point; and the first step; a third step of repeating the second step, successively reducing the area up to a preset size, and recognizing that the pixel remaining in the smallest area is the pixel A2 closest to the cursor position; How to detect displayed figures.
JP58053104A 1983-03-29 1983-03-29 Detection of display graphic Granted JPS59177593A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58053104A JPS59177593A (en) 1983-03-29 1983-03-29 Detection of display graphic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58053104A JPS59177593A (en) 1983-03-29 1983-03-29 Detection of display graphic

Publications (2)

Publication Number Publication Date
JPS59177593A JPS59177593A (en) 1984-10-08
JPH0318195B2 true JPH0318195B2 (en) 1991-03-11

Family

ID=12933480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58053104A Granted JPS59177593A (en) 1983-03-29 1983-03-29 Detection of display graphic

Country Status (1)

Country Link
JP (1) JPS59177593A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61295596A (en) * 1985-06-25 1986-12-26 株式会社 写研 Data editing system for input editor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57123435A (en) * 1981-01-24 1982-07-31 Mitsubishi Electric Corp Display device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57123435A (en) * 1981-01-24 1982-07-31 Mitsubishi Electric Corp Display device

Also Published As

Publication number Publication date
JPS59177593A (en) 1984-10-08

Similar Documents

Publication Publication Date Title
EP0243925B1 (en) Instruction input system for electronic processor
US20090090567A1 (en) Gesture determination apparatus and method
JP2804224B2 (en) Network diagram drawing method and system
JP3025173B2 (en) Database search system
US20180101298A1 (en) Graph display apparatus, graph display method and storage medium
KR20100125703A (en) System and method of gesture-based user interface
JP3166896B2 (en) Method and apparatus for selecting an edit target displayed on a screen
JPS63123165A (en) Correlation of cursor and display entity
US5673067A (en) Information processing apparatus and method
JPS63123166A (en) Correlation of cursor and entity
JP3357760B2 (en) Character / graphic input editing device
JPH0318195B2 (en)
US20020015054A1 (en) Graphics displaying method and apparatus
KR20020082855A (en) A method of providing a display for a graphical user interface
JP3108605B2 (en) How to display shape attributes
JPH0580025B2 (en)
JPS61267179A (en) Cursor window displaying system
JP2616442B2 (en) Image processing device
JP2536948B2 (en) Three-point specified circular arc detection method and device
JPS5819939A (en) Input device
JPH02250178A (en) Graphic generator
JP2000200033A (en) Method and program recording medium for retrieving drawing area relations
JP2005135268A (en) Apparatus, method and program for laying out space
JPH07160894A (en) Screening method for graphic element
KR19980030009A (en) How to Create Multiple Lines in Graphic Screen Processing