JP2646805B2 - Line segment drawing method and apparatus - Google Patents

Line segment drawing method and apparatus

Info

Publication number
JP2646805B2
JP2646805B2 JP2154523A JP15452390A JP2646805B2 JP 2646805 B2 JP2646805 B2 JP 2646805B2 JP 2154523 A JP2154523 A JP 2154523A JP 15452390 A JP15452390 A JP 15452390A JP 2646805 B2 JP2646805 B2 JP 2646805B2
Authority
JP
Japan
Prior art keywords
line
texture pattern
offset
line segment
line texture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2154523A
Other languages
Japanese (ja)
Other versions
JPH0447383A (en
Inventor
貢 山下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Daikin Industries Ltd
Original Assignee
Daikin Kogyo 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 Daikin Kogyo Co Ltd filed Critical Daikin Kogyo Co Ltd
Priority to JP2154523A priority Critical patent/JP2646805B2/en
Publication of JPH0447383A publication Critical patent/JPH0447383A/en
Application granted granted Critical
Publication of JP2646805B2 publication Critical patent/JP2646805B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】 <産業上の利用分野> この発明は線分描画方法およびその装置に関し、さら
に詳細にいえば、点線、破線、鎖線を描画する場合に好
適な線分描画方法およびその装置に関する。
The present invention relates to a line segment drawing method and a device therefor, and more particularly, to a line segment drawing method and a line segment drawing method suitable for drawing a dotted line, a broken line, and a chain line. Related to the device.

<従来の技術> 従来から図形処理装置においては線分を描画する場合
に実線のみならず点線、破線、鎖線を描画する要求が強
いので、予め複数種類のライン・テスクチャ・パターン
をテスクチャ・メモリに格納しておき、要求に応じて何
れかのライン・テスクチャ・パターンを選択して、設定
された範囲内の線分を描画するようにしている。具体的
には、第8図に示すように、描画する線分の長さをダウ
ン・カウンタ(21)に初期設定し、ダウン・カウンタ
(21)から出力される、内容が0でないことを示す信号
に基づいてメモリ・コントローラ(22)を制御するよう
にしている。そして、テスクチャ・メモリ(23)から読
出されるライン・テスクチャ・パターンをも書込み制御
信号としてメモリ・コントローラ(22)に供給してい
る。さらに、メモリ・コントローラ(22)から出力され
る書込み信号をフレームメモリ(24)に供給している。
<Prior Art> Conventionally, in a graphic processing apparatus, when drawing a line segment, there is a strong demand to draw not only a solid line, but also a dotted line, a broken line, and a chain line. It is stored, and any one of the line texture patterns is selected in accordance with a request, and a line segment within a set range is drawn. Specifically, as shown in FIG. 8, the length of the line segment to be drawn is initially set in the down counter (21), and the content output from the down counter (21) indicates that the content is not 0. The memory controller (22) is controlled based on the signal. The line texture pattern read from the texture memory (23) is also supplied to the memory controller (22) as a write control signal. Further, a write signal output from the memory controller (22) is supplied to the frame memory (24).

したがって、テスクチャ・メモリ(23)から読出され
たライン・テスクチャ・パターンを単位としてダウン・
カウンタ(21)に初期設定された線分の範囲に点線、破
線、または鎖線を描画することができる。
Therefore, it is possible to download the line texture pattern read from the texture memory (23) as a unit.
A dotted line, a broken line, or a chain line can be drawn in the range of the line segment initially set in the counter (21).

<発明が解決しようとする課題> 上記の構成の線分描画装置によれば、テスクチャ・メ
モリ(23)に格納されるライン・テスクチャ・パターン
の種類を増加させることにより種々の破線、鎖線を描画
することができるのであるが、描画する線分の長さは任
意に変化するのであるから、必ずしも線分の端部が可視
的に表示される(第9図A参照)という保証がなく、第
9図B,Cに示すように線分の終端が可視的には表示され
ないことになる。この結果、単独の線分であれば可視的
に表示された線分の長さが当初設定した線分の長さより
も短くなってしまい、また、連続して線分を描画する場
合には各線分間の結合部の表示が不自然になってしまう
という問題がある。特に、文書中に点線、破線、または
鎖線で囲まれた枠を表示する場合にな、枠の角に可視的
に表示されない要素が位置することにより文書全体とし
ての品質を低下させてしまうことになる。また、たまた
ま枠の角に可視的に表示される要素が位置した場合であ
っても、一般的に向い合う辺は互に逆向きに線分の描画
が行なわれる関係上、鎖線の場合には対応する要素が向
い合うという保証がなく、対応する要素が向い合わない
場合にはやはり文書全体としての品質を低下させてしま
うことになる。
<Problems to be Solved by the Invention> According to the line segment drawing apparatus having the above configuration, various kinds of dashed lines and chain lines are drawn by increasing the types of line texture patterns stored in the texture memory (23). However, since the length of the line segment to be drawn changes arbitrarily, there is no guarantee that the end of the line segment is always displayed visually (see FIG. 9A). 9 The end of the line segment will not be displayed visually as shown in FIGS. As a result, if it is a single line segment, the length of the visually displayed line segment will be shorter than the initially set line segment length, and if continuous line segments are to be drawn, There is a problem that the display of the connection portion for a minute becomes unnatural. In particular, when displaying a frame surrounded by a dotted line, a broken line, or a chain line in a document, the quality of the entire document is degraded due to the presence of elements that are not visually displayed at the corners of the frame. Become. Also, even if an element that is visually displayed happens to be located at the corner of the frame, the opposite side is generally drawn in the opposite direction because of the drawing of the line segment. There is no guarantee that the corresponding elements will face each other, and if the corresponding elements do not face each other, the quality of the document as a whole will also be reduced.

<発明の目的> この発明は上記の問題点に鑑みてなされたものであ
り、点線、破線、鎖線の種類、描画すべき線分の長さに
影響されることなく線分の終端部を可視的に表示するこ
とができるとともに、枠の向い合う辺について対応する
要素が向い合う状態を確保できる線分描画方法およびそ
の装置を提供することを目的としている。
<Object of the Invention> The present invention has been made in view of the above-described problems, and makes it possible to make the end of a line segment visible without being affected by the type of a dotted line, a broken line, a chain line, and the length of a line to be drawn. It is an object of the present invention to provide a line segment drawing method and an apparatus thereof that can be displayed in a uniform manner and can ensure a state in which corresponding elements face each other on opposite sides of a frame.

<課題を解決するための手段> 上記の目的を達成するための、この発明の線分描画方
法は、ライン・テスクチャ・パターンの任意の要素を始
端、終端の中心に配置してライン・テスクチャ・パター
ンを順次配置した状態におけるオフセットを得、オフセ
ットがライン・テスクチャ・パターンの描画要素に該当
することを条件としてそのままライン・テスクチャ・パ
ターンを描画し、オフセットがライン・テスクチャ・パ
ターンの非描画要素に該当することを条件としてライン
・テスクチャ・パターンの他の要素を選択し、再びオフ
セットを得るとともに、オフセットが何れの要素に該当
するかを判別する方法である。
<Means for Solving the Problems> In order to achieve the above object, a line segment drawing method according to the present invention provides a line texture pattern by arranging arbitrary elements of a line texture pattern at the centers of the start and end. The offset in the state where the patterns are sequentially arranged is obtained, and the line texture pattern is drawn as it is, provided that the offset corresponds to the drawing element of the line texture pattern, and the offset is used as a non-drawing element of the line texture pattern. This is a method in which another element of the line texture pattern is selected on the condition that the offset is true, an offset is obtained again, and which element the offset corresponds to is determined.

但し、ライン・テスクチャ・パターンが鎖線のライン
・テスクチャ・パターンである場合には、ライン・テス
クチャ・パターンの描画要素を始端、終端の中心に配置
する方法であればよく、また、ライン・テスクチャ・パ
ターンが点線または破線のライン・テスクチャ・パター
ンである場合には、最初にライン・テスクチャ・パター
ンの描画要素を始端、終端の中心に配置する方法であれ
ばよい。
However, if the line texture pattern is a chain line texture pattern, any method may be used as long as the drawing elements of the line texture pattern are arranged at the center of the start and end points. If the pattern is a dotted or dashed line texture pattern, any method may be used as long as the drawing elements of the line texture pattern are first placed at the center of the start and end points.

上記の目的を達成するための、この発明の線分描画装
置は、始端と終端との距離を算出する距離算出手段と、
ライン・テスクチャ・パターンの任意の要素を抽出する
要素抽出手段と、抽出した要素を始端、終端の中心に配
置してライン・テスクチャ・パターンを対称に配置した
場合に得られるオフセットを得るオフセット算出手段
と、得られたオフセットがライン・テスクチャ・パター
ンの描画要素に該当するか否かを判別するオフセット判
別手段と、オフセットが描画要素に該当することを示す
判別結果に基づいて、抽出された要素を中心に配置した
状態で線分を描画する線分描画手段と、オフセットが非
描画要素に該当することを示す判別結果に基づいて、他
の要素を選択させるべく要素抽出手段を制御する制御手
段とを含んでいる。
In order to achieve the above object, a line segment drawing device of the present invention includes a distance calculating unit that calculates a distance between a start end and an end.
Element extracting means for extracting an arbitrary element of the line texture pattern, and offset calculating means for obtaining an offset obtained when the extracted element is arranged at the center of the start and end points and the line texture pattern is arranged symmetrically And offset determining means for determining whether or not the obtained offset corresponds to the drawing element of the line texture pattern, and extracting the extracted element based on the determination result indicating that the offset corresponds to the drawing element. A line segment drawing unit that draws a line segment in a state of being placed at the center, and a control unit that controls an element extraction unit to select another element based on a determination result indicating that the offset corresponds to a non-drawing element. Contains.

但し、ライン・テスクチャ・パターンが鎖線のライン
・テスクチャ・パターンである場合には、要素抽出手段
が、ライン・テスクチャ・パターンの描画要素のみを始
端、終端の中心に配置する要素として抽出するものであ
ればよく、また、ライン・テスクチャ・パターンが点線
または破線のライン・テスクチャ・パターンである場合
には、要素抽出手段が、最初にライン・テスクチャ・パ
ターンの描画要素を始端・終端の中心に配置する要素と
して抽出するものであればよい。
However, when the line texture pattern is a chain line pattern, the element extracting means extracts only the drawing element of the line texture pattern as an element arranged at the center of the start and end. If the line texture pattern is a dotted or dashed line texture pattern, the element extracting means places the drawing element of the line texture pattern at the center of the start end and the end first. Any element may be extracted as long as it is extracted.

<作用> 第1の発明の線分描画方法であれば、ライン・テスク
チャ・パターンの任意の要素を始端、終端の中心に配置
してライン・テスクチャ・パターンを順次配置した状態
におけるオフセットを得、オフセットがライン・テスク
チャ・パターンの描画要素に該当する場合にはそのまま
ライン・テスクチャ・パターンを描画するが、オフセッ
トがライン・テスクチャ・パターンの非描画要素に該当
する場合にはライン・テスクチャ・パターンの他の要素
を選択し、再びオフセットを得るとともに、オフセット
が何れの要素に該当するかを判別するのであるから、両
端のオフセットを描画要素とすることができる中心要素
を得ることができ、この要素を始端、終端の中心に配置
した状態でライン・テスクチャ・パターンを対称に描画
することにより、1本の線分であれば正確な長さで可視
的に描画され、連続する線分であれば線分間の結合部の
表示を自然な状態にすることができる。特に、文書中に
点線、破線、または鎖線で囲まれた枠を表示する場合に
は、枠の角に可視的に表示される要素を位置させること
により文書全体としての品質を高め、しかも対応する要
素を向い合わせて文書全体としての品質を一層高めるこ
とができる。
<Operation> According to the line segment drawing method of the first invention, an offset is obtained in a state where arbitrary elements of the line texture pattern are arranged at the start and end centers and the line texture patterns are sequentially arranged. If the offset corresponds to the drawing element of the line texture pattern, the line texture pattern is drawn as it is. If the offset corresponds to the non-drawing element of the line texture pattern, the line texture pattern is drawn. Since another element is selected and the offset is obtained again, and it is determined which element the offset corresponds to, a central element that can use the offset at both ends as a drawing element can be obtained. Draw the line texture pattern symmetrically with the In the case of a single line segment, the line is visually drawn with an accurate length, and in the case of a continuous line segment, the display of the connected portion between the line segments can be made natural. In particular, when displaying a frame surrounded by a dotted line, a broken line, or a chain line in a document, the quality of the entire document is improved by locating elements that are visually displayed at the corners of the frame, and moreover, The quality of the whole document can be further improved by facing the elements.

第2の発明の線分描画方法であれば、線分の中心およ
び端部を描画要素で構成でき、線分の高品質化を達成で
きるとともに、向い合う線分同士の間における描画要素
の対応を達成して枠の品質を一層高めることができる。
According to the line segment drawing method of the second invention, the center and the end of the line segment can be constituted by the drawing element, and the quality of the line segment can be improved, and the correspondence of the drawing element between the facing line segments can be achieved. And the quality of the frame can be further improved.

第3の発明の線分描画方法であれば、描画要素が中心
に配置された状態で描画される可能性が高くなり、線分
の高品質化および線分が向い合っている場合における一
層の高品質化を達成できる。
With the line segment drawing method according to the third aspect of the present invention, the possibility that the drawing element is drawn in a state where the drawing elements are arranged at the center is increased, and the quality of the line segment is improved, and furthermore, when the line segments face each other, High quality can be achieved.

第4図の発明の線分描画装置であれば、ライン・テス
クチャ・パターンが予め分っているのであるから、距離
算出手段により始端と終端との距離を算出し、要素抽出
手段によりライン・テスクチャ・パターンの任意の要素
を抽出すれば、抽出した要素を始端、終端の中心に配置
してライン・テスクチャ・パターンを対称に配置した場
合に得られるオフセットをオフセット算出手段により得
ることができる。そして、得られたオフセットがライン
・テスクチャ・パターンの描画要素に該当するか否かを
オフセット判別手段により判別できるので、オフセット
が描画要素に該当する場合には、抽出された要素を中心
に配置した状態で線分描画手段により線分を描画すれば
よい。逆に、オフセットが非描画要素に該当する場合に
は、他の要素を選択させるべく制御手段により要素抽出
手段を制御するのであるから、オフセットの長さ、オフ
セットに対応する要素の長さ等が変化する。そして、こ
の場合にオフセットが描画要素に該当すれば、抽出し直
された要素を中心に配置した状態で線分描画手段により
線分を描画すればよい。即ち、要素の長さが異なる場合
にはオフセットおよび対応する要素の長さが共に変化
し、逆に要素の長さが変化しない場合には該当要素が非
描画要素から描画要素に変化する。したがって、始端、
終端の中心に配置する要素を変更するだけで、確実に非
描画要素を線分の端部に対応させることができ、第1の
発明と同様の作用を達成できる。
In the line segment drawing apparatus of the invention of FIG. 4, since the line texture pattern is known in advance, the distance between the start end and the end is calculated by the distance calculation means, and the line texture is calculated by the element extraction means. If an arbitrary element of the pattern is extracted, an offset obtained when the extracted element is arranged at the center of the start and end points and the line texture pattern is arranged symmetrically can be obtained by the offset calculation means. Then, it is possible to determine whether or not the obtained offset corresponds to the drawing element of the line texture pattern by the offset determining means. If the offset corresponds to the drawing element, the offset element is arranged around the extracted element. In this state, a line segment may be drawn by the line drawing unit. Conversely, when the offset corresponds to a non-drawing element, the element extracting means is controlled by the control means to select another element, so that the length of the offset, the length of the element corresponding to the offset, etc. Change. Then, in this case, if the offset corresponds to the drawing element, the line segment may be drawn by the line drawing unit in a state where the extracted element is arranged at the center. That is, if the length of the element is different, both the offset and the length of the corresponding element change. Conversely, if the length of the element does not change, the corresponding element changes from a non-drawing element to a drawing element. Therefore, the beginning,
Only by changing the element arranged at the center of the terminal end, the non-drawing element can be surely made to correspond to the end of the line segment, and the same operation as the first invention can be achieved.

第5の発明の線分描画装置であれば、線分の中心およ
び端部を描画要素で構成でき、線分の高品質化を達成で
きるとともに、向い合う線分同士の間における描画要素
の対応を達成して枠の品質を一層高めることができる。
According to the line segment drawing apparatus of the fifth aspect, the center and the end of the line segment can be constituted by the drawing element, and the quality of the line segment can be improved, and the correspondence of the drawing element between the facing line segments can be achieved. And the quality of the frame can be further improved.

第6の発明の線分描画方法であれば、描画要素が中心
に配置された状態で描画される可能性が高くなり、線分
の高品質化および線分が向い合っている場合における一
層の高品質化を達成できる。
According to the line segment drawing method of the sixth aspect, the possibility that the drawing element is drawn in a state where the drawing elements are arranged at the center is increased, and the quality of the line segment is improved and the further improvement in the case where the line segments face each other is achieved. High quality can be achieved.

<実施例> 以下、実施例を示す添付図面によって詳細に説明す
る。
<Example> Hereinafter, an example will be described in detail with reference to the accompanying drawings.

第1図はこの発明の線分描画方法の一実施例を示すフ
ローチャートであり、ステップにおいて始端(Ps)と
終端(Pe)とに基づいて描画線分の長さlを算出し、ス
テップにおいてライン・テスクチャ・パターンの単位
長さtを算出し、ステップにおいて描画線分の長さl
が最も長い描画要素の長さt1よりも短いか否かを判別
し、l<t1であると判別された場合には、ステップに
おいてオフセットを0とする。逆に、l≧t1であると判
別された場合には、ステップにおいてライン・テスク
チャ・パターンの最も長い描画要素を抽出し、ステップ
において、抽出された要素が配置された状態における
描画長さl1=l−t1を算出し、ステップにおいて描画
長さl1および単位長さtに基づいてl1/2tの演算を行な
って余りmを算出し、ステップにおいてt−m/2の演
算を行なうことによりオフセットを得る。
FIG. 1 is a flow chart showing an embodiment of a line segment drawing method according to the present invention. In step 1, the length l of the drawing line segment is calculated based on the start end (Ps) and the end (Pe), and Calculate the unit length t of the texture pattern, and in the step, the length l of the drawn line segment
Is determined to be shorter than the length t1 of the longest drawing element, and if it is determined that l <t1, the offset is set to 0 in the step. Conversely, if it is determined that l ≧ t1, the longest drawing element of the line texture pattern is extracted in the step, and the drawing length l1 = Calculate l−t1, calculate the remainder m by performing the calculation of l1 / 2t based on the drawing length l1 and the unit length t in the step, and calculate the offset by performing the calculation of tm / 2 in the step. obtain.

上記ステップまたはステップにおいてオフセット
が得られた後は、ステップにおいてオフセットがライ
ン・テスクチャ・パターンの何れの要素中にあるかを検
出し、ステップにおいて、検出された要素が描画要素
であるか否かを判別し、描画要素でないと判別された場
合には、ステップにおいて他の描画要素を抽出し、ス
テップにおいて、ステップで抽出された要素の中心
からステップで抽出された要素の中心までの長さdを
算出し、ステップにおいて、既に得られているオフセ
ットに対して上記長さdを加算し、ステップにおい
て、オフセットに長さdを加算した長さが単位長さtを
越えているか否かを判別する。そして、越えていないと
判別された場合には、再びステップの処理を行なう。
After the offset is obtained in the above step or the step, it is detected in which element of the line texture pattern the offset is located, and in the step, it is determined whether or not the detected element is a drawing element. If it is determined that the drawing element is not a drawing element, another drawing element is extracted in the step, and the length d from the center of the element extracted in the step to the center of the element extracted in the step is determined in the step. In the step, the length d is added to the already obtained offset in the step, and in the step, it is determined whether or not the length obtained by adding the length d to the offset exceeds the unit length t. . Then, if it is determined that it has not exceeded, the step processing is performed again.

また、上記ステップにおいて描画要素であると判別
された場合、またはステップにおいて単位長さtを越
えていると判別された場合には、ステップにおいて、
最終的に抽出された要素を中心に配置する状態で線分の
描画を行なう。
If it is determined in the above step that the element is a drawing element, or if it is determined that the length exceeds the unit length t in the step,
A line segment is drawn with the finally extracted elements arranged at the center.

具体的には、例えば、第2図(A)に示すように2つ
の描画要素および2つの非描画要素からなるライン・テ
スクチャ・パターン(t=28、t1=16、t2=t3=t=
4)に基づいて同図(B)に示す始端(Ps)と終端(P
e)との間に線分(線分長さがl=24)を描画する場合
には、先ず、長さがt1の描画要素を中心に配置した状態
で対称にライン・テスクチャ・パターンを配置した場合
の余り長さ(同図(C)参照)がステップの処理
を行なうことにより得られる。したがって、予め分って
いるライン・テスクチャ・パターンに基づいて端部に描
画要素が位置するか否かを簡単に判別できる。そして、
端部に非描画要素が位置すると判別された場合には、長
さがt1の描画要素に代えて長さがt3の描画要素を選択
し、この場合における長さdがt1/2+t2+t3/2の演算を
行なうことにより得られ、この長さd=14をオフセット
に加算した値が単位長さtを越えるか否かを簡単に判別
できる。また、一般的に、端部に非描画要素が位置する
場合におけるオフセットは17〜20または25〜28になって
いるのであるから、長さdをオフセットに加算すれば単
位長さtを越えることになり、中心に配置する描画要素
を代えるだけで端部に描画要素が位置する状態で一点鎖
線を描画できる(同図(D)または(E)参照)。
Specifically, for example, as shown in FIG. 2A, a line texture pattern (t = 28, t1 = 16, t2 = t3 = t =
Based on 4), the start (Ps) and end (Ps) shown in FIG.
When a line segment (line segment length is l = 24) is drawn between (e) and (e), first, a line texture pattern is symmetrically arranged with the drawing element of length t1 being centered. The remaining length (see FIG. 3C) in the case of performing the above is obtained by performing the processing of the steps. Therefore, it is possible to easily determine whether or not the drawing element is located at the end based on the line texture pattern that is known in advance. And
If it is determined that a non-drawing element is located at the end, a drawing element with a length of t3 is selected instead of a drawing element with a length of t1, and the length d in this case is t1 / 2 + t2 + t3 / 2. It can be easily determined whether or not the value obtained by adding the length d = 14 to the offset exceeds the unit length t. In general, when a non-drawing element is located at an end, the offset is 17 to 20 or 25 to 28. Therefore, if the length d is added to the offset, the offset exceeds the unit length t. The dash-dot line can be drawn in a state where the drawing element is located at the end simply by changing the drawing element arranged at the center (see FIG. 3D or FIG. 3E).

第3図(A)(B)は破線の場合の描画例を示してお
り、第4図(A)(B)は点線の場合の描画例を示して
おり、これらの場合には描画要素を中心に配置するか非
描画要素を中心に配置するかを選択するだけで端部に描
画要素が位置する状態の線分描画を達成できる。
FIGS. 3 (A) and 3 (B) show drawing examples in the case of broken lines, and FIGS. 4 (A) and (B) show drawing examples in the case of dotted lines. By simply selecting whether to arrange at the center or non-drawing element at the center, it is possible to achieve line segment drawing in which the drawing element is located at the end.

また、この実施例に基づいて二点鎖線の描画を高品質
に達成できることを確認し、さらに、ライン・テスクチ
ャ・パターンの要素が複数個であり、奇数番目が描画要
素であるとともに、偶数番目が非描画要素であり、しか
も描画要素が非描画要素よりも長く、第1番目の要素が
十分に長い場合にも高品質の線分描画が達成できること
を確認した。
Further, it was confirmed that high-quality drawing of the two-dot chain line can be achieved based on this embodiment.Furthermore, the line texture pattern has a plurality of elements, and odd-numbered elements are drawing elements, and even-numbered elements are It has been confirmed that high-quality line drawing can be achieved even when the drawing element is a non-drawing element, the drawing element is longer than the non-drawing element, and the first element is sufficiently long.

<実施例2> 第5図はこの発明の線分描画方法の他の実施例を示す
フローチャートであり、第1図のフローチャートと異な
る点は、ステップの処理を省略し、ステップに
おいて他の描画要素を抽出した後、再びステップの処
理を行なわせるようにした点のみである。
<Embodiment 2> FIG. 5 is a flowchart showing another embodiment of the line segment drawing method according to the present invention. The difference from the flowchart of FIG. Is extracted, and the process of the step is performed again.

したがって、この実施例の場合には、ステップから
ステップまでの一連の処理を反復することになるが、
端部が描画要素に該当するか否かを確実に判別できるの
であるから、線分描画品質を高めることができる。
Therefore, in the case of this embodiment, a series of processes from step to step is repeated,
Since it is possible to reliably determine whether or not the end portion corresponds to a drawing element, it is possible to improve line segment drawing quality.

<実施例3> 第6図はこの発明の線分描画装置の一実施例を示すブ
ロック図であり、描画すべき線分の長さlを算出して保
持する描画線分長さ保持部(1)と、点線、破線、鎖線
のライン・テスクチャ・パターンが格納されているテス
クチャ・メモリ(2)と、指定されたライン・テスクチ
ャ・パターンをテスクチャ・メモリ(2)から読み出し
て保持する読み出し保持部(3)と、読み出されたライ
ン・テスクチャ・パターンの単位長さtおよび各要素の
長さを保持する長さ保持部(4)と、始端、終端の中心
に配置すべき要素を抽出する要素抽出部(5)と、長さ
l、単位長さtおよび抽出された要素の長さに基づいて
オフセットを算出するオフセット算出部(6)と、算出
されたオフセットおよび各要素の長さに基づいて線分の
端部が描画要素になるか否かを判別する判別部(7)
と、端部が非描画要素になることを示す判別結果に基づ
いて他の要素を抽出させるべく要素抽出部(5)を動作
させる制御部(8)と、端部が描画要素になることを示
す判別結果に基づいて、要素抽出部(5)により抽出さ
れた要素が始端、終端の中心に位置する状態で線分の描
画を行なう線分描画部(9)とを有している。
<Embodiment 3> Fig. 6 is a block diagram showing an embodiment of a line segment drawing apparatus according to the present invention. The drawing line segment length holding unit (A) calculates and holds the length l of a line segment to be drawn. 1), a texture memory (2) storing a line texture pattern of a dotted line, a dashed line, and a chain line, and a read and hold for reading and holding a specified line texture pattern from the texture memory (2). A unit (3), a length holding unit (4) for holding the unit length t of the read line texture pattern and the length of each element, and extracting an element to be arranged at the center of the start end and the end An element extracting unit (5), an offset calculating unit (6) for calculating an offset based on the length l, the unit length t, and the length of the extracted element, and a calculated offset and a length of each element. The end of the line segment based on A determination unit (7) for determining whether or not to be a drawing element
And a control unit (8) for operating an element extraction unit (5) to extract another element based on the determination result indicating that the end is a non-drawing element, and that the end is a drawing element. A line segment drawing unit (9) for drawing a line segment in a state where the element extracted by the element extracting unit (5) is located at the center of the start end and the end based on the determination result shown.

