JPH0573689A - Line segment plotting device - Google Patents

Line segment plotting device

Info

Publication number
JPH0573689A
JPH0573689A JP25715291A JP25715291A JPH0573689A JP H0573689 A JPH0573689 A JP H0573689A JP 25715291 A JP25715291 A JP 25715291A JP 25715291 A JP25715291 A JP 25715291A JP H0573689 A JPH0573689 A JP H0573689A
Authority
JP
Japan
Prior art keywords
line segment
drawn
line
circuit
distance
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.)
Granted
Application number
JP25715291A
Other languages
Japanese (ja)
Other versions
JP3089740B2 (en
Inventor
Takeshi Ogawara
健 大河原
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP25715291A priority Critical patent/JP3089740B2/en
Publication of JPH0573689A publication Critical patent/JPH0573689A/en
Application granted granted Critical
Publication of JP3089740B2 publication Critical patent/JP3089740B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To automatically plot a line segment keeping fixed interval to a plotted line segment. CONSTITUTION:At the time of newly plotting the curved line parallel with the curved line which is already plotted on a CRT display device 14, when the interval between the plotted line segment and the line segment to newly plot is specified from a key input part 12, a distance calculating circuit 18 determines the distance between them. A plotting picture element calculating circuit 20 determines a picture element to newly plotted based on the distance obtained by the distance calculating circuit 18 and the analyzing result of a line segment analyzing circuit 19. A plotting circuit 21 successively combines the plotting picture elements and plots the new line segment.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、パーソナルコンピュ
ータやワードプロセッサ等の図形処理において、曲線等
を描画する線分描画装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a line segment drawing apparatus for drawing a curve or the like in graphic processing of a personal computer, a word processor or the like.

【0002】[0002]

【従来の技術】従来、ワードプロセッサ等の図形処理に
おいて、カーソルキー等の入力手段を用いて任意の曲線
パターンをフリーハンド方式にしたがって描画するよう
にしているが、例えば、図6に示す如く既に描画されて
いる曲線PQに対して一定間隔aを保って平行する曲線
RSを新たに描画する際にもカーソルキー等を用いて新
たな曲線RSをフリーハンド方式にしたがって描画する
ようにしていた。
2. Description of the Related Art Conventionally, in a graphic processing of a word processor or the like, an arbitrary curve pattern is drawn according to a freehand method by using an input means such as a cursor key. For example, as shown in FIG. Even when a curved line RS parallel to the existing curved line PQ is maintained at a constant interval a, a new curved line RS is drawn in accordance with the freehand method using a cursor key or the like.

【0003】[0003]

【発明が解決しようとする課題】ところで、平行する2
本の直線等を描画する場合には一方の線分をフリーハン
ド方式にしたがって描画したのち、この線分を複写して
他方の線分を描画するようにすれば、平行する2本の直
線等を正確に得ることができるが、複写によって平行す
る2本の線分を描画する方法は直線等の様に比較的簡単
な線分に限られてしまう。この為、図6に示す如く複雑
な形状の曲線PQに対して一定間隔aを持って平行する
曲線RSを描画する場合にはフリーハンド方式にしたが
って描画するようにしているが、複雑な形状の線分をフ
リーハンド方式にしたがって描画することは、極めて困
難なものとなっていた。この発明の課題は、既に描画さ
れている線分に対して一定間隔を保った線分を自動的に
描画できるようにすることである。
By the way, the parallel 2
When drawing a straight line of a book, if one line segment is drawn according to the freehand method and then this line segment is copied to draw the other line segment, two parallel straight lines, etc. However, the method of drawing two parallel line segments by copying is limited to a relatively simple line segment such as a straight line. For this reason, as shown in FIG. 6, when the curved line RS parallel to the curved line PQ having a complicated shape at a constant interval a is drawn, the freehand method is used. It has been extremely difficult to draw a line segment according to the freehand method. An object of the present invention is to make it possible to automatically draw a line segment that maintains a constant interval with respect to a line segment that has already been drawn.

【0004】[0004]

【課題を解決するための手段】この発明の手段は次の通
りである。間隔指定手段1(図1の機能ブロック図を参
照、以下同じ)は、既に描画されている第1の線分に対
して平行する第2の線分を新たに描画する際、既に描画
されている第1の線分と新たに描画する第2の線分との
間隔を指定する。この場合、新たに描画する線分の始点
位置をカーソルキー等によってポイント指定するように
してもよい。線分解析手段2は既に描画されている第1
の線分の形状を解析する。描画手段3は線分解析手段2
の解析結果と間隔指定手段1によって指定された間隔と
に基づいて第1の線分に対して一定の間隔を保ちながら
第2の線分を描画する。
The means of the present invention are as follows. The interval designating means 1 (see the functional block diagram of FIG. 1, the same applies hereinafter) is already drawn when newly drawing a second line segment parallel to the already drawn first line segment. The interval between the first line segment that is present and the second line segment that is newly drawn is specified. In this case, the start point position of a line segment to be newly drawn may be designated by a cursor key or the like. The line segment analysis means 2 is the first one already drawn
Analyze the shape of the line segment of. The drawing means 3 is the line segment analysis means 2
The second line segment is drawn while keeping a constant interval with respect to the first line segment based on the analysis result and the interval designated by the interval designating means 1.

【0005】[0005]

【作用】この発明の手段の作用は次の通りである。い
ま、第1の線分(曲線)をフリーハンド方式にしたがっ
て既に描画した状態において、この第1の線分に対して
平行する第2の線分を描画する際には、間隔指定手段1
によって第1の線分と第2の線分との間隔を指定する。
すると、線分解析手段2は第1の線分の形状を解析す
る。この解析結果と間隔指定手段1によって指定された
間隔とに基づいて描画手段3は第1の線分に対して一定
の間隔を保ちながら第2の線分を描画する。したがっ
て、既に描画されている線分に対して一定間隔を保った
線分を自動的に描画することができる。
The operation of the means of the present invention is as follows. Now, in the state where the first line segment (curve) has already been drawn according to the freehand method, when the second line segment parallel to the first line segment is drawn, the interval designating means 1
Specifies the interval between the first line segment and the second line segment.
Then, the line segment analysis means 2 analyzes the shape of the first line segment. Based on the analysis result and the interval designated by the interval designating means 1, the drawing means 3 draws the second line segment while keeping a constant interval with respect to the first line segment. Therefore, it is possible to automatically draw a line segment that maintains a constant interval with respect to a line segment that has already been drawn.

【0006】[0006]

【実施例】以下、図2〜図5を参照して一実施例を説明
する。図2は線分描画装置の構成を示したブロック図で
ある。CPU11は各種プログラムにしたがってこの線
分描画装置の全体動作を制御するもので、キー入力部1
2から入力された文書データや図形データはビデオRA
M(VRAM)13を介してCRT表示装置14から表
示出力されたり、入力バッファ15に書き込まれたのち
テキストメモリ16に格納される。ここで、テキストメ
モリ16の内容はキー入力部12上の登録キー(図示せ
ず)が操作されると、外部記憶装置17に登録保存され
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment will be described below with reference to FIGS. FIG. 2 is a block diagram showing the configuration of the line segment drawing device. The CPU 11 controls the entire operation of this line segment drawing apparatus according to various programs.
Document data and graphic data input from 2 are video RA
It is displayed and output from the CRT display device 14 via the M (VRAM) 13, or written in the input buffer 15 and then stored in the text memory 16. Here, the contents of the text memory 16 are registered and stored in the external storage device 17 when a registration key (not shown) on the key input unit 12 is operated.

【0007】特に、本実施例においてはCPU11に距
離算出回路18、線分解析回路19、描画画素算出回路
20、描画回路21が接続されている。距離算出回路1
8は既に描画されている線分に対して平行する新たな線
分を描画する際、既に描画されている線分の始点と新た
に描画する線分の始点との距離を求める回路である。線
分解析回路19は既に描画されている線分の形状(画
素)を解析する回路、描画画素算出回路20は距離算出
回路18、線分解析回路19によって求められた内容か
ら新たな線分を描画する為の画素を求める回路、描画回
路21は描画画素算出回路20によって求められた画素
を描画点として描画すると共に、前回描画した描画点と
今回描画した描画点とを連結する線分を描画する回路で
ある。
In particular, in this embodiment, the CPU 11 is connected to the distance calculating circuit 18, the line segment analyzing circuit 19, the drawing pixel calculating circuit 20, and the drawing circuit 21. Distance calculation circuit 1
A circuit 8 obtains the distance between the starting point of the already drawn line segment and the starting point of the newly drawn line segment when drawing a new line segment parallel to the already drawn line segment. The line segment analysis circuit 19 analyzes a shape (pixel) of the already drawn line segment, and the drawing pixel calculation circuit 20 creates a new line segment from the contents calculated by the distance calculation circuit 18 and the line segment analysis circuit 19. A circuit for obtaining a pixel for drawing, the drawing circuit 21 draws the pixel obtained by the drawing pixel calculation circuit 20 as a drawing point, and also draws a line segment connecting the previously drawn drawing point and the currently drawn drawing point. It is a circuit to do.

【0008】次に、本実施例の動作を説明する。いま、
CRT表示装置14には図4に示す様な曲線PQが描画
されているものとする。ここで、曲線PQに対して平行
する新たな曲線を描画する場合にはキー入力部12上の
平行描画キー(図示せず)を操作する。すると、図3の
フローチャートにしたがった平行描画処理が実行され
る。先ず、新たに描画する曲線の開始点Rをカーソルキ
ー等によって指定すると(ステップS1)、距離算出回
路18は既に描画されている曲線PQの開始点Pと新た
に描画する曲線の開始点Rとの距離Aを求めると共に、
この距離Aから点Pを通る法線上の距離(描画距離)a
を求める(ステップS2)。
Next, the operation of this embodiment will be described. Now
It is assumed that a curve PQ as shown in FIG. 4 is drawn on the CRT display device 14. Here, when drawing a new curve parallel to the curve PQ, a parallel drawing key (not shown) on the key input unit 12 is operated. Then, parallel drawing processing according to the flowchart of FIG. 3 is executed. First, when the start point R of the newly drawn curve is designated by the cursor key or the like (step S1), the distance calculation circuit 18 sets the start point P of the already drawn curve PQ and the start point R of the newly drawn curve. And obtain the distance A of
Distance (drawing distance) a from the distance A to the normal line passing through the point P
Is calculated (step S2).

【0009】次に、線分解析回路19は既に描画されて
いる曲線PQ上において、その開始点から終了点までの
主要点(画素)をP0、P1、P2……とすると、隣り合
う2つの点Pn、Pn+1(n=0、1、2……)を求める
(ステップS3)。最初は2つの点としてP0、P1が求
められる(図5参照)。そして、線分解析回路19はこ
の2つの点P0、P1を通る直線(接線)f1を求め(ス
テップS4)、この接線f1と直交し、2つの点P0、P
1の中心を通る法線g1を求める(ステップS5)。
Next, assuming that the main points (pixels) from the start point to the end point of the line segment analysis circuit 19 on the already drawn curve PQ are P 0 , P 1 , P 2, ... Two matching points P n and P n + 1 (n = 0, 1, 2 ...) Are obtained (step S3). Initially, P 0 and P 1 are obtained as two points (see FIG. 5). Then, the line segment analysis circuit 19 obtains a straight line (tangent line) f 1 passing through these two points P 0 and P 1 (step S4), and is orthogonal to this tangent line f 1 and has two points P 0 and P 1.
A normal line g 1 passing through the center of 1 is obtained (step S5).

【0010】このようにして求めた法線g1上におい
て、描画画素算出回路20は点P0、P1の中心から描画
距離aを隔てた位置座標を求め(ステップS6)、これ
が新たに描画すべき最初の画素R0となる。次に、描画
回路21はこのようにして求めた画素Rnと前回求めた
画素Rn-1とを直線で結合するが(ステップS7)、最
初の画素R0を求めた際、ステップS7はスキップさ
れ、ステップS8に進み、新たな線分をその終了点まで
全て描画し終ったか否かを調べ、終了していなければス
テップS3に戻る。
On the normal line g 1 thus obtained, the drawing pixel calculation circuit 20 finds a position coordinate at a drawing distance a from the center of the points P 0 and P 1 (step S6), and this is newly drawn. This is the first pixel R 0 to be processed. Next, the drawing circuit 21 connects the pixel R n thus obtained and the previously obtained pixel R n-1 by a straight line (step S7), but when the first pixel R 0 is obtained, the step S7 is The process is skipped, the process proceeds to step S8, and it is checked whether or not all the new line segments have been drawn to the end point. If not completed, the process returns to step S3.

【0011】その結果、今度は点P1、P2を通る接線f
2に直交し、点P1、P2の中心を通る法線g2を求め(ス
テップS5)、この法線g2上において距離aを隔てた
画素R1を求める(ステップS6)。次いで、今回求め
た画素R1と前回求めた画素R0とを直線で結合する(ス
テップS7)。
As a result, this time, the tangent line f passing through the points P 1 and P 2
Perpendicular to 2, normal g 2 a determined (step S5) passing through the center of the points P 1, P 2, obtains the pixel R 1 with a distance a on the normal line g 2 (step S6). Next, the pixel R 1 obtained this time and the pixel R 0 obtained last time are connected by a straight line (step S7).

【0012】以下、上述と同様の動作を繰り返すことに
よって点Pn、Pn+1を通る法線fnと直交し、点Pn、P
n+1の中心を通る法線gn上において距離aを隔てた画素
nを求めながら画素Rn、Rn-1を結合してゆく。この
結果、既に描画されている曲線PQに対して距離aを隔
てた曲線が新たに描画がされ、曲線PQに平行する曲線
が自動的に描画される。
[0012] Hereinafter, the point P n by repeating the same operation as described above, and perpendicular to the normal line f n through P n + 1, the point P n, P
The pixels R n and R n-1 are combined while obtaining the pixel R n separated by the distance a on the normal line g n passing through the center of n + 1 . As a result, a curve separated by a distance a from the already drawn curve PQ is newly drawn, and a curve parallel to the curve PQ is automatically drawn.

【0013】なお、既に描画されている曲線の種類(実
線、破線、太線、細線等)を判別し、その曲線の線種と
同様の線種を自動的に選択して新たな曲線を描画するよ
うにしてもよい。
The type of the already drawn curve (solid line, broken line, thick line, thin line, etc.) is discriminated, and a line type similar to that of the curve is automatically selected to draw a new curve. You may do it.

【0014】[0014]

【発明の効果】この発明によれば、既に描画されている
線分に対して一定間隔を保った線分を自動的に描画する
ことができるので、どんなに複雑な形状を持った線分で
あっても平行する線分を正確に描画することが可能とな
る。特に、地図上に多数の道路を描画する場合、一定幅
を持った多数のカーブ曲線を効率良く描画することがで
きるので、地図を作成する上で極めて有効なものとな
る。
According to the present invention, it is possible to automatically draw a line segment having a constant interval with respect to a line segment that has already been drawn. Therefore, the line segment has a complicated shape. However, it is possible to accurately draw parallel line segments. In particular, when many roads are drawn on a map, a large number of curved curves having a constant width can be efficiently drawn, which is extremely effective in creating a map.

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

【図1】この発明の機能ブロック図。FIG. 1 is a functional block diagram of the present invention.

【図2】実施例を示した線分描画装置のブロック図。FIG. 2 is a block diagram of a line segment drawing apparatus showing an embodiment.

【図3】本実施例の動作を説明する為のフローチャー
ト。
FIG. 3 is a flowchart for explaining the operation of this embodiment.

【図4】既に描画されている線分に対して平行する新た
な線分を描画する際に、新たな線分の開始点Rを指定す
ることによって算出された描画距離aを示した図。
FIG. 4 is a diagram showing a drawing distance a calculated by designating a start point R of a new line segment when drawing a new line segment parallel to the already drawn line segment.

【図5】既に描画されている線分を解析することによっ
て新たな線分が描画される様子を示した図。
FIG. 5 is a diagram showing how a new line segment is drawn by analyzing a line segment that has already been drawn.

【図6】従来例を説明する為の図で、平行する曲線を示
した図である。
FIG. 6 is a diagram for explaining a conventional example and is a diagram showing parallel curves.

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

11 CPU 12 キー入力部 13 VRAM 14 CRT表示装置 18 距離算出回路 19 線分解析回路 20 描画画素算出回路 21 描画回路 11 CPU 12 Key Input Section 13 VRAM 14 CRT Display Device 18 Distance Calculation Circuit 19 Line Segment Analysis Circuit 20 Drawing Pixel Calculation Circuit 21 Drawing Circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】既に描画されている第1の線分に対して平
行する第2の線分を新たに描画する際、既に描画されて
いる第1の線分と新たに描画する第2の線分との間隔を
指定する間隔指定手段と、 第1の線分の形状を解析する線分解析手段と、 この線分解析手段の解析結果と前記間隔指定手段によっ
て指定された間隔とに基づいて第1の線分に対して一定
の間隔を保ちながら第2の線分を描画する描画手段と、 を具備したことを特徴とする線分描画装置。
1. When a second line segment parallel to the already drawn first line segment is newly drawn, the first line segment already drawn and the second line segment newly drawn Based on an interval designating means for designating an interval with the line segment, a line segment analyzing means for analyzing the shape of the first line segment, an analysis result of the line segment analyzing means and an interval designated by the interval designating means. And a drawing means for drawing the second line segment while keeping a constant interval with respect to the first line segment.
JP25715291A 1991-09-10 1991-09-10 Line drawing device Expired - Fee Related JP3089740B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25715291A JP3089740B2 (en) 1991-09-10 1991-09-10 Line drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25715291A JP3089740B2 (en) 1991-09-10 1991-09-10 Line drawing device

Publications (2)

Publication Number Publication Date
JPH0573689A true JPH0573689A (en) 1993-03-26
JP3089740B2 JP3089740B2 (en) 2000-09-18

Family

ID=17302438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25715291A Expired - Fee Related JP3089740B2 (en) 1991-09-10 1991-09-10 Line drawing device

Country Status (1)

Country Link
JP (1) JP3089740B2 (en)

Also Published As

Publication number Publication date
JP3089740B2 (en) 2000-09-18

Similar Documents

Publication Publication Date Title
US7362922B2 (en) Image database apparatus and method of controlling operation of same
US6232987B1 (en) Progressively renderable outline font and methods of generating, transmitting and rendering the same
JPH04344524A (en) Image display device
JP3062382B2 (en) Image processing apparatus and method
JPH0573689A (en) Line segment plotting device
CN112256175B (en) Text display method, text display device, electronic equipment and computer readable storage medium
JP3160436B2 (en) Target information display device
JPH06168278A (en) Facility data retrieving device
JPH0869525A (en) Method and device for converting vector data
JPH0736437A (en) Picture data processor
JP2897876B2 (en) Code data expansion processing method
JP2536619B2 (en) Graphic processing device
JPH10254673A (en) Display controller and display control method
JP2000251087A (en) Information processor, information processing method and storage medium
JPH04235686A (en) Picture processor
JPH04246691A (en) Character enlargement display device
JPS60246432A (en) Document displaying system
JPS62180423A (en) Job input system
JPH04287095A (en) Window reduction device
JP2000035782A (en) Image display method
JPH0581948B2 (en)
JP2001005440A (en) Character data generating device
JPS61184624A (en) System for partial erasing drawn picture image
JPS6373383A (en) Image output device
JPS62246092A (en) Full-angle cursor display unit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees