JPH07230553A - Graphic drawing method - Google Patents

Graphic drawing method

Info

Publication number
JPH07230553A
JPH07230553A JP6043275A JP4327594A JPH07230553A JP H07230553 A JPH07230553 A JP H07230553A JP 6043275 A JP6043275 A JP 6043275A JP 4327594 A JP4327594 A JP 4327594A JP H07230553 A JPH07230553 A JP H07230553A
Authority
JP
Japan
Prior art keywords
contour
image
extracted
graphic
buffer
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.)
Pending
Application number
JP6043275A
Other languages
Japanese (ja)
Inventor
Yuji Ishii
勇次 石井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP6043275A priority Critical patent/JPH07230553A/en
Publication of JPH07230553A publication Critical patent/JPH07230553A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To draw a graphic with the inside of its contour painted out without any new paint-out designation by painting out the inside of the contour based on the contour data and the information on the type of painting. CONSTITUTION:The graphic of a bit map system which is read out of an image scanner 6 is sent to a main buffer A and a subordinate buffer B of a video RAM 9 respectively. A CPU 1 refers to both buffers A and B to successively extract the contours of an image graphic from its outside and converts each contour into the contour data shown in a set of coordinate data. At the same time, the CPU 1 stores the color designation information (painting type information) accordant with each specific order of layes of the extracted contours into a graphic information memory 3b of a RAM 3 in accordance with each contour data. The color designation information is decided by the value of a color designation register 3C. Then the CPU 1 puts the non-transmissive graphics having the insides of their contours painted out on each other and evolves these graphics into the RAM 9 for each contour based on the color desipation information corresponding to each contour data.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、イメージ図形処理機
能を備えたパーソナルコンピュータやワードプロセッサ
等において、ビットマップ方式のイメージ図形から抽出
した輪郭を座標データの集合によって表現される輪郭デ
ータに変換して図形を描画する図形描画方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention converts a contour extracted from a bitmap image figure into contour data represented by a set of coordinate data in a personal computer or a word processor having an image figure processing function. The present invention relates to a graphic drawing method for drawing a graphic.

【0002】[0002]

【従来の技術】従来、この種のワードプロセッサ等にお
いてはイメージスキャナによって読み取ったビットマッ
プ方式のイメージ図形からその輪郭を抽出すると共に、
抽出した輪郭を座標データの集合によって表現された輪
郭データに変換したのち図形メモリに格納するようにし
ている。そして、図形出力時にはこの輪郭データに基づ
いて図形描画が行われるため、本来、イメージ図形の輪
郭内部が例えば黒色等によって塗りつぶされている場合
でも輪郭だけが描画出力されることになる。
2. Description of the Related Art Conventionally, in a word processor of this type, the contour is extracted from a bit map type image figure read by an image scanner, and
The extracted contour is converted into contour data represented by a set of coordinate data and then stored in the graphic memory. Since a graphic is drawn based on this outline data when outputting a graphic, only the outline is drawn and output even if the inside of the outline of the image graphic is originally filled with, for example, black.

【0003】[0003]

【発明が解決しようとする課題】したがって、イメージ
図形と同様に輪郭内部を塗りつぶした図形を描画出力さ
せる場合には、その内部を改めて塗り指定しなければな
らず、特に多層の輪郭を持つ図形において輪郭毎に塗り
指定を行うことはユーザにそれだけ大きな負担をかける
という欠点があった。この発明の課題は、ビットマップ
イメージ図形から抽出した輪郭を座標データに変換して
図形を描画する図形描画装置において、改めて塗り指定
を行わなくても輪郭内部を塗りつぶした図形を描画でき
るようにすることである。この発明の他の課題は、ビッ
トマップイメージ図形から抽出した輪郭を座標データに
変換して図形を描画する図形描画装置において、多層の
輪郭を持つイメージ図形の各輪郭に対応付けて輪郭内部
を塗りつぶした非透過図形を重ね合せて描画できるよう
にすることである。
Therefore, in the case of drawing and outputting a figure in which the inside of the contour is filled in similarly to the image figure, the inside must be designated again for painting, especially in a figure having a multi-layered outline. There is a drawback in that the designation of painting for each contour places a great burden on the user. SUMMARY OF THE INVENTION An object of the present invention is to enable a graphic drawing device which converts a contour extracted from a bitmap image graphic into coordinate data and draws the graphic, and draw a graphic in which the inside of the contour is filled without newly designating the paint. That is. Another object of the present invention is to fill the inside of a contour by associating it with each contour of an image figure having a multi-layered contour in a figure drawing device that transforms the contour extracted from a bitmap image figure into coordinate data and draws the figure. It is to make it possible to draw non-transparent figures by overlapping.

【0004】[0004]

【課題を解決するための手段およびその作用】第1の発
明(請求項(1)記載の発明)の手段およびその作用は
次の通りである。ビットマップ方式のイメージ図形から
その輪郭を抽出し、抽出した輪郭を座標データの集合に
よって表現される輪郭データに変換すると共に、この輪
郭データに対応付けて所定の塗り種情報を設定し、前記
輪郭データと塗り種情報とに基づいて輪郭内部を塗りつ
ぶした図形を描画する。ここで、塗り種情報とは例えば
色指定情報である。したがって、ビットマップイメージ
図形から抽出した輪郭を座標データに変換して図形を描
画する図形描画装置において、改めて塗り指定を行わな
くても輪郭内部を塗りつぶした図形を描画することがで
きる。第2の発明(請求項(2)記載の発明)の手段お
よびその作用は次の通りである。多層の輪郭を持つビッ
トマップ方式のイメージ図形の輪郭をその外側から順次
抽出し、抽出した各輪郭を座標データの集合によって表
現される輪郭データにそれぞれ変換すると共に、抽出し
た輪郭が何層目にあたるかに応じた塗り種情報を各輪郭
データに対応付けて設定し、前記各輪郭データと塗り種
情報とに基づいて各輪郭毎に輪郭内部を塗りつぶした非
透過図形を重ね合せて描画する。なお、多層の輪郭を持
つビットマップ方式のイメージ図形をそれぞれ保持する
メインメモリとサブメモリを設け、前記メインメモリに
格納されているイメージ図形の輪郭をその外側から抽出
した後、当該輪郭内部を消去し、前記サブメモリに格納
されているイメージ図形の当該輪郭内部を反転し、その
内容を前記メインメモリに転送する、動作を繰り返すこ
とによって多層の輪郭を持つイメージ図形の輪郭を外側
から順次抽出するようにしてもよい。この場合、前記サ
ブメモリの内容を前記メインメモリに転送する際に、塗
り種情報を更新するようにしてもよい。更に、多層の輪
郭を持つビットマップ方式のイメージ図形の輪郭をその
外側から順次抽出した場合、その抽出順序にしたがって
各輪郭に対応する非透過図形を重ね合せて順次描画する
ようにしてもよい。したがって、ビットマップイメージ
図形から抽出した輪郭を座標データに変換して図形を描
画する図形描画装置において、改めて塗り指定を行わな
くても輪郭内部を塗りつぶした図形を描画することがで
きる。
Means for Solving the Problem and Its Action The means and action of the first invention (the invention of claim 1) are as follows. The contour is extracted from a bitmap image figure, the extracted contour is converted into contour data represented by a set of coordinate data, and predetermined paint type information is set in association with the contour data. Drawing a shape with the inside of the outline filled based on the data and the paint type information. Here, the paint type information is, for example, color designation information. Therefore, in a figure drawing apparatus that draws a figure by converting the contour extracted from the bitmap image figure into coordinate data, it is possible to draw the figure in which the inside of the contour is filled without newly designating the painting. Means and operation of the second invention (the invention according to claim (2)) are as follows. The contours of a bitmapped image figure having a multi-layered contour are sequentially extracted from the outside, and each extracted contour is converted into contour data represented by a set of coordinate data, and the extracted contour corresponds to what layer. The paint type information corresponding to the setting is set in association with each contour data, and the non-transparent figure in which the inside of the contour is painted is superimposed and drawn for each contour based on the contour data and the paint type information. It should be noted that a main memory and a sub-memory for respectively holding a bitmap type image figure having a multi-layered outline are provided, and the outline of the image figure stored in the main memory is extracted from outside, and then the inside of the outline is erased. Then, the inside of the contour of the image figure stored in the sub memory is inverted, and the content is transferred to the main memory. By repeating the operation, the contours of the image figure having a multi-layered contour are sequentially extracted from the outside. You may do it. In this case, the paint type information may be updated when the contents of the sub memory are transferred to the main memory. Further, when the contours of a bitmap type image figure having a multi-layered contour are sequentially extracted from the outside, non-transparent figures corresponding to the respective contours may be superimposed and sequentially drawn. Therefore, in a figure drawing apparatus that draws a figure by converting the contour extracted from the bitmap image figure into coordinate data, it is possible to draw the figure in which the inside of the contour is filled without newly designating the painting.

【0005】[0005]

【実施例】以下、図1〜図8を参照して一実施例を説明
する。図1はイメージ図形処理機能を備えたワードプロ
セッサのブロック構成図である。CPU1はROM2、
RAM3に格納されている各種プログラムにしたがって
このワードプロセッサの全体動作を制御する中央演算処
理装置であり、ROM2内の入出力制御プログラムにし
たがって周辺デバイスであるキーボード4、表示部5、
イメージスキャナ6、フロッピーディスク7に対する入
出力動作を制御する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment will be described below with reference to FIGS. FIG. 1 is a block diagram of a word processor having an image figure processing function. CPU1 is ROM2,
A central processing unit for controlling the overall operation of this word processor according to various programs stored in the RAM 3, and a keyboard 4, a display unit 5, which are peripheral devices, according to an input / output control program in the ROM 2.
It controls input / output operations for the image scanner 6 and the floppy disk 7.

【0006】即ち、CPU1はキーボード4から入力さ
れたキー操作信号をキーコードに変換して保持する入力
制御部8をアクセスし、それが文字コードであれば表示
データに変換してビデオRAM(VRAM)9に書き込
むと共に、RAM3内の文書メモリ3aに格納する。な
お、表示制御部10はビデオRAM9をアクセスしてそ
の内容を表示部5のテキスト画面から表示出力させる。
また、CPU1はキーボード4からイメージ図形の入力
モードが指示されると、イメージスキャナ6を読み取り
可能状態にセットする。更に、CPU1はキーボード4
から文書保存指令が入力されると、文書メモリ3a内の
文書データを外部記憶制御部11に転送し、フロッピー
ディスク7へ登録保存させる。
That is, the CPU 1 accesses the input control unit 8 which converts a key operation signal input from the keyboard 4 into a key code and holds it, and if it is a character code, converts it into display data and converts it into a video RAM (VRAM). ) 9 and store it in the document memory 3 a in the RAM 3. The display control unit 10 accesses the video RAM 9 to display and output the contents on the text screen of the display unit 5.
Further, the CPU 1 sets the image scanner 6 in the readable state when the input mode of the image figure is instructed from the keyboard 4. Further, the CPU 1 is a keyboard 4
When a document save command is input from, the document data in the document memory 3a is transferred to the external storage control unit 11 and registered and saved in the floppy disk 7.

【0007】イメージスキャナ6から読み取られたビッ
トマップ方式のイメージ図形はビデオRAM9内のメイ
ンバッファAとサブバッファBにそれぞれ転送される。
このメインバッファA、サブバッファBは多層の輪郭を
持つイメージ図形の輪郭をその外側から順次抽出するた
めに設けられたもので、CPU1はこのメインバッファ
A、サブバッファBを参照してイメージ図形の輪郭をそ
の外側から順次抽出すると、抽出した各輪郭を座標デー
タの集合によって表わされる輪郭データにそれぞれ変換
すると共に、抽出した輪郭が何層目にあたるかに応じた
色指定情報(塗り種情報)を各輪郭データに対応付けて
RAM3内の図形情報メモリ3bに格納する。この場
合、色指定情報はRAM3内の色指定レジスタ3cの値
にしたがって指定されるもので、本実施例において色指
定レジスタ3cの値が偶数の時には黒色などの塗り表現
色、奇数の時には白色などの背景色が指定される。
Bit map type image figures read by the image scanner 6 are transferred to a main buffer A and a sub buffer B in the video RAM 9, respectively.
The main buffer A and the sub-buffer B are provided to sequentially extract the contours of the image figure having a multi-layered contour from the outside, and the CPU 1 refers to the main buffer A and the sub-buffer B to create the image figure. When the contours are sequentially extracted from the outside, each extracted contour is converted into contour data represented by a set of coordinate data, and color specification information (paint type information) according to the number of layers of the extracted contour It is stored in the graphic information memory 3b in the RAM 3 in association with each contour data. In this case, the color designation information is designated according to the value of the color designation register 3c in the RAM 3, and in the present embodiment, when the value of the color designation register 3c is an even number, a paint expression color such as black, and when the value is an odd number, white or the like. Background color is specified.

【0008】ここで、RAM3内の図形情報メモリ3b
は図6に示すように色指定レジスタ3cの値(色指定情
報)を記憶する色指定領域と輪郭データを記憶する輪郭
データ領域が設けられており、イメージ図形から抽出し
た輪郭の抽出順序にしたがってその先頭から輪郭データ
が順次格納されている。この図形情報メモリ3bの内容
をその並び順にしたがって順次読み出すことによりCP
U1は図形描画を行うが、その際、CPU1は図形情報
メモリ3b内の各輪郭データとそれに対応する色指定情
報とに基づいて各輪郭毎に輪郭内部を塗りつぶした非透
過図形を重ね合せてビデオRAM9内に展開してゆく。
Here, the graphic information memory 3b in the RAM 3
As shown in FIG. 6, a color designation area for storing the value (color designation information) of the color designation register 3c and a contour data area for storing contour data are provided, and according to the extraction order of the contours extracted from the image figure. The contour data is sequentially stored from the beginning. By reading the contents of the graphic information memory 3b sequentially in the order of arrangement, the CP
U1 draws a figure, and at this time, the CPU 1 superimposes a non-transparent figure in which the inside of the contour is filled for each contour on the basis of each contour data in the figure information memory 3b and the corresponding color designation information and video. It develops in RAM9.

【0009】次に、本実施例の動作を図2〜図8を参照
して説明する。図2はイメージスキャナ6から読み取ら
れたイメージ図形を解析して図形情報メモリ3bに設定
する図形解析処理を示したフローチャート、また図3〜
図5はこの処理過程を例示したもので、以下、図3〜図
5を参照しながらこの図形解析処理を具体的に説明する
ものとする。先ず、イメージスキャナ6から読み取られ
たビットマップ方式のイメージ図形をビデオRAM9内
のメインバッファA、サブバッファBにそれぞれ転送す
ると共に(ステップS1)、色指定レジスタ3cに初期
値“0”をセットしておく(ステップS2)。ここで、
図3の(1)は同心円状に2層構造を成す輪郭を持った
2つのイメージ図形がそれぞれメインバッファA、サブ
バッファBに格納された状態を示している。この時、色
指定レジスタ3cには“0”がセットされている。
Next, the operation of this embodiment will be described with reference to FIGS. 2 is a flow chart showing a graphic analysis process of analyzing an image graphic read by the image scanner 6 and setting it in the graphic information memory 3b, and FIGS.
FIG. 5 exemplifies this processing step, and the figure analysis processing will be specifically described below with reference to FIGS. 3 to 5. First, the bit map type image figure read from the image scanner 6 is transferred to the main buffer A and the sub buffer B in the video RAM 9 (step S1), and the initial value "0" is set in the color designation register 3c. (Step S2). here,
FIG. 3A shows a state in which two image figures having a concentric two-layered outline are stored in the main buffer A and the sub-buffer B, respectively. At this time, "0" is set in the color designation register 3c.

【0010】この状態において、サブバッファBは空か
をチェックする(ステップS3)。この場合、サブバッ
ファBには図3の(1)に示すようにイメージ図形が格
納されているので、次のステップS4に進み、サブバッ
ファBの内容をそのままメインバッファAに転送する処
理が行われるが、いま、メインバッファA、サブバッフ
ァBには同一のイメージ図形が格納されているので、メ
インバッファA、サブバッファBの内容は図3の(1)
に示すイメージ図形のままとなる。
In this state, it is checked whether the sub-buffer B is empty (step S3). In this case, since image graphics are stored in the sub-buffer B as shown in (1) of FIG. 3, the process proceeds to the next step S4, and the process of transferring the contents of the sub-buffer B to the main buffer A as they are is performed. However, since the same image figure is stored in the main buffer A and the sub-buffer B now, the contents of the main buffer A and the sub-buffer B are (1) in FIG.
It remains the image figure shown in.

【0011】次に、メインバッファAをアクセスし、メ
インバッファAに格納されている2種類のイメージ図形
のうちその1つ目のイメージ図形(図中、左上のイメー
ジ図形)を指定し、その外側の輪郭を抽出する(ステッ
プS5)。図3の(2)は1つ目のイメージ図形の輪郭
として輪郭を抽出する場合を示している。次に色指定
レジスタ3cの値(色指定情報)を図形情報メモリ3b
の色指定領域に書き込むと共に(ステップS6)、メイ
ンバッファAから抽出した輪郭を座標データの集合によ
って表わされる輪郭データに変換したのち、この輪郭デ
ータを図形情報メモリ3bの輪郭データ領域に書き込む
(ステップS7)。図6(1)はこの場合における図形
情報メモリ3bの内容を示している。
Next, the main buffer A is accessed, the first image figure (the image figure at the upper left in the figure) of the two types of image figures stored in the main buffer A is designated, and the outside thereof is designated. Is extracted (step S5). (2) of FIG. 3 shows a case where a contour is extracted as the contour of the first image figure. Next, the value (color designation information) of the color designation register 3c is stored in the graphic information memory 3b.
(Step S6), the contour extracted from the main buffer A is converted into contour data represented by a set of coordinate data, and the contour data is written in the contour data area of the graphic information memory 3b (step S6). S7). FIG. 6A shows the contents of the graphic information memory 3b in this case.

【0012】そして、メインバッファAから抽出した輪
郭に基づいてその内部のイメージ図形をメインバッファ
Aから全て消去すると共に(ステップS8)、サブバッ
ファBをアクセスし、このサブバッファB内のイメージ
図形のうちメインバッファAから抽出した輪郭に対応す
る輪郭内部のイメージ図形を反転する(ステップS
9)。図3の(3)はこの状態を示し、メインバッファ
Aからは輪郭の内部が全て消去され、サブバッファB
においては輪郭に対応してその内部のイメージ図形が
反転される。
Then, based on the contours extracted from the main buffer A, all the image figures inside thereof are erased from the main buffer A (step S8), the sub-buffer B is accessed, and the image figures in this sub-buffer B are accessed. The image figure inside the contour corresponding to the contour extracted from the main buffer A is inverted (step S
9). (3) of FIG. 3 shows this state, in which the entire inside of the contour is erased from the main buffer A and the sub-buffer B
In, the image figure inside is inverted corresponding to the contour.

【0013】次に、メインバッファAは空かをチェック
するが(ステップS10)、この場合、図3の(3)に
示すように2つ目のイメージ図形がメインバッファAに
残っているので、ステップS5に戻り、この2つ目のイ
メージ図形の外側から輪郭を抽出する(図4(4)参
照)。そして、図形情報メモリ3bに色指定レジスタ3
cの値を書き込むと共に(ステップS6)、この輪郭
を座標値とする輪郭データに変換して図形情報メモリ3
bに書き込む(ステップS7)。図6の(2)はこの場
合における図形情報メモリ3bの内容を示している。次
に、図4の(5)に示すようにこの輪郭で囲まれた内
部のイメージ図形をメインバッファAから消去すると共
に(ステップS8)、サブバッファBにおいて、この輪
郭に対応するその内部のイメージ図形を反転する(ス
テップS9)。
Next, it is checked whether or not the main buffer A is empty (step S10). In this case, since the second image figure remains in the main buffer A as shown in (3) of FIG. Returning to step S5, the contour is extracted from the outside of this second image figure (see FIG. 4 (4)). Then, the color designation register 3 is added to the graphic information memory 3b.
The value of c is written (step S6), the contour is converted into contour data having coordinate values, and the graphic information memory 3
Write to b (step S7). FIG. 6B shows the contents of the graphic information memory 3b in this case. Next, as shown in (5) of FIG. 4, the internal image figure surrounded by this contour is erased from the main buffer A (step S8), and in the sub-buffer B, the internal image corresponding to this contour is deleted. The figure is reversed (step S9).

【0014】ここで、メインバッファAは空となるの
で、そのことがステップS10で検出されてステップS
11に進み、色指定レジスタ3cの値に「1」を加算し
てその値をインクリメントする。この場合、色指定レジ
スタ3cの値は“1”となる。そして、ステップS3に
戻るが、この場合、図4の(5)に示すようにサブバッ
ファBにはイメージ図形が残っているので、サブバッフ
ァBの内容をメインバッファAに転送する(ステップS
4)。図4の(6)はこの場合におけるメインバッファ
A、サブバッファBの内容を示している。
Here, since the main buffer A becomes empty, this is detected in step S10 and step S10 is executed.
In step 11, "1" is added to the value of the color designation register 3c and the value is incremented. In this case, the value of the color designation register 3c becomes "1". Then, returning to step S3, in this case, since the image figure remains in the sub-buffer B as shown in (5) of FIG. 4, the content of the sub-buffer B is transferred to the main buffer A (step S).
4). FIG. 4 (6) shows the contents of the main buffer A and the sub buffer B in this case.

【0015】次に、上述と同様にステップS5〜S9が
実行される結果、先ず、メインバッファAから1つ目の
イメージ図形の残りの輪郭が抽出される(図4の
(7)参照)。そして、この輪郭に基づいてメインバ
ッファAの内容が消去されると共にサブバッファBの内
容が反転されるので、メインバッファA、サブバッファ
Bの内容は図5の(8)に示す如くとなる。なお、この
場合、図形情報メモリ3bの内容は図6の(3)に示す
如くとなる。
Next, as a result of performing steps S5 to S9 in the same manner as described above, first, the remaining contour of the first image figure is extracted from the main buffer A (see (7) in FIG. 4). Then, since the contents of the main buffer A are erased and the contents of the sub-buffer B are inverted based on this contour, the contents of the main buffer A and the sub-buffer B are as shown in (8) of FIG. In this case, the contents of the graphic information memory 3b are as shown in (3) of FIG.

【0016】次に、ステップS10でメインバッファA
が空でないことが検出されるので、再びステップS5〜
S9の実行に移る。この結果、メインバッファAから2
つ目のイメージ図形の残りの輪郭が抽出される(図5
の(9)参照)。そして、この輪郭に基づいてメイン
バッファAの内容が消去、サブバッファBの内容が反転
されると、図5の(10)に示すようにメインバッファ
A、サブバッファBは共に空となり、また図形情報メモ
リ3bの内容は図6の(4)に示す如くとなる。
Next, in step S10, the main buffer A
Since it is detected that is not empty, steps S5 to S5 are executed again.
Move on to execution of S9. As a result, from main buffer A to 2
The remaining contours of the second image figure are extracted (Fig. 5).
(9)). Then, when the contents of the main buffer A are erased and the contents of the sub-buffer B are inverted based on this contour, both the main buffer A and the sub-buffer B become empty as shown in (10) of FIG. The contents of the information memory 3b are as shown in (4) of FIG.

【0017】この結果、図形情報メモリ3bには1つ目
および2つ目のイメージ図形の外側の輪郭、に対応
して色指定情報として“0”、また1つ目および2つ目
のイメージ図形の内側の輪郭、に対応して色指定情
報として“0”が設定される。つまり、各イメージ図形
の外側の輪郭、に対応して黒色の表現色、また、各
イメージ図形の内側の輪郭、に対応して白色の背景
色が指定される。
As a result, the graphic information memory 3b stores "0" as the color designation information corresponding to the outer contours of the first and second image figures, and the first and second image figures. "0" is set as the color designation information corresponding to the inside contour of. That is, a black expression color is designated corresponding to the outer contour of each image figure, and a white background color is designated corresponding to the inner contour of each image figure.

【0018】なお、上述の例では2つのイメージ図形が
それぞれ2層構造の場合を示したが、1つのイメージ図
形が3層以上の輪郭によって構成されている場合も同様
であり、色指定情報はその値が偶数のとき黒色の表現
色、奇数のとき白色の背景色が設定される。
In the above example, the two image figures each have a two-layer structure. However, the same applies when one image figure is composed of contours of three or more layers, and the color designation information is A black expression color is set when the value is even, and a white background color is set when the value is odd.

