JP2936546B2 - Character centering device and processing device equipped with this device - Google Patents

Character centering device and processing device equipped with this device

Info

Publication number
JP2936546B2
JP2936546B2 JP1192627A JP19262789A JP2936546B2 JP 2936546 B2 JP2936546 B2 JP 2936546B2 JP 1192627 A JP1192627 A JP 1192627A JP 19262789 A JP19262789 A JP 19262789A JP 2936546 B2 JP2936546 B2 JP 2936546B2
Authority
JP
Japan
Prior art keywords
centering
calculating
input
coordinates
center
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
JP1192627A
Other languages
Japanese (ja)
Other versions
JPH0358167A (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.)
Hitachi Ltd
Hitachi Keiyo Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Keiyo Engineering 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 Hitachi Ltd, Hitachi Keiyo Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP1192627A priority Critical patent/JP2936546B2/en
Publication of JPH0358167A publication Critical patent/JPH0358167A/en
Application granted granted Critical
Publication of JP2936546B2 publication Critical patent/JP2936546B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はワードプロセッサ等の文書処理装置に係り、
特に、表示文字列を中央に寄せるセンタリング処理に関
する。
The present invention relates to a document processing device such as a word processor.
In particular, the present invention relates to a centering process for centering a display character string.

[従来の技術] 従来のワードプロセッサや、ワープロソフトや作表,
作図ソフトで動作する電子計算機等の文書処理装置で
は、特開昭62−128356号,特開昭62−128357号,特開昭
62−61152号公報記載の様に、表示文字列等のセンタリ
ングを行う場合、画面の左端と右端の間の中心に目的の
文字列等を移動し、あるいは、特定の左右のインデント
間あるいは罫線間の中心に目的の文字列等を移動してい
る。
[Prior art] Conventional word processors, word processing software, tables,
Document processing apparatuses such as a computer operated with drawing software are disclosed in JP-A-62-128356, JP-A-62-128357 and JP-A-62-128357.
As described in Japanese Patent Application Laid-Open No. 62-61152, when performing centering of a display character string or the like, move the target character string or the like to the center between the left end and the right end of the screen, or specify a specific space between left and right indents or between ruled lines. Is moved to the center of the target character string.

[発明が解決しようとする課題] 従来のセンタリング処理は、センタリング対象の文字
列を、画面の左右端間,左右のインデント間,左右の罫
線間にセンタリングするだけである。つまり、行(横)
方向のセンタリングしか考慮していなかった。また、画
面端,インデント,罫線等の特定の記号間でしかセンタ
リング処理ができなかった。更に、例えば上下の罫線間
に挾まれた空間つまり横方向に罫線の無い開空間内の文
字例を開空間内でセンタリングしたい場合、センタリン
グ対象文字列の左右に罫線等が無いため、センタリング
すると、画面の左右端の中央にセンタリングされてしま
い、上下の罫線とずれた位置に文字列が来てしまうとい
う問題がある。
[Problems to be Solved by the Invention] The conventional centering processing merely centers a character string to be centered between left and right edges of the screen, between left and right indents, and between left and right ruled lines. In other words, row (horizontal)
Only directional centering was considered. Also, centering processing can be performed only between specific symbols such as screen edges, indents, and ruled lines. Further, for example, when it is desired to center a character example in a space sandwiched between upper and lower ruled lines, that is, an open space having no ruled lines in the horizontal direction, in the open space, there is no ruled line on the left and right of the character string to be centered. There is a problem that the character string is centered at the center of the left and right ends of the screen, and comes to a position shifted from the upper and lower ruled lines.

文字だけを単に入力するだけの従来の文書処理装置で
は、横方向のセンタリング処理機能さえあれば、十分で
あったが、近年の様に、作表機能や作図機能までが文書
処理機能の中に組み込まれ、単に文書を作成するだけで
なく、作成した文書等のレイアウトまでも考慮して文書
等を作成するには、横方向のみのセンタリングだけでは
使い勝手が悪く、ユーザの要望に十分に対応することが
できなくなってきている。
In a conventional document processing device that only inputs characters, a centering processing function in the horizontal direction was sufficient.However, recently, tabulation and drawing functions were included in the document processing functions. Incorporating, not only creating a document, but also creating a document etc. in consideration of the layout of the created document etc., centering only in the horizontal direction is inconvenient, and sufficiently responds to the needs of the user. I can no longer do it.

本発明の目的は、任意図形内の任意の方向にセンタリ
ングすることを可能にする文字中央寄せ装置ならびにこ
の装置を備える文書処理装置を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a character centering device that enables centering in an arbitrary direction in an arbitrary graphic, and a document processing device including the device.

[課題を解決するための手段] 上記目的を達成するために本発明は、表示装置に表示
されているセンタリング対象を任意の方向に任意の図形
でセンタリングする処理装置において、センタリング指
示入力手段と、前記センタリング対象を指定する手段
と、前記センタリング対象をセンタリングする方向を指
定する第一の仮想線を入力する手段と、前記入力された
第一の仮想線と前記任意の図形の二つの交点の座標を算
出し、前記二つの交点間の中点座標を算出する演算手段
と、前記センタリング対象を前記中間座標を中心とする
位置にセンタリングして前記表示位置に表示する表示手
段とを備えることを第1の特徴とする。
Means for Solving the Problems In order to achieve the above object, the present invention provides a processing apparatus for centering a centering target displayed on a display device in an arbitrary direction in an arbitrary figure, comprising: Means for specifying the centering target, means for inputting a first virtual line specifying a direction in which the centering target is centered, and coordinates of two intersections of the input first virtual line and the arbitrary figure Calculating means for calculating a middle point coordinate between the two intersections, and a display means for centering the centering target at a position centered on the intermediate coordinates and displaying the centered object at the display position. This is the feature of 1.

