JPH0962849A - Printer device - Google Patents

Printer device

Info

Publication number
JPH0962849A
JPH0962849A JP7243852A JP24385295A JPH0962849A JP H0962849 A JPH0962849 A JP H0962849A JP 7243852 A JP7243852 A JP 7243852A JP 24385295 A JP24385295 A JP 24385295A JP H0962849 A JPH0962849 A JP H0962849A
Authority
JP
Japan
Prior art keywords
data
coordinate value
contour
bitmap
start point
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
JP7243852A
Other languages
Japanese (ja)
Inventor
Masaki Otani
正樹 大谷
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP7243852A priority Critical patent/JPH0962849A/en
Publication of JPH0962849A publication Critical patent/JPH0962849A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Dot-Matrix Printers And Others (AREA)

Abstract

(57)【要約】 【課題】 ビットマップ外字データから容易にベクター
データを生成できる。 【解決手段】 文字,図形およびイメージデータを包括
的に処理可能なコントローラを有し,かつ,ビットマッ
プ外字データの登録機能を有したプリンタ装置におい
て,前記ビットマップ外字データを上下左右・斜め上下
の八方向に1ドットずつ移動させて輪郭抽出用ビットイ
メージを作成し,作成した前記輪郭抽出用ビットイメー
ジと前記ビットマップ外字データとの排他的論理和を求
めることにより,前記ビットマップ外字データの輪郭デ
ータを抽出する輪郭抽出手段を備えたものである。
(57) [Abstract] [Problem] To easily generate vector data from bitmap external character data. In a printer device having a controller capable of comprehensively processing character, graphic, and image data and having a function of registering bitmap external character data, the bitmap external character data can be displayed vertically, horizontally, diagonally or vertically. A contour extraction bit image is created by moving one dot in each of the eight directions, and an exclusive OR of the created contour extraction bit image and the bitmap external character data is obtained to obtain the outline of the bitmap external character data. It is provided with a contour extracting means for extracting data.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は,プリンタ装置に関
し,より詳細には,ビットマップ外字データの輪郭デー
タをベクターデータとして生成するプリンタ装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer device, and more particularly to a printer device for generating contour data of bitmap external character data as vector data.

【0002】[0002]

【従来の技術】従来のプリンタ装置の一つとして,例え
ば,プリンタ装置に接続しているホスト装置からビット
マップ外字データをプリンタ装置内のメモリに登録可能
な装置がある。このようなプリンタ装置において,例え
ば,ビットマップ外字データを拡大して画像出力した場
合,ビットマップ外字データのドットが目立ってしまう
ため,ビットマップ外字データの輪郭を抽出してベクタ
ーデータを生成し,該ベクターデータを用いて拡大した
ビットマップ外字データの輪郭を修正することにより,
ドットが目立たないようにしている。
2. Description of the Related Art As one of conventional printer apparatuses, for example, there is an apparatus capable of registering bitmap external character data in a memory in the printer apparatus from a host apparatus connected to the printer apparatus. In such a printer device, for example, when the bitmap external character data is enlarged and output as an image, the dots of the bitmap external character data become conspicuous. Therefore, the contour of the bitmap external character data is extracted to generate vector data, By correcting the outline of the bitmap external character data enlarged using the vector data,
The dots are made inconspicuous.

【0003】[0003]

【発明が解決しようとする課題】しかしながら,従来の
プリンタ装置によれば,拡大したビットマップ外字デー
タのドットが目立たないように,ビットマップ外字デー
タの輪郭を抽出してベクダーデータを生成し,該ベクタ
ーデータを用いて拡大したビットマップ外字データの輪
郭を修正しているものの,ビットマップ外字データの輪
郭を抽出してベクダーデータを生成するのに時間が掛か
るという問題点があった。
However, according to the conventional printer device, the outline of the bitmap external character data is extracted to generate the vector data so that the dots of the enlarged bitmap external character data are not conspicuous, and the vector data is generated. Although the contour of the expanded bitmap character data is corrected using the data, there is a problem in that it takes time to extract the contour of the bitmap external character data and generate vector data.

【0004】本発明は上記に鑑みてなされたものであっ
て,ビットマップ外字データから容易にベクターデータ
を生成できるようにすることを目的とする。
The present invention has been made in view of the above, and it is an object of the present invention to easily generate vector data from bitmap external character data.

【0005】[0005]

【課題を解決するための手段】上記の目的を達成するた
めに,請求項1に係るプリンタ装置は,文字,図形およ
びイメージデータを包括的に処理可能なコントローラを
有し,かつ,ビットマップ外字データの登録機能を有し
たプリンタ装置において,前記ビットマップ外字データ
を上下左右・斜め上下の八方向に1ドットずつ移動させ
て輪郭抽出用ビットイメージを作成し,作成した前記輪
郭抽出用ビットイメージと前記ビットマップ外字データ
との排他的論理和を求めることにより,前記ビットマッ
プ外字データの輪郭データを抽出する輪郭抽出手段を備
えたものである。
In order to achieve the above object, a printer device according to a first aspect of the present invention has a controller capable of comprehensively processing character, graphic and image data, and a bitmap external character. In a printer having a data registration function, the bitmap external character data is moved by one dot in eight directions of up, down, left, right, and diagonally up and down to create a contour extraction bit image, and the created contour extraction bit image and Contour extraction means for extracting the contour data of the bitmap external character data by obtaining an exclusive OR with the bitmap external character data is provided.