尚、上記オフセット算出部(6)は上記フローチャー
トに示すオフセット算出動作と同様の動作を行なうもの
である。
The offset calculating section (6) performs the same operation as the offset calculating operation shown in the flowchart.

上記の構成の線分描画装置の動作は次のとおりであ
る。
The operation of the line segment drawing apparatus having the above configuration is as follows.

線分を描画すべき始端および終端が設定されるととも
に、描画すべきライン・テスクチャ・パターンが設定さ
れれば、円弧、直線等の指定に基づいて長さlが簡単に
算出され、描画線分長さ保持部(1)に保持される。ま
た、指定されたライン・テスクチャ・パターンをテスク
チャ・メモリ(2)から読み出して読み出し保持部
(3)に保持するとともに、読み出されたライン・テス
クチャ・パターンの単位長さtおよび各要素の長さを長
さ保持部(4)に保持する。
If the start and end of the line segment to be drawn are set and the line texture pattern to be drawn is set, the length l is easily calculated based on the designation of the arc, straight line, etc. It is held by the length holding section (1). Further, the designated line texture pattern is read from the texture memory (2) and held in the read holding unit (3), and the unit length t of the read line texture pattern and the length of each element are read. The length is held in the length holding section (4).

次いで、要素抽出部(5)により、例えば1番長い要
素を中心に配置すべき要素として抽出し、オフセット算
出部(6)において上記フローチャートのステップ
と同様の処理を行なうことによりオフセットを得る。
そして、得られたオフセットに基づいて判別部(7)に
おいて線分の端部が描画要素であるか否かを判別し、端
部が描画要素である場合には、抽出された要素が中心に
なるように線分描画部(9)により線分の描画を行な
う。逆に、端部が非描画要素である場合には、制御部
(8)により要素抽出部(5)を再び動作させることに
より他の要素を抽出し、抽出された要素に基づいてオフ
セット算出部(6)および判別部(7)を再び動作させ
る。
Next, the element extraction unit (5) extracts, for example, the longest element as an element to be arranged at the center, and obtains an offset by performing the same processing as the steps in the flowchart in the offset calculation unit (6).
Then, based on the obtained offset, the determination section (7) determines whether or not the end of the line segment is a drawing element. If the end is a drawing element, the extracted element is placed at the center. A line segment is drawn by the line segment drawing unit (9) so as to be as follows. Conversely, if the end is a non-drawing element, the control unit (8) operates the element extraction unit (5) again to extract another element, and based on the extracted element, an offset calculation unit. (6) and the determination unit (7) are operated again.