【0019】また、上述の例では外側の輪郭と内側の輪
郭との間を黒色、内側の輪郭内を白色とした場合を示し
たが、図7に示すように黒色、白色を逆にした場合も同
様である。図7はこの場合におけるメインバッファA、
サブバッファBの内容を示し、先ず、図7の(1)に示
すように同一のイメージ図形がメインバッファA、サブ
バッファBに初期設定されている状態においては、色指
定レジスタ3cの値は“0”となる。この状態において
メインバッファAから外側の輪郭を抽出してその内部
を消去すると共に、この輪郭に基づいてサブバッファ
Bの内容を反転すると図7の(2)に示す如くとなる。
この場合、サブバッファB内のイメージ図形は本来の図
形から輪郭の部分が取り除かれたものとなり、サイズ
的にひと回り小さなものとなる。次に、図7の(3)に
示すようにサブバッファBの内容をメインバッファAに
転送した状態において、輪郭が抽出されると共に色指
定レジスタ3cの値が更新されて「1」となる。そし
て、この輪郭に基づいてメインバッファAの内容が消
去、サブバッファBの内容が反転されると、図7の
(4)に示す如くとなる。更にサブバッファBの内容を
メインバッファAに転送した状態において輪郭が抽出
されると共に色指定レジスタ3cの値が更新されて
「2」となる(図7の(5)参照)。その後、この輪郭
に基づいてメインバッファAの内容が消去、サブバッ
ファBの内容が反転されると図7の(6)に示すように
メインバッファA、サブバッファBとも空となる。この
結果、輪郭は黒色、輪郭は白色、輪郭は黒色が指
定されることになる。
Further, in the above example, the case where the outer contour and the inner contour are black and the inner contour is white is shown. However, as shown in FIG. 7, black and white are reversed. Is also the same. FIG. 7 shows the main buffer A in this case,
The contents of the sub-buffer B are shown. First, when the same image figure is initially set in the main buffer A and the sub-buffer B as shown in (1) of FIG. 7, the value of the color designation register 3c is " It becomes 0 ". In this state, the outer contour is extracted from the main buffer A to erase the inside thereof, and the contents of the sub-buffer B are inverted based on this contour, as shown in (2) of FIG. 7.
In this case, the image figure in the sub-buffer B has a contour part removed from the original figure, which is one size smaller. Next, in the state where the contents of the sub-buffer B are transferred to the main buffer A as shown in (3) of FIG. 7, the contour is extracted and the value of the color designation register 3c is updated to "1". Then, when the contents of the main buffer A are erased and the contents of the sub-buffer B are inverted based on this contour, it becomes as shown in (4) of FIG. Further, while the contents of the sub-buffer B are transferred to the main buffer A, the contour is extracted and the value of the color designation register 3c is updated to "2" (see (5) in FIG. 7). After that, when the contents of the main buffer A are erased and the contents of the sub-buffer B are inverted based on this contour, both the main buffer A and the sub-buffer B become empty as shown in (6) of FIG. As a result, the contour is designated as black, the contour is designated as white, and the contour is designated as black.

【0020】図8は図形情報メモリ3bの内容に基づい
て図形をビデオRAM9に展開して表示出力させる図形
描画処理を説明するための図である。いま、図形情報メ
モリ3bには図6の(4)に示すデータが格納されてい
るものとする。先ず、CPU1は図形情報メモリ3bの
トップアドレス領域から輪郭のデータとそれに対応す
る色指定情報を読み出す。この場合、黒色が指定されて
いるので、CPU1はこの輪郭のデータに基づいて黒
色の非透過図形を描画する(図8(1)参照)。次に、
図形情報メモリ3bのアドレスを更新して次の輪郭の
データとそれに対応する色指定情報を読み出す。この場
合においても黒色が指定されているので、輪郭の図形
を黒色の非透過図形で描画する(図8(2)参照)。更
に、CPU1は図形情報メモリ3bのアドレスを更新し
て次の輪郭のデータと色指定情報を読み出す。この場
合、白色が指定されているので、図8の(3)に示すよ
うに白色の非透過図形を輪郭の図形に重ね合せて描画
する。次の輪郭も白色が指定されているので、図8の
(4)に示すように白色の非透過図形を輪郭の図形に
重ね合せて描画する。
FIG. 8 is a diagram for explaining a graphic drawing process in which a graphic is developed in the video RAM 9 and displayed and output based on the contents of the graphic information memory 3b. Now, it is assumed that the graphic information memory 3b stores the data shown in (4) of FIG. First, the CPU 1 reads contour data and corresponding color designation information from the top address area of the graphic information memory 3b. In this case, since black is designated, the CPU 1 draws a black non-transparent figure based on the contour data (see FIG. 8 (1)). next,
The address of the graphic information memory 3b is updated to read the next contour data and the corresponding color designation information. In this case as well, since black is designated, the contour figure is drawn as a black non-transparent figure (see FIG. 8 (2)). Further, the CPU 1 updates the address of the graphic information memory 3b to read the data of the next contour and the color designation information. In this case, since white is designated, as shown in (3) of FIG. 8, a white non-transmissive figure is overlaid and drawn on the contour figure. Since the next contour is also designated as white, as shown in (4) of FIG. 8, a white non-transparent figure is superimposed and drawn on the contour figure.