更に本発明は、前記特徴の処理装置において、前記任
意の図形が開図形である場合、前記開図形の開部分の端
部を第二の仮想線で結ぶ手段をさらに備え、前記演算手
段は前記第二の仮想線と前記第一の仮想線の二つの交点
の座標を算出することを第2の特徴とする。
Further, the present invention, in the processing device having the above feature, further comprising: means for connecting an end of an open portion of the open graphic with a second virtual line when the arbitrary graphic is an open graphic; A second feature is that the coordinates of two intersections between a second virtual line and the first virtual line are calculated.

また本発明は、処理装置において、センタリング入力
指示手段と、表示された開空間図形あるいは閉空間図形
の対向する2本の曲線から両曲線の中心曲線或いは中心
近似曲線を求める中心線算出手段と、センタリング対象
を前記センタリング入力指示手段の入力指示により前記
中心線算出手段が求めた線に沿って表示させるセンタリ
ング手段とを備えることを第3の特徴とする。
The present invention also provides, in a processing device, a centering input instructing means, and a center line calculating means for obtaining a center curve or a center approximate curve of both curves from two opposite curves of a displayed open space graphic or closed space graphic, A third feature is that there is provided a centering means for displaying a centering target along the line obtained by the center line calculating means in response to an input instruction of the centering input instructing means.

更に本発明は、文字中央寄せ装置において、センタリ
ング指示入力手段と、表示されている任意の閉空間図形
の任意の縦方向あるいは斜め方向の仮想線と前記閉空間
図形との両交点を算出し、該両交点間の中点座標を算出
する中点算出手段と、対象文字列の長さを算出する文字
列長算出手段と、求めた文字列長の中心を前記中点算出
手段が求めた中心座標位置に前記センタリング指示入力
手段から入力指示により移動して表示するセンタリング
手段とを備えることを第4の特徴とする。
Further, the present invention, in the character centering device, a centering instruction input means, and calculates both intersections of any vertical or oblique virtual line of any displayed closed space graphic and the closed space graphic, A midpoint calculating means for calculating a midpoint coordinate between the two intersections, a character string length calculating means for calculating a length of the target character string, and a center of the determined character string length determined by the center calculated by the midpoint calculating means. A fourth feature is that there is provided a centering means for moving and displaying the coordinate position by the input instruction from the centering instruction input means.

[作用] 本発明によれば、任意の図形(インデントや罫線で作
図した図形に限らない任意の記号,文字等で作成した図
形)の任意の方向にセンタリングができ、また開空間に
対するセンタリングもでき、更に、一列に並んだ文字列
をそのままセンタリングすると図形外にはみ出してしま
う曲線で囲まれた図形中でセンタリングする場合、その
曲線に合わせて文字列も曲線に沿わせてセンタリングさ
せてることができ、文書処理装置の使い勝手が良くし処
理機能の向上を図ることが可能になる。
[Operation] According to the present invention, centering can be performed in an arbitrary direction of an arbitrary figure (an arbitrary sign, a figure created with characters, etc., not limited to a figure drawn with indents or ruled lines), and centering with respect to an open space is also possible. In addition, if a character string arranged in a line is centered as it is, it will protrude outside the figure. When centering in a figure surrounded by a curve, the character string can be centered along the curve according to the curve. In addition, the usability of the document processing apparatus is improved, and the processing function can be improved.

[実施例] 以下、本発明の好適な実施例を図面を参照して説明す
る。
EXAMPLES Hereinafter, preferred examples of the present invention will be described with reference to the drawings.

第1図は、本発明の一実施例に係る文書処理装置のブ
ロック構成図である。この文書処理装置は、入力装置で
あるキーボード1と、外部記憶装置2と、演算制御部3
と、表示装置であるCRT10で構成されている。演算制御
部3は、入力テキスト長算出部4と、端点座標算出部5
と、テキスト表示領域算出部6と、端点間中点座標算出
部7と、入力テキスト中央文字検索部8と、CRT10を制
御する表示制御部9とを備えている。
FIG. 1 is a block diagram of a document processing apparatus according to an embodiment of the present invention. The document processing device includes a keyboard 1 as an input device, an external storage device 2, an arithmetic control unit 3,
And a CRT 10 as a display device. The arithmetic control unit 3 includes an input text length calculation unit 4 and an end point coordinate calculation unit 5
A text display area calculation unit 6, a middle point coordinate calculation unit between end points, an input text central character search unit 8, and a display control unit 9 for controlling the CRT 10.