したがって、端部を描画要素にした状態で線分を描画
することができ、1本の線分であれば正確な長さで可視
的に描画され(第7図(A)参照)、連続する線分であ
れば線分間の結合部の表示を自然な状態にすることがで
き(第7図(B)参照)、さらに、短形の枠であれば、
角部を描画要素で描画できるとともに、向い合う線分の
描画要素同士、非描画要素同士が向い合う状態になり
(第7図(C)参照)、線分描画品質を著しく高めるこ
とができる。
Therefore, a line segment can be drawn with the end portion as a drawing element, and a single line segment is visually drawn with an accurate length (see FIG. 7 (A)) and is continuous. If it is a line segment, it is possible to make the display of the connection portion between the line segments natural (see FIG. 7 (B)).
The corners can be drawn with the drawing elements, and the drawing elements facing each other and the non-drawing elements face each other (see FIG. 7C), so that the quality of drawing the line segments can be remarkably improved.

<発明の効果> 以上のように第1の発明は、破線、鎖線の如何に拘ら
ず線分の終端部が可視的に表示されるので、1本の線分
であれば正確な長さで可視的に描画することができ、連
続する線分であれば線分間の結合部の表示を自然な状態
にすることができ、しかも短形の枠のように線分が向い
合う状態において線分の対応する要素同士を向い合わせ
て一層線分表示品質を高めることができるという特有の
効果を奏する。
<Effect of the Invention> As described above, in the first invention, the end of a line segment is visually displayed regardless of whether it is a broken line or a chain line. It can be drawn visually, and if it is a continuous line segment, the display of the connected portion of the line segment can be made natural, and the line segment can be drawn in a state where the line segments face each other like a rectangular frame This has a unique effect that the line display quality can be further improved by facing the corresponding elements.