【0021】以上のように本実施例においては、イメー
ジスキャナ6から読み取ったイメージ図形をメインバッ
ファA、サブバッファBにそれぞれ書き込んだのち、メ
インバッファAに格納されているイメージ図形の輪郭を
その外側から抽出すると共に当該輪郭内部を消去し、サ
ブバッファBに格納されているイメージ図形の当該輪郭
内部を反転してメインバッファAに転送する動作を繰り
返すことにより、多層の輪郭を持つイメージ図形の輪郭
をその外側から順次抽出することが可能となる。この場
合、サブバッファBの内容をメインバッファAに転送す
る際に色指定レジスタ3cの値が更新されるので、抽出
された各輪郭に対応付けて黒色、白色の色指定が可能と
なる。また、図形描画の際は、抽出された輪郭の順序、
つまり、外側の輪郭から輪郭内部を順次塗りつぶした非
透過図形を重ね合せて描画するので、後から順番を組み
直す必要はなく、内側の輪郭から描画する場合に比べて
図形描画を高速に処理することが可能となる。
As described above, in the present embodiment, the image figure read by the image scanner 6 is written in the main buffer A and the sub-buffer B, respectively, and then the outline of the image figure stored in the main buffer A is outside thereof. The outline of the image figure having the multi-layered outline is extracted by repeating the operation of extracting from the Can be sequentially extracted from the outside. In this case, since the value of the color designation register 3c is updated when the contents of the sub-buffer B are transferred to the main buffer A, black and white colors can be designated in association with the extracted contours. Also, when drawing a figure, the order of the extracted contours,
In other words, since non-transparent figures that are filled inside the contour from the outer contour are sequentially drawn, there is no need to rearrange the order later, and the figure drawing can be processed faster than when drawing from the inner contour. Is possible.

【0022】なお、上記実施例はイメージ図形から順次
抽出した各輪郭に対応付けて色指定情報を設定したが、
例えば、ハッチングパターンや散点模様等の塗り種パタ
ーンを各輪郭に対応付けて設定するようにしてもよい。
In the above embodiment, the color designation information is set in association with each contour sequentially extracted from the image figure.
For example, a paint type pattern such as a hatching pattern or a scattered pattern may be set in association with each contour.

【0023】[0023]

【発明の効果】この発明によれば、ビットマップイメー
ジ図形から抽出した輪郭を座標データに変換して図形を
描画する図形描画装置において、改めて塗り指定を行わ
なくても輪郭内部を塗りつぶした図形を描画することが
できる。また、多層の輪郭を持つイメージ図形の各輪郭
に対応付けて輪郭内部を塗りつぶした非透過図形を重ね
合せて描画することができる。
According to the present invention, in a graphic drawing apparatus for converting a contour extracted from a bitmap image graphic into coordinate data and drawing the graphic, a graphic in which the inside of the contour is painted can be drawn even if the paint is not designated again. Can be drawn. Further, it is possible to draw non-transparent figures in which the inside of the contour is filled so as to correspond to each contour of an image figure having a multi-layered contour.

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

【図1】実施例に係るイメージ図形処理機能付きワード
プロセッサの基本的なブロック構成図。
FIG. 1 is a basic block configuration diagram of a word processor having an image figure processing function according to an embodiment.

【図2】イメージスキャナ6から読み取ったイメージ図
形を解析して図形情報メモリ3bに設定する図形解析処
理を示したフローチャート。
FIG. 2 is a flowchart showing a graphic analysis process of analyzing an image graphic read by an image scanner 6 and setting it in a graphic information memory 3b.

【図3】イメージ図形の具体例を示すと共に図形解析処
理に応じてメインバッファA、サブバッファBの内容が
変遷する過程を示した図。
FIG. 3 is a diagram showing a specific example of an image figure and a process in which the contents of a main buffer A and a sub-buffer B change according to a figure analysis process.

【図4】図3に続くメインバッファA、サブバッファB
の変遷図。
FIG. 4 is a main buffer A and a sub buffer B following FIG.
Transition diagram of.

【図5】図4に続くメインバッファA、サブバッファB
の変遷図。
FIG. 5 is a main buffer A and a sub buffer B following FIG.
Transition diagram of.

【図6】図形解析処理に応じて設定される図形情報メモ
リ3bの内容を示した図。
FIG. 6 is a diagram showing the contents of a graphic information memory 3b set according to graphic analysis processing.

【図7】他のイメージ図形の具体例を示すと共に図形解
析処理に応じてメインバッファA、サブバッファBの内
容が変遷する過程を示した図。
FIG. 7 is a diagram showing a specific example of another image figure and a process in which the contents of the main buffer A and the sub-buffer B change according to the figure analysis process.

【図8】図形情報メモリ3bの内容に基づいて図形を描
画する過程を示した図。
FIG. 8 is a diagram showing a process of drawing a figure based on the contents of the figure information memory 3b.

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

