JPH087116A - Graphic processing method - Google Patents

Graphic processing method

Info

Publication number
JPH087116A
JPH087116A JP5835692A JP5835692A JPH087116A JP H087116 A JPH087116 A JP H087116A JP 5835692 A JP5835692 A JP 5835692A JP 5835692 A JP5835692 A JP 5835692A JP H087116 A JPH087116 A JP H087116A
Authority
JP
Japan
Prior art keywords
pattern
memory
closed curve
embedding
output device
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
JP5835692A
Other languages
Japanese (ja)
Other versions
JP2562540B2 (en
Inventor
Shinya Kishimoto
晋弥 岸本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP4058356A priority Critical patent/JP2562540B2/en
Publication of JPH087116A publication Critical patent/JPH087116A/en
Application granted granted Critical
Publication of JP2562540B2 publication Critical patent/JP2562540B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To fill the inside of an area surrounded by arbitrary lines with arbitrary patterns in a short processing time by reading the pattern at a position corresponding to a scan position in a second direction from a second storage means while scanning the contour information of a graphic stored in a first storage means in a first direction. CONSTITUTION:Corresponding to a command for graphic processing inputted from an input device 2 (or a host computer 9), a control part 1 extends the pattern composed of dots inside a memory 5. An image output device 6 as an output device in a raster scan system outputs the contents of the image memory 5. Moreover, an image memory 4 is a memory for storing only the external frame of a closed curve and a pattern memory 7 is provided with a character generator expressing the pattern. A write pen 3 can indicates the inside of the closed curve outputted to the image output device 6 and as a result, the pattern generated by the pattern memory 7 can be generated, erased or changed inside the closed curve or the color or its luminance can be changed.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は図形処理方法に関するも
ので、特に任意の線(曲線を含む)で囲まれる領域の内
部を任意のパターンで埋めつくす図形処理方法に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic processing method, and more particularly to a graphic processing method for filling an area surrounded by an arbitrary line (including a curve) with an arbitrary pattern.

【0002】[0002]

【従来の技術】例えば、グラフィックナ表示のできるC
RTを伴った図形処理装置に於いて、任意の閉曲線の中
をある模様パターンで埋めつくすことは多種多様のグラ
フイック表現を可能とするが、従来のこの種の図形処理
装置はソフトウェア或いはハードウェアに多大の負担が
かかるものである。
2. Description of the Related Art For example, a C that can display a graphic
In a graphic processing device with an RT, filling a given pattern pattern in an arbitrary closed curve enables a wide variety of graphic expressions, but the conventional graphic processing device of this type requires software or hardware. It is a heavy burden.

【0003】[0003]

【発明が解決しようとする課題】即ち、ソフトウェア処
理で前述した機能を実行するためには、多大な実行時間
を要し、またこれらをハードウェアで行う場合でも、極
めて特殊な構成を必要としている。更に従来のこの種の
図形処理装置では特定のパターンでしか埋込みを実行で
きない不利益を有しており、更に一度埋め込んだときは
その変更が不可能である。
That is, in order to execute the above-mentioned functions by software processing, it takes a lot of execution time, and even when these are executed by hardware, an extremely special configuration is required. . Furthermore, the conventional graphic processing apparatus of this type has a disadvantage that the embedding can be executed only in a specific pattern, and once it is embedded, the change cannot be performed.

【0004】本発明は上記従来例に鑑みてなされたもの
で、処理時間が早く任意のパターンで任意の線で囲まれ
た領域内を埋めつくすことが可能な図形処理方法を提供
することにある。
The present invention has been made in view of the above-mentioned conventional example, and it is an object of the present invention to provide a graphic processing method capable of filling a region surrounded by an arbitrary line with an arbitrary pattern in a short processing time. .

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
に本発明の図形処理方法は以下の様な構成を備える。即
ち、入力情報に基づく図形の輪郭情報を記憶する第1の
記憶手段と、前記図形の内部を塗潰すべきパターンを記
憶する第2の記憶手段とを有し、前記第1の記憶手段に
記憶された前記図形の輪郭情報を第1の方向にスキャン
しつつ、前記第1の方向とほぼ直交する第2の方向のス
キャン位置に対応した位置のパターンを前記第2の記憶
手段から読出し、書き込む処理を行う。
In order to achieve the above object, the graphic processing method of the present invention has the following configuration. That is, it has a first storage means for storing contour information of a figure based on input information, and a second storage means for storing a pattern for filling the inside of the figure, and is stored in the first storage means. The pattern information at the position corresponding to the scan position in the second direction substantially orthogonal to the first direction is read from and written in the second storage means while scanning the contour information of the formed graphic in the first direction. Perform processing.

【0006】[0006]

【作用】以上の構成において、第1の記憶手段に記憶さ
れた図形の輪郭情報を第1の方向にスキャンしつつ、そ
の第1の方向とほぼ直交する第2の方向のスキャン位置
に対応した位置のパターンを第2の記憶手段から読出
し、書き込む処理を行うように動作する。
In the above structure, while scanning the contour information of the graphic stored in the first storage means in the first direction, it corresponds to the scan position in the second direction which is substantially orthogonal to the first direction. It operates to read and write the position pattern from the second storage means.

【0007】[0007]

【実施例】以下、添付図面を参照して本発明の好適な実
施例を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings.

【0008】図1は本発明の主要構成のブロック図であ
る。入力装置2(若しくはホストコンピュータ9)から
入力された図形処理用コマンドにより制御部1はメモリ
5内にドットによるパターンの展開を行う。ラスタスキ
ャン方式の出力装置(例えばCRT)である画像出力装
置6は画像メモリ5の内容を出力する。また画像メモリ
4は閉曲線の外枠(アウトライン)だけを記憶するメモ
リであり、パターンメモリ7には模様を表わすキャラク
タジェネレータが入っている。ライトペン3は画像出力
装置6に出力されている閉曲線内を指示出来、その結果
閉曲線内にパターンメモリ7の発生する模様パターンの
生成、消去、変更またカラーの色、輝度の変更が出来
る。またHOSTコンピュータからのコマンドでも模様
パターンの生成、消去等は可能である。
FIG. 1 is a block diagram of the main configuration of the present invention. The control unit 1 develops a dot pattern in the memory 5 by a graphic processing command input from the input device 2 (or the host computer 9). The image output device 6 which is a raster scan type output device (for example, a CRT) outputs the contents of the image memory 5. The image memory 4 is a memory that stores only the outer frame (outline) of the closed curve, and the pattern memory 7 contains a character generator that represents a pattern. The light pen 3 can instruct the inside of the closed curve output to the image output device 6, and as a result, can generate, delete, and change the pattern pattern generated by the pattern memory 7 within the closed curve, and change the color and brightness of the color. Further, it is possible to generate and delete a pattern pattern by a command from the HOST computer.

【0009】図2はアウトラインの一例であり、これは
画像メモリ4内に記憶されたアウトラインデータに対応
し、図3は模様パターンをアウトライン内に展開して画
像出力した一例であり、画像メモリ5内に記憶されたデ
ータに対応する。図4は斜線を表わす模様パターンの一
例であり、第5図も網点を表わす模様パターンの一例で
ある。図4、図5はともにパターンメモリ7に記憶され
たパターン情報に対応する。
FIG. 2 shows an example of the outline, which corresponds to the outline data stored in the image memory 4, and FIG. 3 shows an example of developing the pattern pattern in the outline and outputting the image. Corresponds to the data stored in. FIG. 4 is an example of a pattern pattern showing diagonal lines, and FIG. 5 is also an example of a pattern pattern showing halftone dots. 4 and 5 both correspond to the pattern information stored in the pattern memory 7.

【0010】図6は画像出力装置6の表示画面のアドレ
ス空間を表わし、図7は画像メモリ4と画像メモリ5内
のアドレス空間を表わす。図6のX01 …Xm ,Y0
1…YL は表示画面上の1ドットを表わすための行列
アドレスであり、図7のX01 …Xm ,Y01 …YL
に対応する。
FIG. 6 shows the address space of the display screen of the image output device 6, and FIG. 7 shows the address space in the image memory 4 and the image memory 5. X 0 X 1 ... X m , Y 0 in FIG.
Y 1 ... Y L is a matrix address for representing one dot on the display screen, and X 0 X 1 ... X m , Y 0 Y 1 ... Y L in FIG.
Corresponding to.

【0011】以下模様パターンを任意の閉曲線内に展開
する手順を説明する。
The procedure for expanding the pattern pattern into an arbitrary closed curve will be described below.

【0012】まず制御部1は入力装置2(若しくはホス
トコンピュータ9)から入力されたコマンドにより閉曲
線のアウトラインの展開を画像メモリ4上に行うと同時
に画像メモリ5上にも行う。その後ライトペン3(若し
くはホストコンピュータ9)から模様パターンの種類と
その表示位置のアドレス(Xt ,Yt )が制御部1に入
力される。図8−1はそれを表わす。
First, the control unit 1 develops an outline of a closed curve on the image memory 4 and also on the image memory 5 by a command input from the input device 2 (or the host computer 9). After that, the type of the pattern pattern and the address (X t , Y t ) of its display position are input to the control unit 1 from the light pen 3 (or the host computer 9). Figure 8-1 represents this.

【0013】然る後制御部1は画像メモリ4上において
図7のYt 行のX01 …Xm 間のメモリ内容のスキャ
ンに行く。そしてX01 …Xm の中でセットしてある
ビット(アウトラインを表わす)の中からXt をはさむ
2点この場合、Xt1,Xt2を得る(即ちXt1<Xt <X
t2)。
After that, the control unit 1 scans the image memory 4 for the memory contents between X 0 X 1 ... X m of the Yt row in FIG. Then, two points sandwiching X t from the bits (representing the outline) set in X 0 X 1 ... X m In this case, X t1 and X t2 are obtained (that is, X t1 <X t <X
t2 ).

【0014】点S1(Xt1,Yt )は閉曲線で囲まれた
領域の左端の一点であり点S2(X t2,Yt )は閉曲線
で囲まれた領域の右端の一点である。これから模様パタ
ーンを上方向(↑)に展開する場合、S1,S2のアド
レス情報、即ち(Xt1,Yt)、(Xt2,Yt )と共に
(↓)の情報をスタックメモリ8にPUSHする(逆に図8
に示す処理において模様パターンを下方向(↓)に展開
する場合にはスタックメモリ8には(↑)が入る)。
Point S1 (Xt1, Yt ) Is surrounded by a closed curve
It is one point on the left edge of the area, and the point S2 (X t2, Yt ) Is a closed curve
It is the rightmost point of the area surrounded by. Pattern pattern from now on
When expanding the scene in the upward direction (↑), add S1 and S2
Response information, ie (Xt1, Yt), (Xt2, Yt ) With
Push the information in (↓) to the stack memory 8 (on the contrary, see Fig. 8).
Expand the pattern pattern downward (↓) in the process shown in
When doing so, (↑) is entered in the stack memory 8).