第2の発明は、ライン・テスクチャ・パターンが鎖線
である場合に、線分の中心を描画要素にできるととも
に、端部もも描画要素にできるという特有の効果を奏す
る。
The second invention has a specific effect that, when the line texture pattern is a chain line, the center of the line segment can be a drawing element, and the end can also be a drawing element.

第3の発明は、ライン・テスクチャ・パターンが点
線、破線である場合に、線分の中心を描画要素に設定で
きる可能性を高めることができるという特有の効果を奏
する。
The third invention has a unique effect that when the line texture pattern is a dotted line or a broken line, the possibility that the center of the line segment can be set as a drawing element can be increased.

第4の発明は、破線、鎖線の如何に拘らず線分の終端
部が可視的に表示されるので、1本の線分であれば正確
な長さで可視的に描画することができ、連続する線分で
あれば線分間の結合部の表示を自然な状態にすることが
でき、しかも短形の枠のように線分が向い合う状態にお
いて線分の対応する要素同士を向い合わせて一層線分表
示品質を高めることができるという特有の効果を奏す
る。
In the fourth invention, the end of the line segment is visually displayed irrespective of whether it is a dashed line or a chain line, so that a single line segment can be visually drawn with an accurate length, If it is a continuous line segment, the display of the connected portion of the line segment can be made natural, and in a state where the line segment faces like a rectangular frame, the corresponding elements of the line segment face each other This has a specific effect that the line segment display quality can be further improved.