第2図は、第1図に示す文書処理装置で行う横方向の
センタリング処理手順を示すフローチャートである。第
1図に示すキーボード1の図示しない所定のセンタリン
グ指示キーを押下すると、先ず、センタリング対象のテ
キスト(文字列)長を算出部3が算出する(ステップ2
1)。次のステップ22では、センタリングを行う文字列
表示可能領域の座標を算出し、閉空間図形の当該センタ
リング対象行の両端点の座標を算出する。該当する端点
の座標(m,n)は、その行における点灯している画素
(画面が反転表示されているときは消灯している画素)
の座標のうち閉空間図形に連続する画素を検索して算出
する。ここで、座標(m,n)とは、ドット(画素)で表
現されるCRT10表示画面のドットの行と列の位置つまり
m行n列目の位置とする。従って、m,nとも正整数であ
る。
FIG. 2 is a flowchart showing a horizontal centering processing procedure performed by the document processing apparatus shown in FIG. When a predetermined centering instruction key (not shown) of the keyboard 1 shown in FIG. 1 is pressed, first, the calculation unit 3 calculates the length of the text (character string) to be centered (step 2).
1). In the next step 22, the coordinates of the character string displayable area to be centered are calculated, and the coordinates of both end points of the centering target line of the closed space graphic are calculated. The coordinates (m, n) of the corresponding end point are the lit pixels in the row (pixels that are turned off when the screen is highlighted)
Of the coordinates of the closed space figure are searched for and calculated. Here, the coordinates (m, n) are the positions of rows and columns of dots on the CRT 10 display screen expressed by dots (pixels), that is, the positions of the m-th row and the n-th column. Therefore, both m and n are positive integers.

次のステップ23では、ステップ22で求めた端点の座標
間の幅(領域長)がどのくらいあるかを算出する。そし
て、ステップ24では、ステップ22で求めた両端点の座標
の中間点の座標を算出する。次に、ステップ21でテキス
ト長を求めた文字列の中央の文字を検索し、該中央文字
をステップ24で求めた中間点の座標位置にする様に文字
列表示位置を決定し(ステップ25)、次のステップ26で
その位置にセンタリング対象文字列を移動させて表示す
る。
In the next step 23, the width (region length) between the coordinates of the end points obtained in step 22 is calculated. Then, in step 24, the coordinates of the intermediate point between the coordinates of the end points obtained in step 22 are calculated. Next, the character at the center of the character string whose text length is determined in step 21 is searched, and the character string display position is determined so that the central character is set to the coordinate position of the intermediate point determined in step 24 (step 25). In the next step 26, the centering target character string is moved to that position and displayed.

以上が、横方向のセンタリング処理手順であるが、こ
のセンタリング処理による処理概要を第3図で具体的に
説明する。
The horizontal centering processing procedure has been described above. The outline of the centering processing will be specifically described with reference to FIG.

第3図に示す閉空間図形は、例えば、図示しないマウ
スを使用してCRT10の画面に描き、「入力テキスト」な
る文字列は、「入」の位置にキーボード入力のカーソル
を持ってきて該キーボード1から入力するか、あるいは
記憶装置2から読み出して表示する。今の場合は、「入
力テキスト」なる文字列をその行(m行とする。)にお
いて閉空間図形内でセンタリングするのであるから、当
該文字列行の両端点は点A,点Bとなる。
The closed space figure shown in FIG. 3 is drawn on the screen of the CRT 10 using, for example, a mouse (not shown), and the character string “input text” is brought to the “input” position by bringing the cursor for keyboard input to the keyboard. 1 or read from the storage device 2 and displayed. In this case, since the character string “input text” is centered in the closed space figure in that line (m line), both end points of the character string line are points A and B.

第2図のステップ21で算出した文字列長は今の場合は
Lとする。文字列長は、例えば全角文字1文字を“2"、
半角文字1文字を“1"として数えるものとする。
The character string length calculated in step 21 of FIG. 2 is L in this case. The character string length is, for example, one full-width character is "2",
One half-width character is counted as "1".

次に、左端A,右端のBの座標を算出する(ステップ2
2)。求めた左端Aの座標を(m,n1)、右端Bの座標を
(m,n2)とする。また、右端Aと左端Bの間に表示する
ことが可能な文字列の長さ(領域長)を算出する(ステ
ップ23)。今の場合、端点A,B間の領域長はn2−n1−1
となる。ここで、センタリング対象テキスト長が端点A,
B間の領域長を超えるとき、つまり、L>n2−n1−1の
とき、センタリングを行うとテキストが閉空間図形から
はみ出すので、この文字列のセンタリングを行なうか否
かは別の指示入力を待つことになる。あるいは、はみで
る場合には、センタリング処理を自動的にキャンセルす
る。次に、端点A,B間の中点Mの座標を算出する(ステ
ップ24)。これによって端点間中点座標 (m,〔(n1+n2)/2〕) を得る(ここで、カギかっこによる表示〔x〕は、xを
越えない最大の整数を表すものとする。)。
Next, the coordinates of the left end A and the right end B are calculated (step 2).
2). The coordinates of the obtained left end A are (m, n 1 ), and the coordinates of the right end B are (m, n 2 ). In addition, the length (area length) of a character string that can be displayed between the right end A and the left end B is calculated (step 23). In this case, the area length between the end points A and B is n 2 −n 1 −1
Becomes Here, the length of the text to be centered is the end point A,
When the area length exceeds B, that is, when L> n 2 −n 1 −1, if the centering is performed, the text protrudes from the closed space figure. Therefore, it is another instruction whether or not to center the character string. You have to wait for input. Alternatively, in the case where it runs off, the centering process is automatically canceled. Next, the coordinates of the midpoint M between the end points A and B are calculated (step 24). Thereby, the coordinates of the midpoint between the end points (m, [(n 1 + n 2 ) / 2]) are obtained. (Here, the notation [x] by brackets represents the largest integer not exceeding x.) .