【0006】また,請求項2に係るプリンタ装置は,ビ
ットマップ上の座標値を記憶する記憶手段と,前記輪郭
抽出手段で抽出した輪郭データを水平方向に走査し,最
初にドットが黒である点を開始点として設定し,前記開
始点の座標値を前記記憶手段に記憶させる開始点設定手
段とを備えたものである。
According to a second aspect of the present invention, the printer device scans the contour data extracted by the contour extraction means and the storage means for storing the coordinate values on the bit map in the horizontal direction, and the dots are initially black. A start point setting means for setting a point as a start point and storing the coordinate value of the start point in the storage means.

【0007】また,請求項3に係るプリンタ装置は,前
記開始点のドットを白に反転する反転手段を備えたもの
である。
The printer device according to a third aspect of the invention is provided with an inverting means for inverting the dot at the starting point to white.

【0008】また,請求項4に係るプリンタ装置は,前
記輪郭データ上の現在のドット位置から垂直方向,水平
方向の順で輪郭データをなぞり,水平方向にドットの位
置移動が発生した場合に該当するドットの座標値を今回
の開始点の座標値として設定し,前記今回の開始点の座
標値と前記記憶手段に記憶されている前回の開始点の座
標値とに基づいて傾きを算出し,前記今回の開始点の座
標値および傾きを前記記憶手段に記憶させる座標値・傾
き設定手段と,前記輪郭データ上で通過したドットの黒
を白に反転する反転手段とを備えたものである。
Further, the printer device according to a fourth aspect corresponds to a case where the contour data is traced in the order of the vertical direction and the horizontal direction from the current dot position on the contour data, and the dot position is moved in the horizontal direction. The coordinate value of the dot to be set is set as the coordinate value of the current start point, and the tilt is calculated based on the coordinate value of the current start point and the coordinate value of the previous start point stored in the storage means, The present invention is provided with a coordinate value / inclination setting means for storing the coordinate value and inclination of the current start point in the storage means, and an inversion means for inverting the black of the dot passed on the contour data to white.

【0009】また,請求項5に係るプリンタ装置は,前
記今回の開始点の傾きと前回の開始点の傾きとが同一か
否かを比較する比較手段と,前記比較手段の比較結果が
同一の場合に,前記記憶手段に記憶されている前記前回
の開始点の座標値および傾きを消去する消去手段と,前
記比較手段の比較結果が同一でない場合に,前前回の開
始点の座標値と前回の開始点の座標値および傾きをベク
ターデータとして確定するベクターデータ確定手段とを
備えたものである。
Further, in the printer device according to the fifth aspect, the comparison means for comparing whether or not the inclination of the start point of this time and the inclination of the start point of the previous time are the same, and the comparison result of the comparison means is the same. In this case, when the erasing means for erasing the coordinate value and inclination of the previous start point stored in the storage means and the comparison result of the comparing means are not the same, the coordinate value of the previous start point and the previous time And vector data determining means for determining the coordinate value and the slope of the starting point of the vector data as vector data.

【0010】また,請求項6に係るプリンタ装置は,前
記ベクターデータ確定手段で確定したベクターデータの
座標値に基づいて,前記ベクターデータを内包する最小
の矩形領域を検出する検出手段を備えたものである。
According to a sixth aspect of the present invention, the printer device further comprises a detecting means for detecting the smallest rectangular area containing the vector data based on the coordinate value of the vector data determined by the vector data determining means. Is.

【0011】[0011]

【発明の実施の形態】以下,本発明のプリンタ装置の一
実施例について図面を参照して詳細に説明する。図1
は,本実施例のプリンタ装置のコントローラ100の構
成図である。コントローラ100は,プリンタ装置全体
を制御するCPU101と,外部からフォントデータま
たはプログラムなどを供給するICカード102と,後
述するパネル装置109から入力されるモード指示の内
容などを記憶する不揮発RAM103と,プリンタ装置
を制御するための制御プログラムを記憶しているプログ
ラムROM104と,フォントを記憶しているフォント
ROM105と,CPU101のワークメモリ,入力デ
ータのインプットバッファ,プリントデータのページバ
ッファまたはダウンロードフォントのメモリなどに使用
する本発明の記憶手段としてのRAM106と,後述す
るプリンタエンジン107との通信を行うためのエンジ
ンインターフェース108と,後述するパネル装置10
9との通信を行うためのパネルインターフェース110
と,セントロニクスインターフェースやRS232Cか
らなり,後述するホスト装置111と通信を行うための
ホストインターフェース112と,後述するディスク装
置113との通信を行うためのディスクインターフェー
ス114とから構成している。なお,ホストインターフ
ェース112は,プリンタドライバの役割を果たすもの
である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the printer device of the present invention will be described in detail below with reference to the drawings. FIG.
FIG. 3 is a configuration diagram of a controller 100 of the printer device of the present embodiment. The controller 100 includes a CPU 101 that controls the entire printer device, an IC card 102 that externally supplies font data or programs, a non-volatile RAM 103 that stores the contents of a mode instruction input from a panel device 109, which will be described later, and a printer. In a program ROM 104 storing a control program for controlling the apparatus, a font ROM 105 storing fonts, a work memory of the CPU 101, an input data input buffer, a print data page buffer, a download font memory, etc. A RAM 106 as storage means of the present invention to be used, an engine interface 108 for communicating with a printer engine 107 described later, and a panel device 10 described later.
Panel interface 110 for communicating with
And a Centronics interface and RS232C, and a host interface 112 for communicating with a host device 111 described later and a disk interface 114 for communicating with a disk device 113 described later. The host interface 112 serves as a printer driver.