【0015】そして次に、画像メモリ5上において図7
のYt 行のXt1〜Xt2の範囲にパターンメモリ7より読
み込んだパターンを書込む。パターンメモリ7は図4及
び図5の如く、1行16ビットずつPAT0〜PAT31 まで3
2種類あるがYt の値にしたがいどの行を選択するかを
特定する。
Then, on the image memory 5, FIG.
The pattern read from the pattern memory 7 is written in the range from X t1 to X t2 of the Y t row of the above. As shown in FIG. 4 and FIG. 5, the pattern memory 7 has 3 bits from PAT0 to PAT31 for each row of 16 bits.
Although there are two types, the row to be selected is specified according to the value of Y t .

【0016】今、Yt にて、例えばPATnが選択されたと
すると16ビットの周期性をもってXt1〜Xt2にPATnが
繰り返し展開される。それが終了するとYが小さくなる
方向、即ちYt −1行における(Xt1,Yt ),
(Xt2,Yt )に連続する点(Xt1′,Yt −1),
(Xt2′,Yt −1)を画像メモリ4内に見つけに行
く。(X t1,Yt )に連続する点とは、Xt1′=Xt1
いはXt1′=Xt1+1或いはXt1′=Xt1−1いずれか
がセットされていることを満たす(Xt1′,Yt −1)
とする。
Now, Yt In, for example, if PATn is selected
Then, with 16-bit periodicity, Xt1~ Xt2To PATn
It is repeatedly expanded. When it ends, Y becomes small
Direction, ie Yt -1 (Xt1, Yt ),
(Xt2, Yt ) Consecutive points (Xt1′, Yt -1),
(Xt2′, Yt -1) to find in the image memory 4
Ku. (X t1, Yt ) Is a pointt1′ = Xt1Some
I'm Xt1′ = Xt1+1 or Xt1′ = Xt1-1 either
Satisfies that is set (Xt1′, Yt -1)
And