入力されたテキストの中央の文字は、文字列の先頭か
ら何文字目かを〔(L+1〕/2〕によって算出し検索す
る。「入力テキスト」の例では「キ」が検索される。こ
の中央の文字が、端点A,B間の中点(m,〔(n1+n2)/
2〕)に位置するように該テキストの表示を開始する先
頭座標を算出する(ステップ25)。ここで、先頭座標
は、 (m,〔(n1+n2)/2〕)+〔(L−1)/2〕 によって得られる。次に、入力されたテキストを、座標 (m,〔(n1+n2)/2〕)−〔(L−1)/2〕 の位置から表示する(ステップ26)。
The character at the center of the input text is calculated by [(L + 1] / 2] to find the number of the character from the beginning of the character string, and in the example of “input text”, “g” is searched. character, the end points a, the midpoint between B (m, [(n 1 + n 2) /
2)), the starting coordinates at which the display of the text is started are calculated (step 25). Here, the head coordinates, (m, [(n 1 + n 2) / 2 ]) is obtained by + [(L-1) / 2]. Next, the input text, coordinates (m, [(n 1 + n 2) / 2 ]) - to display from the position of [(L-1) / 2] (step 26).

上記の実施例によると、次のように文字中央寄せ表示
を行うことになる。半角文字列「CLOUD」を座標(7,5)
を先頭位置として入力したとする。この「CLOUD」のセ
ンタリング処理を、具体的座標値と用いて、第4図によ
り説明する。
According to the above embodiment, the character centering display is performed as follows. One-byte character string "CLOUD" coordinates (7,5)
Is entered as the start position. The centering process of “CLOUD” will be described with reference to FIG. 4 using specific coordinate values.

半角文字5文字が入力された場合、入力テキスト長は
5×1=5である。文字を囲んでいる閉空間図形の第7
行での左端Aの座標は(7,4),右端Bの座標は(7,1
6)である。端点A,B間の領域長を算出すると、16−4−
1=11である。また、端点A,B間の中点座標は、 (7,〔(16+4〕/2〕)=(7,10) と算出できる。文字列の中央の文字は、先頭から数えて
〔(5+1)/2〕=3番目の「O」であるから、この
「O」を端点A,B間の中点座標(7,10)に位置させるた
めには、文字列を (7,〔(16+4)/2〕−〔(5−1)/2〕)=(7,8) から表示すればよいことが判明する。従って、「CLOU
D」は座標(7,8)から表示する。
When five half-width characters are input, the input text length is 5 × 1 = 5. The seventh of the closed space figure surrounding the character
In the row, the coordinates of the left end A are (7,4), and the coordinates of the right end B are (7,1).
6). When the area length between the end points A and B is calculated, 16-4-
1 = 11. Also, the coordinates of the midpoint between the end points A and B can be calculated as (7, [(16 + 4] / 2)) = (7, 10) The central character of the character string is counted from the beginning and [(5 + 1) / 2] = third “O”, so to place this “O” at the midpoint coordinates (7,10) between end points A and B, the character string must be expressed as (7, [(16 + 4) / 2]-[(5-1) / 2]) = (7,8).
"D" is displayed from the coordinates (7,8).

この様にして、入力テキスト長、入力テキストの中央
の文字の座標、端点とその中点の座標、端点間の領域長
を算出することにより、容易に任意図形内でテキスト文
字例の中央寄せができる。
In this way, by calculating the input text length, the coordinates of the character at the center of the input text, the coordinates of the end point and its midpoint, and the length of the area between the end points, the center of the text character example can be easily centered in an arbitrary figure. it can.

次に、任意図形中での列(縦)方向のセンタリングに
ついて説明する。第5図は、縦方向の文字中央寄せ処理
手順を示すフローチャートである。列方向の文字中央寄
せ表示処理での制御部3での動作は、センタリング対象
テキストのテキスト長を算出するテキスト長算出ステッ
プ51と、文字列の表示されている列方向の閉空間図形に
おける上端Aと下端Bの端点座標を算出する端点座標算
出ステップ52と、端点A,B間の中点座標を算出する端点
間中点座標算出ステップ53、テキストをセンタリング表
示する行を決定するテキスト表示行決定ステップ54と、
入力テキストを画面に表示する画面表示ステップ55とか
ら構成されている。尚、この列方向センタリング処理に
おいては、文字列が複数ありそのうちのどれかを選んで
センタリングする場合、センタリング対象文字例を範囲
指定することになる。
Next, centering in the column (vertical) direction in an arbitrary figure will be described. FIG. 5 is a flowchart showing a vertical character center alignment processing procedure. The operation of the control unit 3 in the character centering display processing in the column direction includes a text length calculation step 51 for calculating the text length of the text to be centered, and the upper end A of the closed space graphic in the column direction in which the character string is displayed. And end point coordinate calculation step 52 for calculating end point coordinates of the lower end B, and end point middle point coordinate calculation step 53 for calculating middle point coordinates between the end points A and B. Text display line determination for determining a line for centering and displaying text. Step 54,
And a screen display step 55 for displaying the input text on the screen. In this column direction centering process, when there are a plurality of character strings and any one of them is selected for centering, the range of the centering target character example is specified.

次に具体的な処理概要を第6図を用いて説明する。先
ずセンタリング対象テキスト(第6図の例では「入力テ
キスト」)の長さLを算出する。次に、文字列(「入力
テキスト」)の表示されている列範囲中の上端Aの座標
(m1,m2)と下端Bの座標(m2,n2)を算出する。そし
て、この端点A,B間の中点の座標 (〔(m1+m2)/2〕,〔(n1+n2)/2〕) を算出し、中点の行である〔(m1+m2)/2〕行まで入力
テキストを移動して表示する。ここで、中点の行の左端
A′と右端B′との間の文字列表示可能領域長が入力テ
キスト長Lよりも小さい場合は、センタリング対象テキ
ストが閉空間図形からはみ出るので、この文字列をセン
タリング表示するか否かはキーボード1からの別の指示
入力を待って行う。あるいは、はみでる場合には該セン
タリング処理を自動的にキャンセルする。
Next, a specific processing outline will be described with reference to FIG. First, the length L of the text to be centered (“input text” in the example of FIG. 6) is calculated. Next, the coordinates (m 1 , m 2 ) of the upper end A and the coordinates (m 2 , n 2 ) of the lower end B in the displayed column range of the character string (“input text”) are calculated. Then, the coordinates ([(m 1 + m 2 ) / 2], [(n 1 + n 2 ) / 2]) of the middle point between the end points A and B are calculated, and [(m 1 + M 2 ) / 2] Move the input text to the line and display it. Here, if the length of the character string displayable area between the left end A 'and the right end B' of the middle point line is smaller than the input text length L, the text to be centered protrudes from the closed space graphic. Is displayed after waiting for another instruction input from the keyboard 1. Alternatively, when the data is out of the center, the centering process is automatically canceled.

以上の各実施例は、行方向と列方向の文字中央寄せ表
示処理であるが、次に斜め方向についての文字中央寄せ
表示処理について、第7図および第8図を用いて説明す
る。
In each of the embodiments described above, the character centering display processing in the row direction and the column direction is performed. Next, the character centering display processing in the diagonal direction will be described with reference to FIGS. 7 and 8. FIG.

第7図は、斜め方向の文字中央寄せ表示処理手順を示
すフローチャートである。斜め方向の文字中央寄せ処理
での制御部3の動作は、センタリング対象テキストのテ
キスト長を算出する入力テキスト長算出ステップ71と、
斜め中央寄せを行うための基本直線(仮想線)を決める
ためにギボード1あるいは図示しないマウスから入力さ
れた2点を通る仮想線と閉空間図形との交点の座標を算
出する交点座標算出ステップ72と、交点間の中点座標を
算出する交点間中点座標算出ステップ73と、テキストの
表示位置を決定するテキスト表示位置決定ステップ74
と、対象テキストを画面にセンタリング表示する画面表
示ステップ75とから構成される。
FIG. 7 is a flowchart showing the display processing procedure of the character centering in the oblique direction. The operation of the control unit 3 in the character centering process in the oblique direction includes an input text length calculation step 71 for calculating the text length of the text to be centered,
Intersection coordinate calculation step 72 for calculating the coordinates of the intersection of a virtual line passing through two points input from the giboard 1 or a mouse (not shown) and a closed space figure in order to determine a basic straight line (virtual line) for obliquely centering. And an intermediate point coordinate calculation step 73 for calculating the intermediate point coordinates between the intersections, and a text display position determining step 74 for determining the display position of the text.
And a screen display step 75 for centering and displaying the target text on the screen.

この斜め方向の文字中央寄せ表示方式の概要は第8図
に示す通りである。閉空間図形G内にテキストを入力す
る。閉空間図形Gと交わる仮想線分を規定する,P,Qを入
力する。これにより線分PQと閉空間図形Gとの交点A,B
の中点Mの座標が求まり、前述した実施例と同様にこの
中点Mに文字列の中心文字がくるように対象文字列を移
動して表示することで、斜め方向のセンタリングが可能
となる。
The outline of the display method of centering the character in the oblique direction is as shown in FIG. A text is input into the closed space graphic G. P and Q for defining a virtual line segment intersecting with the closed space graphic G are input. As a result, intersections A and B between the line segment PQ and the closed space graphic G are obtained.
Is obtained, and the target character string is moved and displayed such that the center character of the character string is located at the midpoint M, as in the above-described embodiment, thereby enabling centering in an oblique direction. .

次に、具体的処理内容について説明する。まず、最初
は、入力されたテキストの長さLを算出する。次に入力
された2点P,Qを結ぶ線分と図形Gとの交点A,Bの座標を
算出する。ここで、交点Aの座標を(m1,n1),交点B
の座標を(m2,n2)とする。そして、交点A,Bの中点Mの
座標 (〔(m1+m2)/2〕,〔(n1+n2)/2〕) を算出すそして、テキストのセンタリング表示位置を決
定し、画面表示を行う。
Next, specific processing contents will be described. First, the length L of the input text is calculated. Next, the coordinates of the intersections A and B between the line segment connecting the input two points P and Q and the figure G are calculated. Here, the coordinates of the intersection A are (m 1 , n 1 ) and the intersection B
Is (m 2 , n 2 ). Then, the coordinates ([(m 1 + m 2 ) / 2], [(n 1 + n 2 ) / 2]) of the midpoint M of the intersections A and B are calculated, and the centering display position of the text is determined. Display.

この様にして、斜め方向の文字中央寄せ表示を前記各
実施例と同様に行うことができる。
In this way, the display of the center of the character in the oblique direction can be performed in the same manner as in the above-described embodiments.

以上は、完全にかこまれた図形(閉空間図形)に対し
てテキストの中央寄せ表示を行う実施例であるが、図形
の一部が開いている場合、すなわち、開空間図形に対し
て文字中央寄せを行う場合の実施例について説明する。
The above is an example in which the center of the text is displayed for a completely enclosed figure (closed space figure). However, when a part of the figure is open, that is, the character center is displayed for the open space figure. An embodiment in which the shifting is performed will be described.

第9図は、開空間図形に対して文字中央寄せを行う場
合についての説明図である。
FIG. 9 is an explanatory diagram of the case where the center of the character is performed on the open space graphic.

2点A,Bを結ぶ線分91と、2点C,Dを結ぶ線分92の内側
でのテキスト(第9図の例では「大売出し」)の中央寄
せについて示す。この場合の制御部3の動作では、第2
図で説明した対象テキスト長算出ステップ21と端点座標
算出ステップ22の間に、2つの線分の各端点A,Cと端点
B,Dを結ぶ仮想線分95,96を考えることにより閉空間図形
ABDCを仮想的に作成する仮想閉空間図形作成ステップを
加える構成とする。従って、この制御部3の動作は次の
ようになる。センタリング対象テキストのテキスト長L
を算出する。次に線分91と線分92によって構成される仮
想閉空間図形ABDCを作成する。そして、この図形ABDC内
での対象テキストのある行の端点93,94の座標を算出
し、端点93,94間の領域長を算出後、テキスト表示位置
を第2図で説明した実施例と同様に決定し、テキストの
センタリング表示を行う。
The centering of the text ("large sale" in the example of FIG. 9) inside the line segment 91 connecting the two points A and B and the line segment 92 connecting the two points C and D is shown. In the operation of the control unit 3 in this case, the second
Between the target text length calculation step 21 and the end point coordinate calculation step 22 described in the figure, each of the end points A and C and the end points of the two line segments
Closed space figure by considering virtual line segments 95 and 96 connecting B and D
A configuration in which a virtual closed space figure creation step for virtually creating an ABDC is added. Therefore, the operation of the control unit 3 is as follows. Text length L of text to be centered
Is calculated. Next, a virtual closed space figure ABDC composed of a line segment 91 and a line segment 92 is created. Then, after calculating the coordinates of the end points 93 and 94 of the line having the target text in the graphic ABDC and calculating the area length between the end points 93 and 94, the text display position is set in the same manner as in the embodiment described in FIG. And the text is centered and displayed.

この開空間図形での実施例は、行方向のテキスト中央
寄せ表示であるが、上,下方向に開部分のある開空間図
形での列方向のテキスト中央寄せ表示を行うためには、
上記と同様に仮想閉空間図形作成ステップを設けること
で対処できる。
In this embodiment in the open space figure, the text is centered in the row direction. However, in order to perform the text centering in the column direction in the open space figure having an open portion at the top and bottom,
As described above, this can be dealt with by providing a virtual closed space figure creating step.

さらに、斜め方向のテキスト中央寄せ表示を行うため
には、当該斜め方向に開部分と持つ場合には、前述と同
様の仮想閉空間図形作成ステップを設けることで対処で
きる。
Furthermore, in order to display the text in the diagonal direction with the center aligned, if the display has an open portion in the diagonal direction, it can be dealt with by providing a virtual closed space figure creating step similar to that described above.

次に、平化率の大きい曲線によって囲まれている閉空
間図形あるいは、開空間図形内でテキスト中央寄せ表示
を行う場合は、テキストが図形外にはみ出すことが多
い。センタリング後のテキストを図形内に表示するため
には次のようにする。
Next, when performing text centered display in a closed space graphic or an open space graphic surrounded by a curve having a large flattening rate, the text often protrudes outside the graphic. In order to display the centered text in the figure, the following is performed.

第10図は、平化率の大きい曲線によって囲まれている
図形内でテキストの中央寄せ表示を行う場合についての
説明図である。曲線l1,l2からの等距離にある中心曲線l
3の近似関数を求める。また、曲線l1,l2の端点を結んだ
線分の中点A,Bの座標を算出する。次に、AM=BM(直線
距離でも曲線上の距離でもよい。どちらにするかは、別
の指示入力による。)を満たす曲線l3上の中点Mの座標
を算出する。ところが、テキストの中央文字をMに位置
するように表示すると図形からはみ出るので、中央文字
の両隣の文字が曲線l3上に位置するように曲線l3の近似
関数式を用いて両隣の文字を表示すべき座標を算出す
る。以下表示する文字列がなくなるまで繰り返す。この
様にして表示した例を第11図に示す。
FIG. 10 is an explanatory diagram of a case where text is centered and displayed within a figure surrounded by a curve having a large flattening rate. Center curve l equidistant from curves l 1 and l 2
Find the approximate function of 3 . Further, the coordinates of the midpoints A and B of the line connecting the end points of the curves l 1 and l 2 are calculated. Next, AM = BM (or even linear distance may be a distance on the curve. To Both,. By another instruction input) calculates coordinates of the midpoint M on the curve l 3 satisfying. However, since the protruding from the graphic when displaying a central character in the text to be positioned in M, the both sides of the character by using the approximation function expression of the curve l 3 as characters on both sides of the central character is positioned on the curve l 3 Calculate the coordinates to be displayed. Repeat until no more character strings are displayed. FIG. 11 shows an example of such a display.

この様にして、中線l3の両端A,Bの中点Mにテキスト
の中央文字を表示し他の文字も中線上に位置するように
表示することにより平化率の大きい曲線で囲まれた図形
中での中央寄せ表示が実現できる。
In this way, surrounded by a large curve of Tairaka rate by displaying displays both ends A, central character midpoint M in the text of B midline l 3 so as to be positioned midline also other characters The centered display in the figure can be realized.

以上の様に、開空間図形内や閉空間図形内でも、ま
た、図形構成要素が直線や、いかなる曲線であっても、
テキストの中央寄せ表示が容易に実現でき、使い勝手の
良い文書処理装置を得ることが可能になる。
As described above, even in an open space figure or a closed space figure, and even if a graphic component is a straight line or any curve,
The centered display of the text can be easily realized, and a user-friendly document processing device can be obtained.

[発明の効果] 本発明によれば、任意の図形内の対象文字列等を任意
の方向に対しセンタリングでき、文書等の作成や編集が
容易になるという効果がある。
[Effects of the Invention] According to the present invention, a target character string or the like in an arbitrary figure can be centered in an arbitrary direction, and there is an effect that creation or editing of a document or the like is facilitated.

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

第1図は本発明の一実施例に係る文書処理装置のブロッ
ク構成図、第2図は本発明の一実施例に係るセンタリン
グ処理を閉空間内の行方向に適用した場合の処理手順を
示すフローチャート、第3図及び第4図は第2図に示す
実施例の具体的説明、第5図は本発明の一実施例に係る
センタリング処理を閉空間内の列方向に適用した場合の
処理手順を示すフローチャート、第6図は第5図に示す
実施例の具体的説明図、第7図は本発明の一実施例に係
るセンタリング処理を閉空間の斜め方向に適用した場合
の処理手順を示すフローチャート、第8図は第7図に示
す実施例の具体的説明図、第9図は本発明の一実施例に
係るセンタリング処理を開空間の横方向に適用した場合
の具体的説明図、第10図は本発明の一実施例に係るセン
タリング処理を平化率の大きい曲線に囲まれた図形内で
の処理に適用した場合の具体的説明図、第11図は第10図
で説明したセンタリング処理後の表示例を示す図であ
る。 1……キーボード、2……記憶装置、3……演算制御
部、4……入力テキスト長算出部、5……端点座標算出
部、6……テキスト表示領域算出部、7……端点間中点
座標算出部、8……入力テキスト中央文字検索部、9…
…表示制御部、10……表示装置。
FIG. 1 is a block diagram of a document processing apparatus according to one embodiment of the present invention, and FIG. 2 shows a processing procedure when centering processing according to one embodiment of the present invention is applied in a row direction in a closed space. Flow charts, FIGS. 3 and 4 are specific descriptions of the embodiment shown in FIG. 2, and FIG. 5 is a processing procedure when the centering processing according to one embodiment of the present invention is applied in the column direction in a closed space. FIG. 6 is a specific explanatory view of the embodiment shown in FIG. 5, and FIG. 7 shows a processing procedure when the centering processing according to an embodiment of the present invention is applied in an oblique direction of a closed space. FIG. 8 is a specific explanatory diagram of the embodiment shown in FIG. 7, and FIG. 9 is a specific explanatory diagram in the case where the centering process according to one embodiment of the present invention is applied in the lateral direction of the open space. FIG. 10 shows a centering process according to an embodiment of the present invention. Specifically illustration of the application of the processing within and surrounded by a large curve rate figures, FIG. 11 is a diagram showing a display example after the centering process described in FIG. 10. DESCRIPTION OF SYMBOLS 1 ... Keyboard, 2 ... Storage device, 3 ... Operation control part, 4 ... Input text length calculation part, 5 ... End point coordinate calculation part, 6 ... Text display area calculation part, 7 ... Between end points Point coordinate calculation section, 8 ... Input text central character search section, 9 ...
... Display control unit, 10 ... Display device.

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】表示装置に表示されているセンタリング対
象を任意の方向に任意の図形内でセンタリングする処理
装置において、 センタリング指示入力手段と、 前記センタリング対象を指定する手段と、 前記センタリング対象をセンタリングする方向を指定す
る第一の仮想線を入力する手段と、 前記入力された第一の仮想線と前記任意の図形の二つの
交点の座標を算出し、前記二つの交点間の中点座標を算
出する演算手段と、 前記センタリング対象を前記中間座標を中心とする位置
にセンタリングして前記表示装置に表示する表示手段と
を備えることを特徴とする処理装置。
1. A processing device for centering a centering object displayed on a display device in an arbitrary direction in an arbitrary figure, a centering instruction input means, a means for designating the centering object, and centering the centering object. Means for inputting a first virtual line specifying a direction to be performed, calculating coordinates of two intersections of the input first virtual line and the arbitrary figure, and calculating a middle point coordinate between the two intersections A processing device, comprising: a calculating means for calculating; and a display means for centering the centering target at a position centered on the intermediate coordinates and displaying the centered object on the display device.
【請求項2】前記任意の図形が開図形である場合は、前
記開図形の開部分の端部を第二の仮想線で結ぶ手段をさ
らに備え、前記演算手段は前記第二の仮想線と前記第一
の仮想線の二つの交点の座標を算出することを特徴とす
る請求項1に記載の処理装置。
2. The apparatus according to claim 1, further comprising: means for connecting an end of an open portion of the open figure with a second virtual line when the arbitrary figure is an open figure; The processing device according to claim 1, wherein coordinates of two intersections of the first virtual line are calculated.
【請求項3】センタリング入力指示手段と、 表示された開空間図形あるいは閉空間図形の対向する2
本の曲線から両曲線の中心曲線或いは中心近似曲線を求
める中心線算出手段と、 センタリング対象を前記センタリング入力指示手段の入
力指示により前記中心線算出手段が求めた線に沿って表
示させるセンタリング手段とを備えることを特徴とする
処理装置。
3. A centering input instructing means, and a counterpart of the displayed open space graphic or closed space graphic.
A center line calculating means for obtaining a center curve or a center approximate curve of both curves from the two curves; and a centering means for displaying a centering target along the line obtained by the center line calculating means in accordance with an input instruction of the centering input instructing means. A processing device comprising:
【請求項4】センタリング指示入力手段と、表示されて
いる任意の閉空間図形の任意の縦方向あるいは斜め方向
の仮想線と前記閉空間図形との両交点を算出し、該両交
点間の中点座標を算出する中点算出手段と、対象文字列
の長さを算出する文字列長算出手段と、求めた文字列長
の中心を前記中点算出手段が求めた中心座標位置に前記
センタリング指示入力手段から入力指示により移動して
表示するセンタリング手段とを備えることを特徴とする
文字中央寄せ装置。
4. A centering instruction input means, and an intersection between an arbitrary virtual or oblique direction virtual line of an arbitrary displayed closed space graphic and said closed space graphic is calculated. A midpoint calculating means for calculating point coordinates, a character string length calculating means for calculating the length of the target character string, and the centering instruction to set the center of the obtained character string length to the center coordinate position obtained by the midpoint calculating means. A centering means for moving and displaying the character according to an input instruction from the input means.
JP1192627A 1989-07-27 1989-07-27 Character centering device and processing device equipped with this device Expired - Fee Related JP2936546B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1192627A JP2936546B2 (en) 1989-07-27 1989-07-27 Character centering device and processing device equipped with this device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1192627A JP2936546B2 (en) 1989-07-27 1989-07-27 Character centering device and processing device equipped with this device

Publications (2)

Publication Number Publication Date
JPH0358167A JPH0358167A (en) 1991-03-13
JP2936546B2 true JP2936546B2 (en) 1999-08-23

Family

ID=16294396

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1192627A Expired - Fee Related JP2936546B2 (en) 1989-07-27 1989-07-27 Character centering device and processing device equipped with this device

Country Status (1)

Country Link
JP (1) JP2936546B2 (en)

Also Published As

Publication number Publication date
JPH0358167A (en) 1991-03-13

Similar Documents

Publication Publication Date Title
JPH0452871A (en) Character/graphic processor
JP2936546B2 (en) Character centering device and processing device equipped with this device
JPS644189B2 (en)
JPH06274303A (en) Multiwindow display method
JPH069046B2 (en) Text editing device
JP3045905B2 (en) Character drawing device
JPS6215670A (en) Editing system for intra-graphic character string
JPH0830666A (en) Method and device for arranging character string
JPH0379718B2 (en)
JP2989609B2 (en) Information processing method and apparatus
JP2645174B2 (en) Computer with field display function
JP5532890B2 (en) Display device and program
JPH05119762A (en) Text input system
JPS6320681A (en) Tabulating and processing system
JPS63165944A (en) Electronic calculator of handwriting input type
JPS60130792A (en) Automatic rule drawing system
JPH04364569A (en) Character enlargement and reduction processing system
JPH06110442A (en) Character and figure processor and method for deforming character of figure
JPH08110852A (en) Document preparation device and its cursor movement control method
JPH03113569A (en) Document editing device
JPH02250154A (en) Listing device
JPH03176716A (en) Electronic apparatus
JPS6349980A (en) Display system for character with additional information
JP2001092789A (en) Calculating device and storage medium
JPS60205776A (en) Layout display system of word processor

Legal Events

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