【0012】また,コントローラ100は,印字を行う
プリンタエンジン107と,プリンタ装置の状態を表示
したり,モード指示を入力するためのパネル装置109
と,プリンタ装置に印字データを出力するホスト装置1
11と,フロッピディスクやハードディスクに記憶され
ているフォントデータ,プログラム,印字データなどを
読み出すためのディスク装置113とが,前述したよう
に,エンジンインターフェース108,パネルインター
フェース110,ホストインターフェース112または
ディスクインターフェース114などを介して接続され
ている。
The controller 100 also has a printer engine 107 for printing and a panel device 109 for displaying the status of the printer device and for inputting a mode instruction.
And a host device 1 for outputting print data to a printer device
11, and the disk device 113 for reading font data, programs, print data, etc. stored in the floppy disk or hard disk, as described above, the engine interface 108, the panel interface 110, the host interface 112 or the disk interface 114. Are connected through.

【0013】なお,コントローラ100内のCPU10
1がプログラムROM104内の所定のプログラムを実
行することにより,本発明の輪郭抽出手段,開始点設定
手段,反転手段,座標値・傾き設定手段,比較手段,消
去手段,ベクターデータ確定手段および検出手段が実現
される。
The CPU 10 in the controller 100
1 executes a predetermined program in the program ROM 104, whereby the contour extracting means, the starting point setting means, the reversing means, the coordinate value / inclination setting means, the comparing means, the erasing means, the vector data confirming means and the detecting means of the present invention. Is realized.

【0014】次に,図を参照して,コントローラ100
のソフトウェア構成を説明する。図2は,コントローラ
100のソフトウェア構成図である。
Next, referring to the drawings, the controller 100
The software configuration of will be described. FIG. 2 is a software configuration diagram of the controller 100.

【0015】コントローラ100のソフトウェアは,大
別するとプリンタ装置のオペレーティングを行うプリン
タオペレーティングシステム201と,エンジンインタ
ーフェース108,パネルインターフェース110およ
びホストインターフェース112の通信を可能にするた
めの基礎のソフトウェアであるベイシックイン/アウト
システム202と,プリンタコマンド言語に基づいてプ
リンタ装置のコマンドを解釈するコマンド解釈部203
とから構成されている。
The software of the controller 100 is roughly divided into a printer operating system 201 for operating the printer device and a basic software which is basic software for enabling communication between the engine interface 108, the panel interface 110 and the host interface 112. / Out system 202 and a command interpreter 203 for interpreting commands of the printer device based on the printer command language
It is composed of

【0016】次に,図2に示すように,プリンタオペレ
ーティングシステム201は,プリントデータを描画デ
ータに変換する描画処理部204と,プリントの制御を
行うプリントコントロール205と,フォントを管理す
るフォントマネージャ206と,プリンタオペレーティ
ングシステム201内の動作タイミングの管理を行うス
ケジューラ207と,ICカード102,不揮発RAM
103,プログラムROM104,フォントROM10
5およびRAM106の各メモリを管理するメモリマネ
ージャ208とから構成される。
Next, as shown in FIG. 2, the printer operating system 201 includes a drawing processing unit 204 for converting print data into drawing data, a print control 205 for controlling printing, and a font manager 206 for managing fonts. A scheduler 207 for managing the operation timing in the printer operating system 201, the IC card 102, and the non-volatile RAM
103, program ROM 104, font ROM 10
5 and a memory manager 208 that manages each memory of the RAM 106.

【0017】次に,上記構成においてその基本動作を説
明する。ホスト装置111によってワープロなど作成さ
れた文書など印字データは,プリンタドライバであるエ
ンジンインターフェース108により,プリンタコマン
ド言語に翻訳される。翻訳された印字データは,ホスト
インターフェース112を通じプリンタオペレーティン
グシステム201を介してコマンド解釈部203に渡さ
れる。コマンド解釈部203は,プリンタコマンド言語
に翻訳された印字データに基づいて,ページ情報として
のプリントデータを作成していく。コマンド解釈部20
3で作成された1ページ分のプリントデータは,描画処
理部204によって描画データに変換される。
Next, the basic operation of the above structure will be described. Print data such as a document created by the host device 111 such as a word processor is translated into a printer command language by an engine interface 108 which is a printer driver. The translated print data is passed to the command interpreter 203 via the host operating system 112 and the printer operating system 201. The command interpreting unit 203 creates print data as page information based on the print data translated into the printer command language. Command interpreter 20
The print data for one page created in 3 is converted into drawing data by the drawing processing unit 204.

【0018】次に,描画処理部204はプリンタデータ
を描画データに変換する際,プリントデータに使用され
ているフォントデータ,すなわち,描画データに変換す
るために必要なフォントデータをフォントマネージャ2
06を介してフォントROM105から読み出す。ま
た,描画データに変換の際に必要となるメモリは,メモ
リマネージャ208を介して,RAM106内に確保さ
れる。この印字データに基づいてプリントデータを作成
し描画するまでの動作は,スケジューラ207で管理さ
れている動作タイミングに基づいて行われる。完成した
描画データは,ビットイメージとしてエンジンインター
フェース108を通してプリンタエンジン107に送ら
れ可視画像として画像出力される。
Next, when the drawing processing unit 204 converts the printer data into the drawing data, the font data used in the print data, that is, the font data necessary for converting into the drawing data is used by the font manager 2.
It is read from the font ROM 105 via 06. In addition, a memory required for conversion into drawing data is secured in the RAM 106 via the memory manager 208. The operation until the print data is created based on the print data and is drawn is performed based on the operation timing managed by the scheduler 207. The completed drawing data is sent as a bit image to the printer engine 107 through the engine interface 108 and is output as a visible image.