第5の発明は、ライン・テスクチャ・パターンが鎖線
である場合に、線分の中心を描画要素にできるととも
に、端部をも描画要素にできるという特有の効果を奏す
る。
The fifth aspect of the invention has a specific effect that when the line texture pattern is a chain line, the center of the line segment can be a drawing element, and the end can be a drawing element.

第6の発明は、ライン・テスクチャ・パターンが点
線、破線であれ場合に、線分の中心を描画要素に設定で
きる可能性を高めることができるという特有の効果を奏
する。
The sixth aspect of the invention has a unique effect that the possibility that the center of a line segment can be set as a drawing element can be increased when the line texture pattern is a dotted line or a broken line.

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

第1図はこの発明の線分描画方法の一実施例を示すフロ
ーチャート、 第2図は一点鎖線のライン・テスクチャ・パターンに基
づく線分描画動作を説明する概略図、 第3図は破線のライン・テスクチャ・パターンに基づく
描画例を示す概略図、 第4図は点線のライン・テスクチャ・パターンに基づく
描画例を示す概略図、 第5図はこの発明の線分描画方法の他の実施例を示すフ
ローチャート、 第6図はこの発明の線分描画装置の一実施例を示すブロ
ック図、 第7図は線分描画例を示す概略図、 第8図は線分描画装置の従来例を示すブロック図、 第9図は線分描画例を示す概略図。 (1)……描画線分長さ保持部、(5)……要素抽出
部、 (6)……オフセット算出部、(7)……判別部、 (8)……制御部、(9)……線分描画部、 (Ps)……始端、(Pe)……終端
FIG. 1 is a flowchart showing an embodiment of a line segment drawing method according to the present invention, FIG. 2 is a schematic diagram for explaining a line segment drawing operation based on a dashed line line texture pattern, and FIG. Schematic diagram showing a drawing example based on a texture pattern, FIG. 4 is a schematic diagram showing a drawing example based on a dotted line texture pattern, and FIG. 5 shows another embodiment of a line segment drawing method of the present invention. FIG. 6 is a block diagram showing an embodiment of the line drawing apparatus of the present invention, FIG. 7 is a schematic diagram showing an example of drawing a line, and FIG. 8 is a block showing a conventional example of the line drawing apparatus. FIG. 9 is a schematic diagram showing a line segment drawing example. (1)… drawn line segment length holding unit, (5)… element extraction unit, (6)… offset calculation unit, (7)… discrimination unit, (8)… control unit, (9) …… Line segment drawing part, (Ps) …… Start point, (Pe) …… End point

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】予め定められたライン・テスクチャ・パタ
ーンに基づいて始端(Ps)から終端(Pe)まで線分を描
画する方法であって、ライン・テスクチャ・パターンの
任意の要素を始端(Ps)、終端(Pe)の中心に配置して
ライン・テスクチャ・パターンを順次配置した状態にお
けるオフセットを得、オフセットがライン・テスクチャ
・パターンの描画要素に該当することを条件としてその
ままライン・テスクチャ・パターンを描画し、オフセッ
トがライン・テスクチャ・パターンの非描画要素に該当
することを条件としてライン・テスクチャ・パターンの
他の要素を選択し、再びオフセットを得るとともに、オ
フセットが何れの要素に該当するかを判別することを特
徴とする線分描画方法。
1. A method for drawing a line segment from a start point (Ps) to an end point (Pe) based on a predetermined line texture pattern, wherein an arbitrary element of the line texture pattern is drawn at the start point (Ps). ), An offset in a state where the line texture patterns are sequentially arranged by being arranged at the center of the end (Pe), and the line texture pattern is directly provided on condition that the offset corresponds to a drawing element of the line texture pattern. Is drawn, and another element of the line texture pattern is selected on condition that the offset corresponds to a non-drawing element of the line texture pattern, an offset is obtained again, and to which element the offset corresponds A line segment drawing method characterized by determining
【請求項2】ライン・テスクチャ・パターンが鎖線のラ
イン・テスクチャ・パターンであるとともに、ライン・
テスクチャ・パターンの描画要素を始端、終端の中心に
配置する上記特許請求の範囲第1項記載の線分描画方
法。
2. The method according to claim 1, wherein the line texture pattern is a chain line pattern.
2. The line segment drawing method according to claim 1, wherein the drawing elements of the texture pattern are arranged at the centers of the start and end.
【請求項3】ライン・テスクチャ・パターンが点線また
は破線のライン・テスクチャ・パターンであるととも
に、最初にライン・テスクチャ・パターンの描画要素を
始端、終端の中心に配置する上記特許請求の範囲第1項
記載の線分描画方法。
3. The line texture pattern according to claim 1, wherein the line texture pattern is a dotted or dashed line texture pattern, and the drawing element of the line texture pattern is first arranged at the center of the start and end. Line drawing method described in section.
【請求項4】予め定められたライン・テスクチャ・パタ
ーンに基づいて始端(Ps)から終端(Pe)まで線分を描
画する装置であって、始端(Ps)、終端(Pe)との距離
を算出する距離算出手段(1)と、ライン・テスクチャ
・パターンの任意の要素を抽出する要素抽出手段(5)
と、抽出した要素を始端(Ps)、終端(Pe)の中心に配
置してライン・テスクチャ・パターンを対称に配置した
場合に得られるオフセットを得るオフセット算出手段
(6)と、得られたオフセットがライン・テスクチャ・
パターンの描画要素に該当するか否かを判別するオフセ
ット判別手段(7)と、オフセットが描画要素に該当す
ることを示す判別結果に基づいて、抽出された要素を中
心に配置した状態で線分を描画する線分描画手段(9)
と、オフセットが非描画要素に該当することを示す判別
結果に基づいて、他の要素を選択させるべく要素抽出手
段(5)を制御する制御手段(8)とを含むことを特徴
とする線分描画装置。
4. An apparatus for drawing a line segment from a start end (Ps) to an end (Pe) based on a predetermined line texture pattern, wherein a distance between the start end (Ps) and the end (Pe) is determined. Distance calculating means (1) for calculating, and element extracting means (5) for extracting an arbitrary element of the line texture pattern
Offset calculating means (6) for obtaining an offset obtained when the extracted elements are arranged at the center of the start end (Ps) and the end (Pe) and the line texture pattern is arranged symmetrically, and the obtained offset Is line texture
Offset determining means (7) for determining whether or not the pattern corresponds to a drawing element, and a line segment in a state where the extracted element is arranged at the center based on a determination result indicating that the offset corresponds to the drawing element. Segment drawing means (9) for drawing.
And a control means (8) for controlling an element extracting means (5) to select another element based on a determination result indicating that the offset corresponds to a non-drawing element. Drawing device.
【請求項5】ライン・テスクチャ・パターンが鎖線のラ
イン・テスクチャ・パターンであり、要素抽出手段
(5)が、ライン・テスクチャ・パターンの描画要素の
みを始端(Ps)、終端(Pe)の中心に配置する要素とし
て抽出するものである上記特許請求の範囲第4項記載の
線分描画装置。
5. The line texture pattern is a dashed line texture pattern, and the element extracting means (5) determines only the drawing elements of the line texture pattern as the starting point (Ps) and the center of the ending point (Pe). 5. The line segment drawing apparatus according to claim 4, wherein the line segment drawing apparatus extracts the elements as the elements to be arranged in the line.
【請求項6】ライン・テスクチャ・パターンが点線また
は破線のライン・テスクチャ・パターンであり、要素抽
出手段(5)が、最初にライン・テスクチャ・パターン
の描画要素を始端(Ps)、終端(Pe)の中心に配置する
要素として抽出するものである上記特許請求の範囲第4
項記載の線分描画装置。
6. The line texture pattern is a dotted or dashed line texture pattern, and the element extracting means (5) first sets a drawing element of the line texture pattern to a start point (Ps) and an end point (Pe). ) Is extracted as an element to be arranged at the center of (4).
Item description device.
JP2154523A 1990-06-12 1990-06-12 Line segment drawing method and apparatus Expired - Fee Related JP2646805B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2154523A JP2646805B2 (en) 1990-06-12 1990-06-12 Line segment drawing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2154523A JP2646805B2 (en) 1990-06-12 1990-06-12 Line segment drawing method and apparatus