1 CPU 2 ROM 3 RAM 3b 図形情報メモリ 3c 色指定レジスタ 5 表示部 6 イメージスキャナ 9 ビデオRAM 10 表示制御部 A メインバッファ B サブバッファ 1 CPU 2 ROM 3 RAM 3b Graphic information memory 3c Color designation register 5 Display section 6 Image scanner 9 Video RAM 10 Display control section A Main buffer B Sub-buffer

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】ビットマップ方式のイメージ図形からその
輪郭を抽出し、 抽出した輪郭を座標データの集合によって表現される輪
郭データに変換すると共に、この輪郭データに対応付け
て所定の塗り種情報を設定し、 前記輪郭データと塗り種情報とに基づいて輪郭内部を塗
りつぶした図形を描画する、 ようにしたことを特徴とする図形描画方法。
1. A contour is extracted from a bitmap image figure, the contour is converted into contour data expressed by a set of coordinate data, and predetermined paint type information is associated with the contour data. A figure drawing method, characterized in that a figure in which the inside of the contour is filled is drawn based on the set contour data and the painting type information.
【請求項2】多層の輪郭を持つビットマップ方式のイメ
ージ図形の輪郭をその外側から順次抽出し、 抽出した各輪郭を座標データの集合によって表現される
輪郭データにそれぞれ変換すると共に、抽出した輪郭が
何層目にあたるかに応じた塗り種情報を各輪郭データに
対応付けて設定し、 前記各輪郭データと塗り種情報とに基づいて各輪郭毎に
輪郭内部を塗りつぶした非透過図形を重ね合せて描画す
る、 ようにしたことを特徴とする図形描画方法。
2. A contour of a bitmap type image figure having a multi-layer contour is sequentially extracted from the outside, and each extracted contour is converted into contour data expressed by a set of coordinate data, and the extracted contour is extracted. Is set by associating the paint type information according to the number of layers with each contour data, and overlaying the non-transparent figure in which the contour inside is filled for each contour based on the contour data and the paint type information. The drawing method is characterized in that
【請求項3】多層の輪郭を持つビットマップ方式のイメ
ージ図形をそれぞれ保持するメインメモリとサブメモリ
を設け、 前記メインメモリに格納されているイメージ図形の輪郭
をその外側から抽出した後、当該輪郭内部を消去し、 前記サブメモリに格納されているイメージ図形の当該輪
郭内部を反転し、その内容を前記メインメモリに転送す
る、 動作を繰り返すことによって多層の輪郭を持つイメージ
図形の輪郭を外側から順次抽出するようにしたことを特
徴とする請求項(2)記載の図形描画方法。
3. A main memory and a sub-memory for respectively holding a bitmap type image figure having a multi-layered contour are provided, and the contour of the image figure stored in the main memory is extracted from the outside, and then the contour is extracted. Erase the inside, invert the inside of the contour of the image figure stored in the sub-memory, and transfer the contents to the main memory. The figure drawing method according to claim 2, wherein the figures are sequentially extracted.
【請求項4】前記サブメモリの内容を前記メインメモリ
に転送する際に、塗り種情報を更新する、 ようにしたことを特徴とする請求項(2)および(3)
記載の図形描画方法。
4. The coating type information is updated when the contents of the sub memory are transferred to the main memory, (2) and (3)
Drawing method described.
【請求項5】多層の輪郭を持つビットマップ方式のイメ
ージ図形の輪郭をその外側から順次抽出した場合、その
抽出順序にしたがって各輪郭に対応する非透過図形を重
ね合せて順次描画する、 ようにしたことを特徴とする請求項(2)記載の図形描
画方法。
5. When the contours of a bit map type image figure having a multi-layered contour are sequentially extracted from the outside, non-transparent figures corresponding to the respective contours are superimposed and sequentially drawn. The graphic drawing method according to claim 2, wherein the graphic drawing method is performed.
JP6043275A 1994-02-18 1994-02-18 Graphic drawing method Pending JPH07230553A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6043275A JPH07230553A (en) 1994-02-18 1994-02-18 Graphic drawing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6043275A JPH07230553A (en) 1994-02-18 1994-02-18 Graphic drawing method

Publications (1)

Publication Number Publication Date
JPH07230553A true JPH07230553A (en) 1995-08-29

Family

ID=12659277

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6043275A Pending JPH07230553A (en) 1994-02-18 1994-02-18 Graphic drawing method

Country Status (1)

Country Link
JP (1) JPH07230553A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006209654A (en) * 2005-01-31 2006-08-10 Matsushita Electric Ind Co Ltd Pattern-equipped polygon drawing device
WO2014091638A1 (en) * 2012-12-12 2014-06-19 Necカシオモバイルコミュニケーションズ株式会社 Character recognition device, character recognition method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006209654A (en) * 2005-01-31 2006-08-10 Matsushita Electric Ind Co Ltd Pattern-equipped polygon drawing device
WO2014091638A1 (en) * 2012-12-12 2014-06-19 Necカシオモバイルコミュニケーションズ株式会社 Character recognition device, character recognition method, and program

Similar Documents

Publication Publication Date Title
JP2596690B2 (en) Method for correlating a cursor position with a display image and computer system provided with correlating means
JPH07230553A (en) Graphic drawing method
JPH0561405A (en) In-figure name display device
JP2663967B2 (en) Information storage control method
JPS6322590B2 (en)
JP2906643B2 (en) Document processing device
JP2672940B2 (en) Document processing device
JPH0525115B2 (en)
JP2634905B2 (en) How to paint shapes
JPH09128198A (en) Method for displaying plural pictures
JP2680076B2 (en) Multi-window screen display method
JP2616427B2 (en) String display device
JP2659907B2 (en) Document processing device
JP2616426B2 (en) String display device
JPH0146893B2 (en)
JPH0877337A (en) Image output device
JPS6048077A (en) Document information memory control system
JPH05101044A (en) Document processor
JPH0550013B2 (en)
JPH08314635A (en) Small-sized electronic equipment
JPH058435B2 (en)
JPH06236369A (en) Word processor and replacing method for page
JPS62229316A (en) Character processor
JPH08293031A (en) Document processor
JPH04188268A (en) Document processor