【0019】次に,上記構成および基本動作に基づい
て,ビットマップ外字データからベクターデータを求め
る動作について,図面を参照して説明する。図3は,ビ
ットマップ外字データを示した図である。
Next, the operation of obtaining the vector data from the bitmap external character data based on the above configuration and basic operation will be described with reference to the drawings. FIG. 3 is a diagram showing bitmap external character data.

【0020】ホスト装置111よりワープロなどで作成
されたビットマップ外字データは,プリンタコマンド言
語に基づいて,フォントマネージャ206によってRA
M106に登録される。登録されたビットマップ外字デ
ータは,フォントマネージャ206によりアウトライン
データに変換され,ビットマップ外字データとともに,
アウトラインデータもRAM106に登録される。な
お,アウトラインデータの登録は,以下説明する動作に
よって得られるベクターデータの登録によって行われ
る。
Bitmap external character data created by the host device 111 by a word processor or the like is RA-registered by the font manager 206 based on the printer command language.
It is registered in M106. The registered bitmap external character data is converted into outline data by the font manager 206, and together with the bitmap external character data,
Outline data is also registered in the RAM 106. The outline data is registered by registering vector data obtained by the operation described below.

【0021】まず,コントローラ100は,図3(a)
に示すようなビットマップ外字データを左右上下・斜め
上下の八方向に1ドットずつ移動させながら論理和で重
ね書きをして,図3(b)に示すような,輪郭抽出用ビ
ットイメージを作成する。次に,作成した輪郭抽出用ビ
ットイメージに基づいて,図3(a)に示す元のビット
マップ外字データとの排他的論理和で重ね書きして,図
3(c)のような1ドットの輪郭データを抽出する。
First, the controller 100 is shown in FIG.
Bit-map external character data as shown in Fig. 3 is overwritten by logical OR while moving one dot in each of the left, right, up and down directions and diagonally up and down, and creates a bit image for contour extraction as shown in Fig. 3 (b). To do. Next, based on the created contour extraction bit image, it is overwritten by exclusive OR with the original bitmap external character data shown in FIG. Extract the contour data.

【0022】次に,コントローラ100は,図3(c)
に示す左上端座標値を(0,0)とし,水平方向に黒の
ドットがないかスキャン(走査)して,最初にドットが
黒である点を開始点として,開始点の座標値(x0,y
0)をRAM106に記憶させるとともに,開始点のド
ットを白に反転する。なお,本実施例では,左上端座標
値を(0,0)としたが,ビットマップ外字データの四
隅であればどこでも良いことは,勿論である。
Next, the controller 100 is shown in FIG.
Is set to (0, 0), the horizontal direction is scanned for black dots (scanning), and the first black dot is the start point, and the start point coordinate value (x0 , Y
0) is stored in the RAM 106 and the dot at the starting point is inverted to white. In the present embodiment, the upper left corner coordinate value is set to (0, 0), but it goes without saying that it may be any four corners of the bitmap external character data.

【0023】ここで,座標値の傾きの説明を簡単にする
ために,図3および図4を参照して説明する。図4は,
ベクターデータの傾きを示す図である。次に,コントロ
ーラ100のCPU101は,開始点のドットから,図
3(c)示す輪郭データ上で黒であるドットを垂直方
向,水平方向の順になぞっていき,図4に示す(x1,
y2)のように水平方向にドットの位置移動が発生した
場合,そのドットの座標値(x1,y2)を今回の開始
点の座標値として設定し,今回の開始点の座標値(x
1,y2)とRAM106に記憶されている前回の開始
点の座標値(x0,y0)とに基づいて,その傾きdx
(0−1)/dy(0−2)=(1/2)を算出し,再
び,今回の開始点の座標値(x1,y2)および傾き
(1/2)をRAM106に記憶させ,通過したドット
を白に反転する。
Here, in order to simplify the description of the inclination of the coordinate value, description will be given with reference to FIGS. 3 and 4. FIG.
It is a figure which shows the inclination of vector data. Next, the CPU 101 of the controller 100 traces the black dots on the contour data shown in FIG. 3C in the vertical direction and the horizontal direction from the starting point dot, as shown in FIG. 4 (x1,
When the position of the dot moves in the horizontal direction as in (y2), the coordinate value (x1, y2) of the dot is set as the coordinate value of the current start point, and the coordinate value of the current start point (x
1, y2) and the coordinate value (x0, y0) of the previous start point stored in the RAM 106, the slope dx thereof.
(0-1) / dy (0-2) = (1/2) is calculated, and again the coordinate values (x1, y2) and the slope (1/2) of the start point of this time are stored in the RAM 106 and passed. Invert the dots you made to white.

【0024】次に,コントローラ100のCPU101
は,上記と同様に,輪郭データ上で黒であるドットを垂
直方向,水平方向の順になぞっていき,図4に示す(x
2,y4)のように水平方向にドットの位置移動が発生
した場合,再び,そのドットの座標値(x2,y4)を
今回の開始点の座標値として設定し,今回の開始点の座
標値(x2,y4)とRAM106に記憶されている前
回の開始点の座標値(x1,y2)とに基づいて,その
傾きdx(1−2)/dy(2−4)=(1/2)を算
出し,再び,今回の開始点の座標値(x2,y4)およ
び傾き(1/2)をRAM106に記憶させ,通過した
ドットを白に反転する。
Next, the CPU 101 of the controller 100
In the same way as above, the black dots on the contour data are traced in the order of the vertical direction and the horizontal direction, and shown in FIG.
2) and y4), when the position of the dot moves in the horizontal direction, the coordinate value (x2, y4) of the dot is set again as the coordinate value of the current start point, and the coordinate value of the current start point is set. The gradient dx (1-2) / dy (2-4) = (1/2) based on (x2, y4) and the coordinate value (x1, y2) of the previous start point stored in the RAM 106. Is calculated, the coordinate values (x2, y4) and the slope (1/2) of the current start point are stored in the RAM 106 again, and the passed dots are inverted to white.