Publications (2)

Publication Number Publication Date
JPH0447383A JPH0447383A (en) 1992-02-17
JP2646805B2 true JP2646805B2 (en) 1997-08-27

Family

ID=15586121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2154523A Expired - Fee Related JP2646805B2 (en) 1990-06-12 1990-06-12 Line segment drawing method and apparatus

Country Status (1)

Country Link
JP (1) JP2646805B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03147080A (en) * 1989-11-01 1991-06-24 Canon Inc Graphic information processor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
「AUTO CAD応用編」オートデスク株式会社発行(1989年8月1日発行)PP.44〜54

Also Published As

Publication number Publication date
JPH0447383A (en) 1992-02-17

Similar Documents

Publication Publication Date Title
KR890004312A (en) Tape winding amount display
JP2646805B2 (en) Line segment drawing method and apparatus
US6801304B2 (en) Image forming apparatus and paper feed control method for image forming apparatus
US5287440A (en) Graphic processing method for drawing an area defined by clipping of a variable shape and apparatus for doing the same
JP3069764B2 (en) Image processing method and image processing apparatus
JP3112230B2 (en) Waveform analyzer
JPH05108917A (en) Time recorder
JP2000293676A5 (en)
JPH0413624Y2 (en)
JP2002296980A (en) Image forming device
JP2532456B2 (en) Videotex terminal device and image information reproduction method
JPS61213629A (en) Automatic scale span changeover type recorder
JP2753543B2 (en) Graphic output device
JPS58170165A (en) Mark reading system
JPH0449474A (en) Method and device for generating thick line
CN114549606A (en) Display control method and device of state indication control and electronic equipment
JPH02178765A (en) Document preparing device
JPH0634218B2 (en) Image reading and display method of information file device
JP2955878B2 (en) How to display output data by graph on recording paper
JPH04204216A (en) Meter
JPS6112598B2 (en)
JPH0829029B2 (en) Grain silo management device due to temperature difference
JPS6286392A (en) Handy image display unit
JPH06290198A (en) Slip preparation device
JPS6318770B2 (en)

Legal Events

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