【0017】通常連続する点とは1点しかないが、2点
以上あった場合、Xt1 (n) とXt2 (n ) が成す線分Xt1
(n) ・Xt2 (n) が最小になる方の点を選択する。この
時、Xt1 (n) …Xt2 (n) 間のメモリの内容をスキャン
し、一連のリセット列(ビット0のかたまり)が1以下
の時は不連続点無しと判断し、一連のリセット列(ビッ
ト0のかたまり)が2の時は不連続点は1と判断し、一
連のリセット列(ビット0のかたまり)が3以上の時は
不連続点は2以上と判断する。
Normally, there is only one continuous point, but two points
If there is more than Xt1 (n) And Xt2 (n ) Line segment X formed byt1
(n) ・ Xt2 (n) Select the point that minimizes. this
Time Xt1 (n) ... Xt2 (n) Scan the contents of memory between
However, the series of reset strings (lump of bit 0) is 1 or less
, It is judged that there is no discontinuity, and a series of reset lines (bit
If the (group of 0s) is 2, the discontinuity point is judged as 1, and
When the reset string (a group of bit 0) is 3 or more,
The number of discontinuities is judged to be 2 or more.

【0018】以後の処理において不連続点が見つかった
時点でPUSH処理を行い、該領域へのパターン書き込みが
終了した時点でPOP 処理を行う。不連続点0で一連のビ
ットのリセット列が0の時、該領域への書き込みは終了
したと判定する。不連続点0でリセット列が1の時は以
下の処理をする。
PUSH processing is performed when a discontinuity is found in the subsequent processing, and POP processing is performed when the pattern writing to the area is completed. When the reset string of a series of bits is 0 at the discontinuity point 0, it is determined that the writing to the area is completed. When the reset sequence is 1 at the discontinuous point 0, the following processing is performed.

【0019】画像メモリ5のYt −1行のXt1′〜
t2′上に先程の操作と同様に図柄が連続するようにPA
T(n-1)パターンの書き込みを行いこれを順次繰返す。そ
して、(Yt −i)行における連続点を(Xt1 (i) ,Y
t −i)(Xt2 (i) ,Yt −i)とし、その上の行(Y
t −i−1)行に不連続点があつた場合(図8−2)、
以下の操作を行う。
X t1 ′ of Y t −1 row of the image memory 5
As in the previous operation, PA so that the symbols are continuous on X t2 ′.
The T (n-1) pattern is written and this is repeated sequentially. Then, the continuous points in the (Y t −i) row are converted into (X t1 (i) , Y
t −i) (X t2 (i) , Y t −i), and the line (Y
When there is a discontinuity in the ( t- i-1) row (Fig. 8-2),
Perform the following operations.

【0020】画像メモリ4中において、Xt1 (i) に連続
する点があった時、(Xt1 (i+1) ,Yt −i−1)以後
のスキャンにおいて、最初に見つかったアウトラインが
(X t2 (i) ,Yt −i)に連続しない場合、その点をS
3(Xt2 (i+1) ,Yt −i−1)として、(Yt −i)
行と連続する点をS4とする。そして、S3とS4をス
タックメモリ8にPUSHする。PUSHする際にはS3とS4
のX値の小さい方を前にして、PUSHする。即ち、この場
合は、S3の次にS4としてPUSHする。また、S3のX
値の方がS4のX値より大の場合は、第9−1図に示す
ように、S3の(Yt −i)行における連続点S6をS
4,S6の順でPUSHする。同様に、Xt1 (i) に連続する
点がない場合は(不図示であるが図9において斜線部で
スタートして上方向へ書く時のS4)、S5,S4がPU
SHされる。
In the image memory 4, Xt1 (i) In succession
When there is a point to do, (Xt1 (i + 1) , Yt -I-1) and later
The first outline found in the scan
(X t2 (i) , Yt -I) is not continuous, then that point is S
3 (Xt2 (i + 1) , Yt -I-1), (Yt -I)
The point continuous with the line is S4. Then S3 and S4
Push to the tack memory 8. When PUSH, S3 and S4
PUSH the smaller X value first. That is, this place
In case of S3, PUSH is performed as S4 after S3. In addition, X of S3
If the value is larger than the X value in S4, it is shown in Fig. 9-1.
, S3 (Yt -I) replace the continuous point S6 in the row with S
Push 4, then S6. Similarly, Xt1 (i) Consecutive to
If there is no dot (not shown, but in the shaded area in FIG. 9)
S4) when starting and writing upwards, S5 and S4 are PU
SH will be done.

【0021】また、この時スタックに入るべき方向
(↑)(↓)は表1に従う。即ち、不連続点の発生した
時点のb点のX成分(Xt2 (i+1) )と不連続点の発生す
る直前(a点)のX成分(Xt2 i )の比較を行うと、図
8−2の場合、Xt2 (i+1) <Xt2 (i) であり、今進んで
いる方向は(↑)であるから、第1表の最上段の場合に
相当する。つまりスタックメモリ8に入る方向は(↑)
となる。
The direction in which the stack should enter at this time
(↑) (↓) follows Table 1. That is, the discontinuity occurred
X component (Xt2 (i + 1) ) And the occurrence of discontinuity
Immediately before (point a) the X component (Xt2 i Fig.
For 8-2, Xt2 (i + 1) <Xt2 (i) And go now
Since the direction is (↑), in the case of the top row of Table 1
Equivalent to. In other words, the direction to enter the stack memory 8 is (↑)
Becomes

【0022】不連続点が発生した以後の処理は図8−3
の如く実施される。つまり、それ以後はYt −i−1行
のXt1 (i+1) の連続点及びS3のX成分であるXt2
(i+1) の連続点の線分に於いて、パターンメモリ7から
のパターン埋込み作業を継続する。この様にしてA点ま
で来るとX成分が等しくなる事により、結果的に不連続
点が0でビットのリセット列が0の状態となり、終了と
判定され、図8−3のS1−A−S3−S4−S2で囲
まれた領域のパターンの埋込みが終了した事が判明す
る。
The process after the discontinuity occurs is shown in FIG.
It is carried out as follows. That is, after that, the continuous points of X t1 (i + 1) on the Y t −i−1 row and X t2 which is the X component of S3.
The pattern embedding work from the pattern memory 7 is continued in the line segment of the continuous points of (i + 1) . In this way, when the point A is reached, the X components become equal, so that the discontinuity point is 0 and the bit reset sequence is 0, and it is determined that the processing is completed, and S1-A- in FIG. It is found that the embedding of the pattern in the area surrounded by S3-S4-S2 is completed.

【0023】この後、スタックメモリ8から先にPUSHし
た(↑)、S3,S4をPOP し、前と同様にパターンの
埋込み作業を行う。この作業の結果、B点にて再びX成
分が等しくなり、S1−A−B−S2で囲まれる領域の
パターンの埋込みが終了する。以後、再びスタックメモ
リ8から(↓),S1,S2をPOP して、前述した手順
と同様の手順で、今度はS1−S2の線分から下の領域
のパターンの埋込み作業を実施する。
Thereafter, the stack memory 8 is PUSHed (↑) first, S3 and S4 are popped, and the pattern embedding work is performed as before. As a result of this work, the X components become equal again at the point B, and the embedding of the pattern in the area surrounded by S1-A-B-S2 ends. Thereafter, the stack memory 8 is again popped (↓), S1 and S2, and the operation of embedding the pattern in the region below the line segment of S1-S2 is performed by the same procedure as described above.

【0024】図8−5で示される様にS5,S6で再び
不連続点が発生するが、この場合も不連続点の発生した
Y行のX成分(Xt2 (i+1) )と不連続点が発生する直前
(C)点のY行のX成分(Xt2 (i) )との比較と、現在
埋込み作業を行っているY方向の向きにより第1表に示
されるテーブルが参照され、スタックメモリ8に入るべ
き値が決定される。この場合、表1の上から3段目に相
当するので、スタックメモリ8には(↓),S5,S6
がPUSHされる。同様な方法で図8−6、図8−7に示す
処理が実行され、スタックメモリ8をPOP したときに空
の情報が得られた時点で、閉曲線A−B−C−D内のパ
ターンの埋込みが完了する訳である。
As shown in FIG. 8-5, discontinuities occur again in S5 and S6. In this case as well, there is a discontinuity with the X component (X t2 (i + 1) ) of the Y row in which the discontinuities occurred. The table shown in Table 1 is referred to by the comparison with the X component (X t2 (i) ) of the Y row at the point (C) immediately before the occurrence of continuous points and the direction of the Y direction in which the embedding work is currently performed. , The value to be stored in the stack memory 8 is determined. In this case, since it corresponds to the third row from the top of Table 1, the stack memory 8 has (↓), S5, S6.
Is pushed. The processes shown in FIGS. 8-6 and 8-7 are executed by the same method, and when empty information is obtained when the stack memory 8 is popped, the pattern in the closed curve A-B-C-D The embedding is completed.

【0025】[0025]

【表1】 表1の上から2段目及び最下段の場合について説明す
る。図9−1の場合、閉曲線内のパターン埋込み開始点
が点10から行なわれた場合を示している。また、図9
−2では点11から開始された場合を示している。この
ような場合、不連続点が発生したY行のX成分(Xt2
(i+1) )と不連続点が発生する直前のY行のX成分(X
t2 (i) )との比較を行うと、どちらの場合もXt2 (i+1)
>Xt2 (i) となる事は図より明らかである。但し、Y方
向のパターン埋込み方向のみが逆である。つまり、図9
−1の場合が表1の上から2段目であり、図9−2の場
合が最下段である事は明らかである。
[Table 1] The case of the second row and the bottom row from the top of Table 1 will be described. In the case of FIG. 9A, the pattern embedding start point in the closed curve is from point 10. In addition, FIG.
-2 shows the case where the process starts from point 11. In such a case, the X component (X t2
(i + 1) ) and the X component (X
t2 (i) ) and in both cases X t2 (i + 1)
It is clear from the figure that> X t2 (i) . However, only the pattern embedding direction in the Y direction is opposite. That is, FIG.
It is clear that the case of -1 is the second row from the top of Table 1, and the case of FIG. 9-2 is the bottom row.

【0026】同様に、Xt1 (i) に不連続点が発生した場
合も、表1に相当する不図示のテーブルに基づいて処理
している。尚、詳細は省略する。
Similarly, when a discontinuity occurs in X t1 (i) , it is processed based on a table (not shown) corresponding to Table 1. Details are omitted.

【0027】次に不連続点が同一Y行内に多数存在する
場合の処理方法について図10及び図111に示される
閉曲線に囲まれる図形及び直線によって囲まれる図形
(多角形)を例にとり説明を行う。
Next, a processing method in the case where a large number of discontinuity points exist in the same Y row will be described with reference to figures enclosed by closed curves and figures enclosed by straight lines (polygons) shown in FIGS. .

【0028】まず、図10の閉曲線内の領域の埋込みを
第12図を参照して説明する。
First, the embedding of the area within the closed curve of FIG. 10 will be described with reference to FIG.

【0029】第12−1図に於いて不連続点があった場
合の処理は図8−2の処理と同じである。即ちS1,S
2の内容と共に(↑)の情報をスタックにPUSHして埋め
込みを続行する。PUSHを行う時は図8−1〜8−7図に
於ける説明と全く同じであるが、問題はPOP する場合で
ある。図12−2に於いてスタックの情報をPOP した時
S1,S2の間に不連続点がまだ存在する可能性がある
画像メモリ4のアドレス空間を示したものである図13
に於いて、S1,S2がそれぞれ(Xs1,Ys),(X
s2,Ys )とすると、POP した時Ys 行の点列Xs1…X
s2間のメモリ内容をスキャンに行く。そしてその中でX
s1,Xs2以外にセットしてあるビットX s3があると、S
3(Ys ,Xs3)も不連続点と見做し、S3,S2をス
タックにPUSHしてからS1,S3をスタート点として埋
め込み処理を始める(第12−3図)。
When there is a discontinuity in FIG. 12-1
The processing of the combination is the same as the processing of FIG. 8-2. That is, S1, S
PUSH the stack with the information of (↑) along with the contents of 2.
Continue to include. When performing PUSH, refer to Figures 8-1 to 8-7.
Exactly the same as the explanation in the above, but the problem is when POP
is there. When popping the stack information in Figure 12-2
A discontinuity may still exist between S1 and S2
FIG. 13 is a diagram showing the address space of the image memory 4.
, S1 and S2 are (Xs1, Ys), (X
s2, Ys ), Y when you POPs Row of points Xs1... X
s2Go scan the memory contents in between. And in that X
s1, Xs2Bit X set to other than s3If there is S
3 (Ys , Xs3) Is also regarded as a discontinuity point, and S3 and S2 are
After PUSH to the tack, fill S1 and S3 as starting points
The embedding process is started (Fig. 12-3).

【0030】図12−4に於いてPOP した時も同様の処
理を行う。S3,S2間に不連続点がない時はS3,S
2をそのままスタート点として処理を行い、図10に示
す閉曲線内部のパターンの埋込みを完了する。
Similar processing is performed when POP is performed in FIG. 12-4. When there is no discontinuity between S3 and S2, S3 and S
The process is performed with 2 as the starting point as it is, and the embedding of the pattern inside the closed curve shown in FIG. 10 is completed.

【0031】次に図11のような例について述べる。第
14−1図に於いて不連続点があった場合の処理は図8
−2の処理と同じである。即ちS1,S2をスタックへ
PUSHして埋め込みを続行する、問題はスタックよりPOP
した時である。
Next, an example as shown in FIG. 11 will be described. The processing when there is a discontinuity in FIG. 14-1 is shown in FIG.
It is the same as the process of -2. That is, S1, S2 to the stack
PUSH and continue embedding, problem is POP than stack
It's time to do it.

【0032】図14−2に於いて、S1,S2をPOP し
たとき、画像メモリのアドレス空間を示す図15で、S
1,S2が(Xs1,Ys ),(Xs2,Ys )に対応する
とする。POP した時制御部1はYs 行の点列Xs1……X
s2間のメモリ内容をスキャンに行く。Xs1に連続する次
のビットXs1′がセットしてあったらそれ以降どこまで
連続してセットしてあるかを調べ、連続セットビットの
最終点Xs3を得る。そしてXs3に連続する次のビットX
s3′より始めてそれ以降どこまで連続してリセットして
あるかを調べ、連続リセットの最終点の次のビット(セ
ットしてある)X4 を得る。
In FIG. 14-2, when S1 and S2 are popped, S in FIG. 15 showing the address space of the image memory
1, S2 corresponds to (X s1 , Y s ), (X s2 , Y s ). When the POP is performed, the control unit 1 displays the point sequence of the Y s row X s1 ...... X
Go scan the memory contents between s2 . After each other the next bit X s1 continuous to the X s1 'is set Determine are set in succession to where later, to obtain the final point X s3 of continuous set bit. And the next bit X following X s3
Starting from s3 'later how far continuously Determine are reset, the next bit of the last point of the continuous reset (are set) obtaining X 4.

【0033】(Xs3,Ys ),(Xs4,Ys )をS3,
S4とすればS4,S2をスタックにPUSHしてからS
3,S4をスタート点として埋め込みを始める(図14
−3)。
(X s3 , Y s ) and (X s4 , Y s ) are converted to S 3,
If it is S4, push S4 and S2 to the stack and then S
Embedding is started by using S3 and S4 as starting points (see FIG. 14).
-3).

【0034】図14−4に於けるPOP 時も前述と全く同
様の処理を行って図11に示される図形内のパターンの
埋込み処理が完了する。
At the time of POP in FIG. 14-4, the same process as described above is performed to complete the process of embedding the pattern in the figure shown in FIG.

【0035】なお、図16に示される図形の場合は、図
14−3における処理にてS4=S2となるが、このと
きはスタックメモリへのPUSHを行わず、S3,S4間の
埋込みだけを行う事でパターン埋込み処理が完了する。
また、図17に示される閉曲線の場合、図14−3に於
ける処理にてS3=S2となるが、この時には、不連続
点が0の場合、一連のビットリセット列が0であるので
終了と判定され、PUSH処理も埋込み処理も行わずに閉曲
線内のパターン埋込み処理が完了する。
In the case of the figure shown in FIG. 16, S4 = S2 in the process in FIG. 14-3. At this time, PUSH is not performed to the stack memory and only the embedding between S3 and S4 is performed. By doing so, the pattern embedding process is completed.
In the case of the closed curve shown in FIG. 17, S3 = S2 is set in the process in FIG. 14-3. At this time, if the discontinuity is 0, the series of bit reset sequences is 0, so the process ends. Therefore, the pattern embedding process within the closed curve is completed without performing the PUSH process and the embedding process.

【0036】以上、図2、図10、図11に示される図
形の処理について説明したが、POP処理において図11
で説明した如く処理を行えばすべての場合に対応できる
事は明らかである。また処理できる図形は中にくい込み
のない多角形、円弧をも包含するものである。
The processing of the figures shown in FIGS. 2, 10 and 11 has been described above.
It is obvious that all the cases can be dealt with by performing the processing as described in the above. In addition, the figures that can be processed include polygons and arcs that are not difficult to fill.

【0037】以上説明した操作と同様の操作にて、任意
の直線又は曲線又はその双方で囲まれた領域内のパター
ンの変更、消去、カラーの色指定や変更、輝度の指定や
変更等が容易に実行できる事は明らかである。
By the same operation as described above, it is easy to change, erase, specify or change the color of a color, specify or change the brightness of a pattern in a region surrounded by an arbitrary straight line or curved line or both of them. It is clear that this can be done.

【0038】また更に上述の実施例ではパターンメモリ
7にROMを使用した例につき説明したが、これを随時
変更記憶可能なRAMに変更使用してもよい。特にRA
Mの場合はホストコンピュータ9により記憶内容を変更
すれば、小容量のRAMで多種類の埋込みパターンを準
備できる。
Further, in the above-mentioned embodiment, the example in which the ROM is used for the pattern memory 7 has been described, but this may be changed to a RAM capable of changing and storing at any time. Especially RA
In the case of M, if the stored contents are changed by the host computer 9, various kinds of embedding patterns can be prepared with a small capacity RAM.

【0039】本実施例は以上のように構成され、かつ動
作するため、特殊なハードウェアを用意することなく、
高速で任意の線(直線、曲線を含む)で囲まれた図形内
を任意のパターンで埋めつくすことができる。このた
め、本実施例は、ハードウェア・ソフトウェアの負担な
く安価で高速な図形処理方法を提供するものである。
Since the present embodiment is constructed and operates as described above, there is no need to prepare special hardware.
It is possible to fill a pattern surrounded by arbitrary lines (including straight lines and curved lines) with an arbitrary pattern at high speed. Therefore, the present embodiment provides an inexpensive and high-speed graphic processing method without burdening hardware and software.

【0040】[0040]

【発明の効果】以上説明したように本発明によれば、処
理時間が速く、任意のパターンで任意の線で囲まれた領
域内を簡単な制御で、かつ高速で埋めつくすことが可能
な図形処理方法をソフトウェア・ハードウェアの過大な
負担なく実現できる。
As described above, according to the present invention, a processing time is fast, and a region surrounded by an arbitrary line with an arbitrary pattern can be filled with a simple control at a high speed. The processing method can be realized without excessive burden on software and hardware.

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

【図1】本発明の代表的な実施例のブロック図である。FIG. 1 is a block diagram of an exemplary embodiment of the present invention.

【図2】処理対象図形の外枠の一例を示す図である。FIG. 2 is a diagram showing an example of an outer frame of a processing target graphic.

【図3】図2で示される外枠の内部にパターンを埋めこ
んで画像出力した一例を示す図である。
FIG. 3 is a diagram showing an example of outputting an image by embedding a pattern inside the outer frame shown in FIG.

【図4】埋めこみパターン例を示した図である。FIG. 4 is a diagram showing an embedding pattern example.

【図5】埋めこみパターン例を示した図である。FIG. 5 is a diagram showing an embedding pattern example.

【図6】画像出力装置6の表示画面のアドレス空間を示
す図である。
6 is a diagram showing an address space of a display screen of the image output device 6. FIG.

【図7】画像メモリ4と画像メモリ5内のアドレス空間
を表わした図である。
7 is a diagram showing an address space in the image memory 4 and the image memory 5. FIG.

【図8−1】図2で示される閉曲線内部のパターン埋込
みを説明するための図である。
8A is a diagram for explaining pattern embedding inside the closed curve shown in FIG. 2;

【図8−2】図2で示される閉曲線内部のパターン埋込
みを説明するための図である。
FIG. 8-2 is a diagram for explaining pattern embedding inside the closed curve shown in FIG. 2;

【図8−3】図2で示される閉曲線内部のパターン埋込
みを説明するための図である。
8-3 is a diagram for explaining pattern embedding inside the closed curve shown in FIG. 2. FIG.

【図8−4】図2で示される閉曲線内部のパターン埋込
みを説明するための図である。
8-4 is a diagram for explaining pattern embedding inside the closed curve shown in FIG. 2. FIG.

【図8−5】図2で示される閉曲線内部のパターン埋込
みを説明するための図である。
8-5 is a diagram for explaining pattern embedding inside the closed curve shown in FIG. 2. FIG.

【図8−6】図2で示される閉曲線内部のパターン埋込
みを説明するための図である。
8-6 is a diagram for explaining pattern embedding inside the closed curve shown in FIG. 2. FIG.

【図8−7】図2で示される閉曲線内部のパターン埋込
みを説明するための図である。
8-7 is a diagram for explaining pattern embedding inside the closed curve shown in FIG. 2. FIG.

【図9−1】表1を説明するための図である。9A is a diagram for explaining Table 1; FIG.

【図9−2】表1を説明するための図である。9-2 is a diagram for explaining Table 1. FIG.

【図10】処理対象図形の外枠の一例を示す図である。FIG. 10 is a diagram showing an example of an outer frame of a processing target graphic.

【図11】処理対象図形の外枠の一例を示す図である。FIG. 11 is a diagram showing an example of an outer frame of a processing target graphic.

【図12−1】図10で示される閉曲線内をパターンで
埋込む場合の説明図である。
12-1 is an explanatory diagram of a case where the inside of the closed curve shown in FIG. 10 is embedded with a pattern.

【図12−2】図10で示される閉曲線内をパターンで
埋込む場合の説明図である。
12-2 is an explanatory diagram for embedding a pattern inside the closed curve shown in FIG.

【図12−3】図10で示される閉曲線内をパターンで
埋込む場合の説明図である。
12-3 is an explanatory diagram for embedding a pattern inside the closed curve shown in FIG.

【図12−4】図10で示される閉曲線内をパターンで
埋込む場合の説明図である。
12-4 is an explanatory diagram for embedding a pattern inside the closed curve shown in FIG.

【図13】画像メモリ4と画像メモリ5内のアドレス空
間を表わした図である。
FIG. 13 is a diagram showing an address space in the image memory 4 and the image memory 5.

【図14−1】図11で示される図形内部をパターンで
埋込む場合の説明図である。
14-1 is an explanatory diagram of a case where the inside of the figure shown in FIG. 11 is embedded with a pattern.

【図14−2】図11で示される図形内部をパターンで
埋込む場合の説明図である。
14-2 is an explanatory diagram for embedding the inside of the figure shown in FIG. 11 with a pattern.

【図14−3】図11で示される図形内部をパターンで
埋込む場合の説明図である。
14-3 is an explanatory diagram for embedding the inside of the figure shown in FIG. 11 with a pattern.

【図14−4】図11で示される図形内部をパターンで
埋込む場合の説明図である。
14-4 is an explanatory diagram for embedding the inside of the figure shown in FIG. 11 with a pattern.

【図15】画像メモリ4と画像メモリ5内のアドレス空
間を表わした図である。
FIG. 15 is a diagram showing an address space in the image memory 4 and the image memory 5.

【図16】図11の示す図形の他例を示す図である。16 is a diagram showing another example of the figure shown in FIG.

【図17】図11の示す図形の他例を示す図である。17 is a diagram showing another example of the figure shown in FIG. 11. FIG.

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

1 制御部 2 入力装置 3 ライトペン 4 画像メモリ 5 画像メモリ 6 画像出力装置 7 パターンメモリ 8 スタックメモリ 1 Control Unit 2 Input Device 3 Light Pen 4 Image Memory 5 Image Memory 6 Image Output Device 7 Pattern Memory 8 Stack Memory

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成4年4月3日[Submission date] April 3, 1992

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0008[Correction target item name] 0008

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0008】図1は本発明の主要構成のブロック図であ
る。入力装置2(もしくはホストコンピュータ9)から
入力された図形処理用コマンドにより制御部1はメモリ
5内にドットによるパターンの展開を行う。ラスタスキ
ャン方式の出力装置(例えばCRT)である画像出力装
置6は画像メモリ5の内容を出力する。また画像メモリ
4は閉曲線の外枠(アウトライン)だけを記憶するメモ
リであり、パターンメモリ7には模様を表わすキャラク
タジェネレータが入っている。ライトペン3は画像出力
装置6に出力されている閉曲線内を指示出来、その結果
閉曲線内にパターンメモリ7の発生する模様パターンの
生成、消去、変更またカラーの色、輝度の変更が出来
る。これは言うまでもなく、前記図1の画像メモリ4
に、画像メモリ5とは別に閉曲線のアウトラインだけを
記憶しておくので、画像メモリ5に対して内部が塗られ
た後でも、内部が塗られていない閉曲線に対する後述の
処理を容易に開始できるからである。またHOSTコン
ピュータからのコマンドでも模様パターンの生成、消去
等は可能である。
FIG. 1 is a block diagram of the main configuration of the present invention. The control unit 1 develops a pattern with dots in the memory 5 by a graphic processing command input from the input device 2 (or the host computer 9). The image output device 6 which is a raster scan type output device (for example, a CRT) outputs the contents of the image memory 5. The image memory 4 is a memory that stores only the outer frame (outline) of the closed curve, and the pattern memory 7 contains a character generator that represents a pattern. The light pen 3 can instruct the inside of the closed curve output to the image output device 6, and as a result, can generate, delete, and change the pattern pattern generated by the pattern memory 7 within the closed curve, and change the color and brightness of the color. Needless to say, this is the image memory 4 shown in FIG.
In addition to the image memory 5, only the outline of the closed curve
Since it is stored, the inside of the image memory 5 is painted.
Even if the closed curve is not filled inside,
This is because the processing can be started easily. Further, it is possible to generate and delete a pattern pattern by a command from the HOST computer.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0037[Name of item to be corrected] 0037

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0037】以上説明した操作と同様の操作にて、任意
の直線又は曲線又はその双方で囲まれた領域内のパター
ンの変更、消去、カラーの色指定や変更、輝度の指定や
変更等が容易にできる事は明らかである。これは言うま
でもなく、前記図1の画像メモリ4に、画像メモリ5と
は別に閉曲線のアウトラインだけを記憶しておくからで
ある。
By the same operation as described above, it is easy to change, erase, specify or change the color of a color, specify or change the brightness of a pattern in a region surrounded by an arbitrary straight line or curved line or both of them. It is clear that you can do it. This is
In addition, the image memory 4 of FIG.
Because only the outline of the closed curve is stored separately
is there.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 入力情報に基づく図形の輪郭情報を記憶
する第1の記憶手段と、前記図形の内部を塗潰すべきパ
ターンを記憶する第2の記憶手段とを有し、 前記第1の記憶手段に記憶された前記図形の輪郭情報を
第1の方向にスキャンしつつ、前記第1の方向とほぼ直
交する第2の方向のスキャン位置に対応した位置のパタ
ーンを前記第2の記憶手段から読出し、書き込む処理を
行うことを特徴とする図形処理方法。
1. A first storage means for storing contour information of a figure based on input information, and a second storage means for storing a pattern for filling the inside of the figure, the first storage means. While scanning the contour information of the figure stored in the means in the first direction, the pattern of the position corresponding to the scan position in the second direction substantially orthogonal to the first direction is stored in the second storage means. A graphic processing method characterized by performing reading and writing processing.
JP4058356A 1992-03-16 1992-03-16 Figure processing method Expired - Lifetime JP2562540B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4058356A JP2562540B2 (en) 1992-03-16 1992-03-16 Figure processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4058356A JP2562540B2 (en) 1992-03-16 1992-03-16 Figure processing method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP13020781A Division JPS5833773A (en) 1981-08-21 1981-08-21 Graph processing device

Publications (2)

Publication Number Publication Date
JPH087116A true JPH087116A (en) 1996-01-12
JP2562540B2 JP2562540B2 (en) 1996-12-11

Family

ID=13082043

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4058356A Expired - Lifetime JP2562540B2 (en) 1992-03-16 1992-03-16 Figure processing method

Country Status (1)

Country Link
JP (1) JP2562540B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100457064B1 (en) * 1997-11-13 2005-05-27 주식회사 대우일렉트로닉스 Method for detecting in contour information

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5214055A (en) * 1975-06-30 1977-02-02 Toto Ltd Urinal flushing system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5214055A (en) * 1975-06-30 1977-02-02 Toto Ltd Urinal flushing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100457064B1 (en) * 1997-11-13 2005-05-27 주식회사 대우일렉트로닉스 Method for detecting in contour information

Also Published As

Publication number Publication date
JP2562540B2 (en) 1996-12-11

Similar Documents

Publication Publication Date Title
US5113493A (en) Full speed animation system for low-speed computers and method
JP2562540B2 (en) Figure processing method
JPS6282472A (en) Picture processing system
JPH087117A (en) Graphic processing method
JPH02217897A (en) Picture element density conversion system
JP3551459B2 (en) Image deformation method and apparatus
JP2921975B2 (en) Handwritten document creation device
JP2737845B2 (en) Character processing method and apparatus
JPS58139179A (en) Character display unit
JPH0728444A (en) Method for revising tone of image data
JP2771350B2 (en) Image processing device
JP2652748B2 (en) Character processor
JP2803746B2 (en) Character processing method and apparatus
JPH11149522A (en) Handwritten character input device and computer readable recording medium recorded with handwritten character input program
JPH0573693A (en) Outline paint out system
JPS62157089A (en) Generation of vector character
JPH06242770A (en) Display screen controller
JPH06314089A (en) Character display device
JPH0561630A (en) Method for displaying multiwindow of image display device
US20060101389A1 (en) Image display control apparatus and program and method therefor
JPH06332436A (en) Transfer device for bit map data
JPH08202333A (en) Character processor
JPH01134494A (en) Data processor having character expanding function
JPH04367929A (en) Display system for selected vector character
JPH03282496A (en) Character pattern generating device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19960716