【0025】次に,コントローラ100のCPU101
は,今回の開始点の座標値(x2,y4)と前回の開始
点の座標値(x1,y2)とに基づいて算出した傾き
(1/2)と,前回の開始点の座標値(x1,y2)と
前前回の開始点の座標値(x0,y0)とに基づいて算
出した前回の開始点の傾き(1/2)とを比較し,同一
の結果であるため,前回の開始点の座標値(x1,y
2)および傾き(1/2)をRAM106から消去す
る。
Next, the CPU 101 of the controller 100
Is the slope (1/2) calculated based on the coordinate value (x2, y4) of the current start point and the coordinate value (x1, y2) of the previous start point, and the coordinate value (x1) of the previous start point. , Y2) and the slope (1/2) of the previous start point calculated based on the coordinate value (x0, y0) of the previous start point, and the same result is obtained. Coordinate values (x1, y
2) and the slope (1/2) are erased from the RAM 106.

【0026】続いて,コントローラ100のCPU10
1は,上記と同様に,輪郭データ上で黒であるドットを
垂直方向,水平方向の順になぞっていき,図4に示す
(x3,y5)のように水平方向にドットの位置移動が
発生した場合,再び,そのドットの座標値(x3,y
5)を今回の開始点の座標値として設定し,今回の開始
点の座標値(x3,y5)とRAM106に記憶されて
いる前回の開始点の座標値(x2,y4)とに基づい
て,その傾きdx(2−3)/dy(4−5)=(1/
1)を算出し,再び,今回の開始点の座標値(x3,y
5)および傾き(1/1)をRAM106に記憶させ,
通過したドットを白に反転する。
Subsequently, the CPU 10 of the controller 100
In No. 1, similarly to the above, the black dots on the contour data are traced in the order of the vertical direction and the horizontal direction, and the dot position movement occurs in the horizontal direction as shown in (x3, y5) in FIG. , Again, the dot coordinate values (x3, y
5) is set as the coordinate value of the starting point this time, and based on the coordinate value (x3, y5) of the starting point this time and the coordinate value (x2, y4) of the previous starting point stored in the RAM 106, The slope dx (2-3) / dy (4-5) = (1 /
1) is calculated, and the coordinate value (x3, y) of the start point of this time is calculated again.
5) and the inclination (1/1) are stored in the RAM 106,
Invert the passed dots to white.

【0027】次に,コントローラ100のCPU101
は,今回の開始点の座標値(x3,y5)と前回の開始
点の座標値(x2,y4)とに基づいて算出した傾き
(1/1)と,前回の開始点の座標値(x2,y4)と
前前回の開始点の座標値(x1,y2)とに基づいて算
出した前回の開始点の傾き(1/2)とを比較し,同一
でない結果であるため,RAM106に記憶されている
以前の開始点の座標値(x0,y0)と,前回の開始点
の座標値(x2,y4)と,傾き(1/2)とをベクタ
ーデータとして確定する。
Next, the CPU 101 of the controller 100
Is the slope (1/1) calculated based on the coordinate values (x3, y5) of the current start point and the coordinate values (x2, y4) of the previous start point, and the coordinate value (x2) of the previous start point. , Y4) and the slope (1/2) of the previous start point calculated based on the coordinate values (x1, y2) of the previous start point are compared, and since the results are not the same, they are stored in the RAM 106. The coordinate value (x0, y0) of the previous start point, the coordinate value (x2, y4) of the previous start point, and the slope (1/2) are determined as vector data.

【0028】CPU101は,上記動作を行い輪郭デー
タ上に続く黒のドットが無くなったら,最初に開始点の
座標値(x0,y0)の座標値を今回の開始点の座標値
(x0,y0)として傾きの算出を行い,上記と同様の
傾きの比較と,ベクターデータの確定を行う。この時の
状態は,図3(d)のようになる。さらに,1つの輪郭
のベクターデータの確定が終了すると,再び(0,0)
の座標値のドットから最初の黒のドットのスキャン(走
査)を行い,輪郭抽出用ビットイメージのドットが全て
白になるまで動作を行う。
When the black dot following the contour data disappears after performing the above operation, the CPU 101 first sets the coordinate value of the starting point coordinate value (x0, y0) to the current starting point coordinate value (x0, y0). Then, the slope is calculated, the same slope comparison as above is performed, and the vector data is determined. The state at this time is as shown in FIG. Furthermore, when the determination of the vector data of one contour is completed, it is again (0,0).
The first black dot is scanned from the coordinate value dot and the operation is performed until all the dots of the contour extraction bit image are white.

【0029】最後に,上記動作によって確定したベクタ
ーデータの座標値に基づいて,ベクターデータを内包す
る最小の矩形領域を検出する。
Finally, the smallest rectangular area containing the vector data is detected based on the coordinate value of the vector data determined by the above operation.

【0030】前述したように本実施例によれば,ビット
マップ外字データを左右上下・斜め上下の八方向に1ド
ットずつ移動させながら論理和で重ね書きをして,輪郭
抽出用ビットイメージを作成し,作成した輪郭抽出用ビ
ットイメージに基づいて,元のビットマップ外字データ
との排他的論理和で重ね書きして,1ドットの輪郭デー
タを抽出することにしたため,ベクターデータの確定が
行い易くなる。
As described above, according to the present embodiment, the bit map external character data is overwritten with a logical sum while moving one dot in each of the left, right, up, down, and diagonal up and down directions to create a contour extraction bit image. Then, based on the created contour extraction bit image, it was decided to extract the 1-dot contour data by overwriting with the exclusive OR of the original bitmap external character data, making it easy to determine the vector data. Become.

【0031】また,左上端座標値を(0,0)とし,水
平方向に黒のドットがないかスキャン(走査)して,最
初にドットが黒である点を開始点として,開始点の座標
値(x0,y0)をRAM106に記憶させるため,輪
郭データの開始点が確定できる。
Further, the coordinate value of the upper left corner is set to (0, 0), and a scan (scan) is performed for black dots in the horizontal direction. Since the value (x0, y0) is stored in the RAM 106, the start point of the contour data can be determined.

【0032】また,開始点のドットを白に反転し,同様
に輪郭データ上を通過したドットを白に反転するため,
抽出中の輪郭データの内側にある別の輪郭データを抽出
することができる。
Further, since the dot at the starting point is inverted to white and the dot passing on the contour data is also inverted to white,
Another contour data inside the contour data being extracted can be extracted.

【0033】また,開始点のドットから,輪郭データ上
で黒であるドットを垂直方向,水平方向の順になぞって
いき,水平方向にドットの位置移動が発生した場合,そ
のドットの座標値を今回の開始点の座標値として設定
し,今回の開始点の座標値とRAM106に記憶されて
いる前回の開始点の座標値とに基づいて,その傾きdx
/dyを算出し,今回の開始点の座標値および傾きをR
AM106に記憶させるため,ベクターデータの元にな
る座標値と傾きを得ることができる。
Further, from the dot at the start point, the black dots on the contour data are traced in the order of the vertical direction and the horizontal direction, and when the position movement of the dot occurs in the horizontal direction, the coordinate value of the dot is set this time. Of the slope dx based on the coordinate value of the current start point and the coordinate value of the previous start point stored in the RAM 106.
/ Dy is calculated, and the coordinate value and slope of this start point are calculated as R
Since the data is stored in the AM 106, it is possible to obtain the coordinate value and the inclination that are the basis of the vector data.

【0034】また,今回の開始点の座標値と前回の開始
点の座標値とに基づいて算出した傾きと,前回の開始点
の座標値と前前回の開始点の座標値とに基づいて算出し
た前回の開始点の傾きとを比較し,同一の結果である場
合,前回の開始点の座標値および傾きをRAM106か
ら消去し,同一でない結果である場合,RAM106に
記憶されている以前の開始点の座標値と,前回の開始点
の座標値と傾きとをベクターデータとして確定するよう
にしたため,余分なベクターデータを削減することがで
きる。
Further, the inclination calculated based on the coordinate value of the current start point and the coordinate value of the previous start point, and the inclination value calculated based on the coordinate value of the previous start point and the coordinate value of the previous previous start point. If the result is the same, the coordinate value and the slope of the previous start point are deleted from the RAM 106. If the result is not the same, the previous start stored in the RAM 106 is compared. Since the coordinate value of the point, the coordinate value of the previous start point, and the slope are determined as vector data, extra vector data can be reduced.

【0035】また,上記動作によって確定したベクター
データの座標値に基づいて,ベクターデータを内包する
最小の矩形領域を検出するため,ベクターデータを使用
したアウトラインデータの展開の時のメモリを節約する
ことができる。
Further, since the minimum rectangular area containing the vector data is detected based on the coordinate value of the vector data determined by the above operation, the memory is saved when the outline data is expanded using the vector data. You can

【0036】[0036]

【発明の効果】以上説明したように,本発明のプリンタ
装置(請求項1)によれば,輪郭抽出手段がビットマッ
プ外字データを上下左右・斜め上下の八方向に1ドット
ずつ移動させて輪郭抽出用ビットイメージを作成し,作
成した輪郭抽出用ビットイメージとビットマップ外字デ
ータとの排他的論理和を求めることにより,ビットマッ
プ外字データの輪郭データを抽出するため,ベクターデ
ータの確定が行い易くなる。
As described above, according to the printer device (Claim 1) of the present invention, the contour extracting means moves the bitmap external character data by one dot in the eight directions of up, down, left, right and diagonally up and down, and draws the contour. By creating an extraction bit image and finding the exclusive OR of the created contour extraction bit image and bitmap external character data, the outline data of the bitmap external character data is extracted, making it easy to determine the vector data. Become.

【0037】また,本発明のプリンタ装置(請求項2)
によれば,記憶手段がビットマップ上の座標値を記憶
し,開始点設定手段が輪郭抽出手段で抽出した輪郭デー
タを水平方向に走査し,最初にドットが黒である点を開
始点として設定し,開始点の座標値を記憶手段に記憶さ
せるため,輪郭データの開始点が確定できる。
A printer device according to the present invention (claim 2)
According to the above, the storage means stores the coordinate value on the bitmap, the start point setting means scans the contour data extracted by the contour extracting means in the horizontal direction, and the point where the dot is black first is set as the start point. However, since the coordinate value of the starting point is stored in the storage means, the starting point of the contour data can be determined.

【0038】また,本発明のプリンタ装置(請求項3)
によれば,反転手段が開始点のドットを白に反転するた
め,抽出中の輪郭データの内側にある別の輪郭データを
抽出するための準備ができる。
A printer device according to the present invention (claim 3)
According to the above, since the reversing means reverses the dot at the starting point to white, it is possible to prepare for extracting another contour data inside the contour data being extracted.

【0039】また,本発明のプリンタ装置(請求項4)
によれば,座標値・傾き設定手段が輪郭データ上の現在
のドット位置から垂直方向,水平方向の順で輪郭データ
をなぞり,水平方向にドットの位置移動が発生した場合
に該当するドットの座標値を今回の開始点の座標値とし
て設定し,今回の開始点の座標値と記憶手段に記憶され
ている前回の開始点の座標値とに基づいて傾きを算出
し,今回の開始点の座標値および傾きを記憶手段に記憶
させるため,比較するベクターデータを確保することが
できる。
A printer device according to the present invention (claim 4)
According to the above, the coordinate value / inclination setting means traces the contour data in the order of the vertical direction and the horizontal direction from the current dot position on the contour data, and when the dot position movement occurs in the horizontal direction, the coordinates of the corresponding dot The value is set as the coordinate value of the starting point this time, the tilt is calculated based on the coordinate value of the starting point this time and the coordinate value of the previous starting point stored in the storage unit, and the coordinate of the starting point this time is calculated. Since the value and the slope are stored in the storage means, vector data to be compared can be secured.

【0040】また,反転手段が輪郭データ上で通過した
ドットの黒を白に反転するため,抽出中の輪郭データの
内側にある別の輪郭データを抽出することができる。
Further, since the reversing means reverses the black of the dot which has passed on the contour data to white, another contour data inside the contour data being extracted can be extracted.

【0041】また,本発明のプリンタ装置(請求項5)
によれば,消去手段が,比較手段で今回の開始点の傾き
と前回の開始点の傾きとを比較した結果が同一の場合
に,記憶手段に記憶されている前回の開始点の座標値お
よび傾きを消去し,ベクターデータ確定手段が,比較手
段の比較した結果が同一でない場合に,前前回の開始点
の座標値と前回の開始点の座標値および傾きをベクター
データとして確定するため,余分なベクターデータを削
減することができるので,ビットマップ外字データを登
録する際,登録するアウトラインデータをベクターデー
タとすることができる。すなわち,登録するアウトライ
ンデータのメモリの容量を最小限とすることができる。
A printer device according to the present invention (claim 5)
According to the above, when the result of comparing the inclination of the present starting point and the inclination of the previous starting point by the comparing means is the same, the erasing means and the coordinate value of the previous starting point stored in the storage means and Since the slope is deleted and the vector data determining means determines the coordinate value of the previous start point, the coordinate value of the previous start point and the coordinate value of the previous start point and the slope as the vector data, it is unnecessary. Since it is possible to reduce various vector data, it is possible to use the outline data to be registered as vector data when registering bitmap external character data. That is, the capacity of the memory for the outline data to be registered can be minimized.

【0042】また,反転手段が輪郭データ上で通過した
ドットの黒を白に反転するため,抽出中の輪郭データの
内側にある別の輪郭データを抽出することができる。
Further, since the reversing means reverses the black of the dot which has passed on the contour data to white, another contour data inside the contour data being extracted can be extracted.

【0043】また,本発明のプリンタ装置(請求項6)
によれば,検出手段が,ベクターデータ確定手段で確定
したベクターデータの座標値に基づいて,ベクターデー
タを内包する最小の矩形領域を検出するため,ベクター
データを使用したアウトラインデータの展開の時のメモ
リを節約することができる。
A printer device according to the present invention (claim 6)
According to the above, the detecting means detects the smallest rectangular area containing the vector data based on the coordinate value of the vector data confirmed by the vector data confirming means. Therefore, when the outline data is expanded using the vector data, You can save memory.

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

【図1】本実施例のプリンタ装置のコントローラの構成
図である。
FIG. 1 is a configuration diagram of a controller of a printer device according to an embodiment.

【図2】コントローラのソフトウェア構成図である。FIG. 2 is a software configuration diagram of a controller.

【図3】ビットマップ外字データを示した説明図であ
る。
FIG. 3 is an explanatory diagram showing bitmap external character data.

【図4】ベクターデータの傾きを示す説明図である。FIG. 4 is an explanatory diagram showing a gradient of vector data.

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

100 コントローラ 106 RAM 111 ホスト装置 201 プリンタオペレーティングシステム 206 フォントマネージャ 208 メモリ
マネージャ
100 Controller 106 RAM 111 Host Device 201 Printer Operating System 206 Font Manager 208 Memory Manager

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 文字,図形およびイメージデータを包括
的に処理可能なコントローラを有し,かつ,ビットマッ
プ外字データの登録機能を有したプリンタ装置におい
て,前記ビットマップ外字データを上下左右・斜め上下
の八方向に1ドットずつ移動させて輪郭抽出用ビットイ
メージを作成し,作成した前記輪郭抽出用ビットイメー
ジと前記ビットマップ外字データとの排他的論理和を求
めることにより,前記ビットマップ外字データの輪郭デ
ータを抽出する輪郭抽出手段を備えたことを特徴とする
プリンタ装置。
1. A printer having a controller capable of comprehensively processing character, graphic, and image data and having a function of registering bitmap external character data, wherein the bitmap external character data is vertically, horizontally, and diagonally up and down. Of the bitmap external character data by calculating the exclusive OR of the created outline extracting bit image and the created bitmap external character data A printer device comprising a contour extracting means for extracting contour data.
【請求項2】 ビットマップ上の座標値を記憶する記憶
手段と,前記輪郭抽出手段で抽出した輪郭データを水平
方向に走査し,最初にドットが黒である点を開始点とし
て設定し,前記開始点の座標値を前記記憶手段に記憶さ
せる開始点設定手段とを備えたことを特徴とする請求項
1記載のプリンタ装置。
2. A storage means for storing coordinate values on a bit map, and the contour data extracted by the contour extracting means are scanned in the horizontal direction, and a point at which a dot is black is first set as a start point. The printer device according to claim 1, further comprising a start point setting unit that stores the coordinate value of the start point in the storage unit.
【請求項3】 前記開始点のドットを白に反転する反転
手段を備えたことを特徴とする請求項2記載のプリンタ
装置。
3. The printer device according to claim 2, further comprising a reversing unit that reverses the dot at the starting point to white.
【請求項4】 前記輪郭データ上の現在のドット位置か
ら垂直方向,水平方向の順で輪郭データをなぞり,水平
方向にドットの位置移動が発生した場合に該当するドッ
トの座標値を今回の開始点の座標値として設定し,前記
今回の開始点の座標値と前記記憶手段に記憶されている
前回の開始点の座標値とに基づいて傾きを算出し,前記
今回の開始点の座標値および傾きを前記記憶手段に記憶
させる座標値・傾き設定手段と,前記輪郭データ上で通
過したドットの黒を白に反転する反転手段とを備えたこ
とを特徴とする請求項2記載のプリンタ装置。
4. The contour data is traced in the order of vertical and horizontal directions from the current dot position on the contour data, and when a dot position movement occurs in the horizontal direction, the corresponding coordinate value of the dot is started this time. It is set as the coordinate value of the point, and the inclination is calculated based on the coordinate value of the current start point and the coordinate value of the previous start point stored in the storage means. 3. The printer device according to claim 2, further comprising: coordinate value / inclination setting means for storing the inclination in the storage means; and inverting means for inverting the black of the dots passed on the contour data to white.
【請求項5】 前記今回の開始点の傾きと前回の開始点
の傾きとが同一か否かを比較する比較手段と,前記比較
手段の比較結果が同一の場合に,前記記憶手段に記憶さ
れている前記前回の開始点の座標値および傾きを消去す
る消去手段と,前記比較手段の比較結果が同一でない場
合に,前前回の開始点の座標値と前回の開始点の座標値
および傾きをベクターデータとして確定するベクターデ
ータ確定手段とを備えたことを特徴とする請求項4記載
のプリンタ装置。
5. The comparing means for comparing whether the inclination of the starting point of this time is the same as the inclination of the starting point of the previous time and the comparison result of the comparing means are stored in the storage means. If the comparison result of the erasing means for erasing the coordinate value and inclination of the previous starting point and the comparing means are not the same, the coordinate value of the previous previous starting point and the coordinate value and inclination of the previous starting point are calculated. 5. The printer device according to claim 4, further comprising vector data confirming means for confirming as vector data.
【請求項6】 前記ベクターデータ確定手段で確定した
ベクターデータの座標値に基づいて,前記ベクターデー
タを内包する最小の矩形領域を検出する検出手段を備え
たことを特徴とする請求項5記載のプリンタ装置。
6. The detection means for detecting the smallest rectangular area containing the vector data based on the coordinate value of the vector data determined by the vector data determination means. Printer device.
JP7243852A 1995-08-30 1995-08-30 Printer device Pending JPH0962849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7243852A JPH0962849A (en) 1995-08-30 1995-08-30 Printer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7243852A JPH0962849A (en) 1995-08-30 1995-08-30 Printer device

Publications (1)

Publication Number Publication Date
JPH0962849A true JPH0962849A (en) 1997-03-07

Family

ID=17109922

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7243852A Pending JPH0962849A (en) 1995-08-30 1995-08-30 Printer device

Country Status (1)

Country Link
JP (1) JPH0962849A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8339642B2 (en) 2008-02-22 2012-12-25 Ricoh Company, Ltd. Apparatus, method, and system for processing character data
US9141784B2 (en) 2011-01-06 2015-09-22 Ricoh Company, Ltd. Printing control program, information processing apparatus, printing system, and printing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8339642B2 (en) 2008-02-22 2012-12-25 Ricoh Company, Ltd. Apparatus, method, and system for processing character data
US9141784B2 (en) 2011-01-06 2015-09-22 Ricoh Company, Ltd. Printing control program, information processing apparatus, printing system, and printing apparatus

Similar Documents

Publication Publication Date Title
US8212815B2 (en) Drawing apparatus, drawing program, and drawing method
JPH0962849A (en) Printer device
JP2003046746A (en) Image processing method and image processing apparatus
JP2000066658A (en) Image processor and recording medium
JPH06149465A (en) Handwriting input device
JP2814709B2 (en) Drawing data creation device
JP3129717B2 (en) Image processing apparatus and image processing method
JPH10138555A (en) Image forming apparatus and method and printing system
JP3350324B2 (en) Character output device
JPH09300769A (en) Printing apparatus, data registration method, and storage medium storing control program
JPH11224259A (en) Image processing apparatus, image processing method, and storage medium
JP2711860B2 (en) Output control method and device
JP2639489B2 (en) Image data extraction method
JP3350325B2 (en) Character output device
JPH0691938A (en) Print control device
JPH06175637A (en) Method for generating character
JP2578965B2 (en) Graphic processing unit
JP2784823B2 (en) Image editing printing method of printer
JPH11175306A (en) X-y plotter
JPH0532021A (en) Printer
JP2002287926A (en) Page controlling method in printer driver
JPH0652276A (en) Enlarged image display method
JPH0895546A (en) Image data display device
JPH1196299A (en) Character recognition apparatus and method
JPH10215367A (en) Image processor