JP2641790B2 - Vector raster converter - Google Patents

Vector raster converter

Info

Publication number
JP2641790B2
JP2641790B2 JP2179787A JP17978790A JP2641790B2 JP 2641790 B2 JP2641790 B2 JP 2641790B2 JP 2179787 A JP2179787 A JP 2179787A JP 17978790 A JP17978790 A JP 17978790A JP 2641790 B2 JP2641790 B2 JP 2641790B2
Authority
JP
Japan
Prior art keywords
vector
absolute value
affine transformation
stored
storage means
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2179787A
Other languages
Japanese (ja)
Other versions
JPH0470695A (en
Inventor
嘉之 中井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Consejo Superior de Investigaciones Cientificas CSIC
Original Assignee
Consejo Superior de Investigaciones Cientificas CSIC
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 Consejo Superior de Investigaciones Cientificas CSIC filed Critical Consejo Superior de Investigaciones Cientificas CSIC
Priority to JP2179787A priority Critical patent/JP2641790B2/en
Publication of JPH0470695A publication Critical patent/JPH0470695A/en
Application granted granted Critical
Publication of JP2641790B2 publication Critical patent/JP2641790B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION 【産業上の利用分野】[Industrial applications]

この発明は、ワークステーションやDTP(デスクトッ
プパブリッシング)などにおける画像処理に用いられる
ベクトルのラスタ変換装置に関する。
The present invention relates to a vector raster conversion apparatus used for image processing in a workstation, desktop publishing (DTP), or the like.

【従来の技術】[Prior art]

最近、ワークステーションやDTPなどにおける画像処
理においてベクトルフォントを利用することが増えてい
る。その理由としては、回転、変倍、傾斜等の処理をし
た場合でも印字品位が落ちないうえ、各サイズ毎のフォ
ントを用意しなくても良いという利点があるためであ
る。また、DTPでは、WYSIWYG(What You See Is What Y
ou Get)という機能、すなわち、画面で表示されたもの
と同じものが印刷して得られるという機能が重視されて
おり、これを実現するためにはCRTでもベクトルフォン
トを使う必要があるためである。 このベクトルフォントのラスタ変換は、従来、第3図
に示すような手順で行なっていた。 すなわち、まず、ステップS31において、回転角、傾
斜角、変倍率、座標原点からのオフセット値などのアフ
ィン変換のパラメータを設定した後、ステップS32でベ
クトルフォントが格納されているメモリのアドレスを設
定する。これらの設定された値はレジスタ等にストアさ
れ、新しい値を設定するまでストアされる。設定終了
後、ステップS33に進み、実行コマンドで起動をかける
と、メモリコントロール部は上記ストアされたアドレス
のベクトルをロードする。ベクトルデータはデータ圧縮
の為に差分データであることが多い。差分データはアフ
ィン変換にかける前にステップS34で絶対座標に変換さ
れる。これはアフィン変換してから絶対座標になおすと
誤差の累積があるためである。絶対座標に変換された値
はステップS35でアフィン変換にかける。アフィン変換
は例えば以下の式で表される。 X=(x・Mx+y・My・tanθ)・cosφ −y・My・sinφ+CPx Y=(x・Mx+y・My・tanθ)・sinφ −y・My・cosφ+CPx ここで、Mxはx方向の変倍率、Myはy方向の変倍率、
θは傾斜角、φは回転角、CPx,CPyはオフセット値であ
る。 次に、ステップS36に進み、アフィン変換をかけられ
た座標値を使ってブレーゼンハムのアルゴリズムなどに
よりラスタ変換し、出力バッファに直線を描画する。そ
して、ステップS37で出力バッファがフルになったかど
うかを判断し、フルになるとステップS38で出力バッフ
ァのデータを外部メモリへ書き込む。この動作を1字分
のベクトルを描画するまで繰り返し、1字分のアウトラ
インが描画されると、ステップS39からステップS40に進
み、スイッチングフィルやシードフィルなどの方法でそ
のアウトラインの内部を塗りつぶすようにしていた。
Recently, the use of vector fonts in image processing in workstations and DTP has been increasing. The reason is that there is an advantage that the print quality is not degraded even when processing such as rotation, scaling, inclination, etc., and that it is not necessary to prepare a font for each size. In DTP, WYSIWYG (What You See Is What Y
ou Get) function, that is, the function of printing and obtaining the same thing displayed on the screen is emphasized, and in order to realize this, it is necessary to use a vector font even in the CRT. . The raster conversion of this vector font has conventionally been performed according to the procedure shown in FIG. That is, first, in step S31, parameters of the affine transformation such as the rotation angle, the tilt angle, the magnification, and the offset value from the coordinate origin are set, and then in step S32, the address of the memory in which the vector font is stored is set. . These set values are stored in a register or the like, and stored until a new value is set. After completing the setting, the process proceeds to step S33, and when the memory control unit is activated by an execution command, the memory control unit loads the vector of the stored address. Vector data is often differential data for data compression. The difference data is converted into absolute coordinates in step S34 before being subjected to the affine transformation. This is because if affine transformation is performed and then converted to absolute coordinates, there is accumulation of errors. The value converted into the absolute coordinates is subjected to affine transformation in step S35. The affine transformation is represented by the following equation, for example. X = (x · Mx + y · My · tanθ) · cosφ−y · My · sinφ + CPx Y = (x · Mx + y · My · tanθ) · sinφ−y · My · cosφ + CPx where Mx is the magnification in the x direction and My Is the magnification in the y direction,
θ is a tilt angle, φ is a rotation angle, and CPx and CPy are offset values. Next, the process proceeds to step S36, in which the coordinate values subjected to the affine transformation are raster-converted by the Bresenham algorithm or the like, and straight lines are drawn in the output buffer. Then, in a step S37, it is determined whether or not the output buffer becomes full. When the output buffer becomes full, the data in the output buffer is written to the external memory in a step S38. This operation is repeated until a one-character vector is drawn. When an outline for one character is drawn, the process proceeds from step S39 to step S40, and the inside of the outline is filled with a method such as a switching fill or a seed fill. I was

【発明が解決しようとする課題】[Problems to be solved by the invention]

ところで、ベクトルフォントは、通常、1つか2つの
サイズのものを用意しておき、それ以外のサイズのもの
が必要な場合には、それを変倍して用いることが多い。
また、通常、512ドット×512ドットや1024ドット×1024
ドットのように大きい字母ベクトルを用いてそれを縮小
することが多い。その場合、縮小することによって、ベ
クトルがゼロベクトルになってしまうことが多かった。 このような縮小によってゼロベクトルになるようなベ
クトルについてはアフィン変換を行う必要はないが、上
記従来のベクトルのラスタ変換においては、このような
ベクトルについてもアフィン変換を行うようになってお
り、ベクトルの各始点および終点の座標について前述の
式に示すように乗算を12回、加算を6回行っていた。そ
のため、処理速度が遅いという欠点があった。特に、画
面上に多くの小さな字が表示される場合、字数は面積
(文字サイズの2乗)に比例するが、処理速度はベクト
ル長(文字サイズの1乗)によって決まり、また、小さ
な字でも大きな字とベクトル数は同じであるため、速い
処理速度が要求されるが、上記のような不必要なアフィ
ン変換のために処理速度が遅くなり問題であった。 そこで、この発明の目的は、縮小するとゼロベクトル
になるベクトルについてはアフィン変換を行わないよう
にして処理速度を速くするようにしたベクトルのラスタ
変換装置を提供することにある。
By the way, usually, vector fonts of one or two sizes are prepared, and if other sizes are required, they are often scaled and used.
Usually, 512 dots × 512 dots or 1024 dots × 1024
Often, a large character vector like a dot is used to reduce it. In such a case, the reduction often causes the vector to become a zero vector. It is not necessary to perform an affine transformation on a vector that becomes a zero vector due to such reduction, but in the above-described conventional raster conversion of a vector, an affine transformation is also performed on such a vector. The multiplication was performed 12 times and the addition was performed 6 times with respect to the coordinates of the start point and the end point, as shown in the above equation. Therefore, there is a disadvantage that the processing speed is slow. In particular, when many small characters are displayed on the screen, the number of characters is proportional to the area (the square of the character size), but the processing speed is determined by the vector length (the square of the character size). Since the large characters and the number of vectors are the same, a high processing speed is required. However, the processing speed becomes slow due to the unnecessary affine transformation as described above, which is a problem. SUMMARY OF THE INVENTION It is an object of the present invention to provide a vector raster conversion apparatus in which affine transformation is not performed on a vector that becomes a zero vector when reduced, thereby increasing the processing speed.

【課題を解決するための手段】[Means for Solving the Problems]

上記目的を達成するため、この発明は、画像データに
基づいて作成されたベクトルデータをアフィン変換し、
その結果得られたベクトルデータに基づいてラスタ変換
を行って直線描画を行うようにしたベクトルのラスタ変
換装置において、アフィン変換後のベクトルがゼロベク
トルである場合におけるそのアフィン変換前のベクトル
の始点のX座標と終点のX座標との差の絶対値△Xnとそ
のアフィン変換前のベクトルの始点のY座標と終点のY
座標との差の絶対値△Ynとを複数組(n=1,2,3,…)格
納可能な格納手段と、アフィン変換前のベクトルの始点
のX座標と終点のX座標との差の絶対値△Xおよびその
ベクトルの始点のY座標と終点のY座標との差の絶対値
△Yを、それぞれ上記格納手段に格納されている上記絶
対値△Xnおよび上記絶対値△Ynと比較する比較手段と、
上記比較手段による比較結果をうけて、上記アフィン変
換前のベクトルの上記絶対値△Xおよび上記絶対値△Y
が上記格納手段に格納されている上記絶対値△Xnおよび
上記絶対値△Ynのうちの少なくとも1組と△X≦△Xnか
つ△Y≦△Ynの関係にある場合には、上記アフィン変換
前のベクトルのアフィン変換を行わず、上記アフィン変
換前のベクトルの上記絶対値△Xおよび上記絶対値△Y
が上記格納手段に格納されている上記絶対値△Xnおよび
上記絶対値△Ynのいずれの組とも△X≦△Xnかつ△Y≦
△Ynの関係にない場合には上記アフィン変換前のベクト
ルのアフィン変換を行うアフィン変換手段と、アフィン
変換後のベクトルがゼロベクトルかどうかを判定する判
定手段と、上記判定手段の判定結果をうけて、上記アフ
ィン変換後のベクトルがゼロベクトルである場合に、上
記アフィン変換前のベクトルの上記絶対値△Xおよび上
記絶対値△Yが上記格納手段に格納されている上記絶対
値△Xnおよび上記絶対値△Ynのうちの少なくとも1組と
△X≧△Xnかつ△Y≧△Ynの関係にあれば、その関係に
ある上記格納手段に格納されている上記絶対値△Xnおよ
び上記絶対値△Ynをそれぞれ上記アフィン変換前のベク
トルの上記絶対値△Xおよび上記絶対値△Yで更新する
一方、上記アフィン変換前のベクトルの上記絶対値△X
および上記絶対値△Yが上記格納手段に格納されている
上記絶対値△Xnとおよび上記絶対値△Ynのいずれの組と
も△X≧△Xnかつ△Y≧△Ynの関係になければ上記アフ
ィン変換前のベクトルの上記絶対値△Xおよび上記絶対
値△Yを新たに上記格納手段に格納する制御手段とを備
えたことを特徴としている。
In order to achieve the above object, the present invention performs affine transformation of vector data created based on image data,
In a vector raster conversion device that performs raster conversion based on the vector data obtained as a result and performs straight line drawing, when the vector after the affine conversion is a zero vector, the starting point of the vector before the affine conversion is determined. The absolute value of the difference between the X coordinate and the X coordinate of the end point △ Xn, the Y coordinate of the start point of the vector before the affine transformation, and the Y of the end point
Storage means capable of storing a plurality of sets (n = 1, 2, 3,...) Of the absolute value △ Yn of the difference from the coordinates, and the difference between the X coordinate of the start point and the X coordinate of the end point of the vector before affine transformation The absolute value △ X and the absolute value △ Y of the difference between the Y coordinate of the start point and the Y coordinate of the end point of the vector are compared with the absolute value △ Xn and the absolute value △ Yn stored in the storage means, respectively. Means of comparison;
In response to the comparison result by the comparing means, the absolute value △ X and the absolute value △ Y of the vector before the affine transformation
Is in the relationship of △ X ≦ △ Xn and △ Y ≦ △ Yn with at least one set of the absolute value △ Xn and the absolute value △ Yn stored in the storage means, Of the vector before the affine transformation, the absolute value △ X and the absolute value △ Y of the vector before the affine transformation are performed.
△ Xn and △ Y ≦ in both sets of the absolute value 格納 Xn and the absolute value △ Yn stored in the storage means.
If there is no relationship of ΔYn, affine transformation means for affine transformation of the vector before the affine transformation, decision means for deciding whether the vector after affine transformation is a zero vector, and receiving the decision result of the decision means When the vector after the affine transformation is a zero vector, the absolute value △ X and the absolute value △ Y of the vector before the affine transformation are stored in the storage means. If at least one of the absolute values △ Yn has a relationship of △ X ≧ △ Xn and △ Y ≧ △ Yn, the absolute value △ Xn and the absolute value △ stored in the storage means having the relationship Yn is updated with the absolute value △ X and the absolute value △ Y of the vector before the affine transformation, while the absolute value △ X of the vector before the affine transformation is updated.
If the absolute value △ Y is not in the relationship of △ X ≧ △ Xn and △ Y ≧ △ Yn with any set of the absolute value △ Xn and the absolute value △ Yn stored in the storage means, the affine A control unit for newly storing the absolute value △ X and the absolute value △ Y of the vector before conversion in the storage unit.

【作用】[Action]

上記構成において、初期状態においては格納手段には
△Xnおよび△Ynは格納されていない。この状態では△X
≦△Xnかつ△Y≦Ynであることはないのでベクトルのア
フィン変換を行う。そして、アフィン変換後のベクトル
がゼロベクトルになったとすると、そのアフィン変換前
のベクトルの△Xと△Yをそれぞれ△X1と△Y1として上
記格納手段に格納する。次にアフィン変換しようとする
ベクトルの△Xおよび△Yをそれぞれ上記△X1および△
Y1と比較する。そして、その比較結果が△X≦△X1かつ
△Y≦△Y1であれば、そのベクトルをアフィン変換して
も当然ゼロベクトルとなるので、アフィン変換処理をス
キップする。一方、その比較結果が△X≦△X1かつ△Y
≦△Y1でなければアフィン変換を行う。そして、アフィ
ン変換後のベクトルがゼロベクトルでなければ次の処理
に移る。一方、アフィン変換後のベクトルがゼロベクト
ルであり、上記比較結果が△X≧△X1かつ△Y≧△Y1
あればその△Xおよび△Yをそれぞれ新たに△X1および
△Y1とする。一方、アフィン変換後のベクトルがゼロベ
クトルであり、上記比較結果が△X≧△X1かつ△Y≧△
Y2でなければ、その△Xおよび△Yをそれぞれ△X2およ
び△Y2として上記格納手段に格納する。そして、次にア
フィン変換しようとするベクトルについては、その△X
および△Yをそれぞれ△X1および△Y1、△X2および△Y2
と比較し、上記と同様の処理を行う。そして、一般に上
記格納手段に△Xn,△Yn(n=1,2,...,N)が格納されて
いる場合には、アフィン変換しようとするベクトルにつ
いてその△Xおよび△Yをそれぞれ上記N組みの△Xnお
よび△Ynと比較する。そして、上記アフィン変換前のベ
クトルが上記格納手段に格納されているベクトルのいず
れかと△X≦△Xnかつ△Y≦△Ynの関係にある場合に
は、上記アフィン変換前のベクトルのアフィン変換を行
わず、上記アフィン変換前のベクトルが上記格納手段に
格納されているベクトルのいずれとも△X≦△Xnから△
Y≦△Ynの関係にない場合には上記アフィン変換前のベ
クトルのアフィン変換を行う。そして、上記アフィン変
換後のベクトルがゼロベクトルである場合に、上記アフ
ィン変換前のベクトルが上記格納手段に格納されている
ベクトルのいずれかと△X≧△Xnかつ△Y≧△Ynの関係
にあれば、その関係にあるベクトルの△Xnおよび△Ynを
それぞれ上記△Xおよび△Yで更新する一方、上記アフ
ィン変換前のベクトルが上記格納手段に格納されている
ベクトルのいずれとも△X≧△Xnかつ△Y≧△Ynの関係
になければその△Xおよび△Yをそれぞれ△X N+1お
よび△Y N+lとして上記格納手段に格納する。 このように、アフィン変換する前にアフィン変換後の
ベクトルがゼロベクトルになるかどうかを判断して、ゼ
ロベクトルになる場合にはアフィン変換を行わないよう
にしているので、処理速度が速くなる。
In the above configuration, 構成 Xn and △ Yn are not stored in the storage means in the initial state. In this state, △ X
Since △ Xn and △ Y ≦ Yn are not satisfied, affine transformation of the vector is performed. The vector after the affine transformation When becomes zero vector is stored in the storage means that affine transformation before the vector △ X and △ Y respectively as △ X 1 and △ Y 1. Next, △ X and △ Y of the vector to be affine-transformed are represented by △ X 1 and △, respectively.
Compare with Y 1 . Then, if the comparison result △ X ≦ △ X 1 and △ Y ≦ △ Y 1, since the vector becomes naturally zero vector also affine transformation, skips the affine transformation process. On the other hand, the comparison result △ X ≦ △ X 1 and △ Y
≦ △ Y 1 unless performing affine transformation. Then, if the vector after the affine transformation is not a zero vector, the process proceeds to the next process. On the other hand, a vector is zero vector after the affine transformation, the △ X and △ Y newly respectively if said comparison result is △ X ≧ △ X 1 and △ Y ≧ △ Y a 1 △ X 1 and △ Y 1 And On the other hand, the vector after the affine transformation is zero vector, the comparison result is △ X ≧ △ X 1 and △ Y ≧ △
Otherwise Y 2, is stored in the storage means thereof △ X and △ Y respectively as △ X 2 and △ Y 2. Then, for the vector to be affine-transformed next, its △ X
And △ Y are △ X1 and △ Y1, △ X2 and △ Y2, respectively.
And performs the same processing as above. In general, when △ Xn, △ Yn (n = 1, 2,..., N) are stored in the storage unit, △ X and △ Y are respectively converted into the affine transformation vectors. Compare with N sets of △ Xn and △ Yn. If the vector before the affine transformation has a relationship of △ X ≦ △ Xn and △ Y ≦ △ Yn with any of the vectors stored in the storage unit, the affine transformation of the vector before the affine transformation is performed. Without performing, the vector before the affine transformation is set to {X ≦ {Xn to {
If there is no relationship of Y ≦ Yn, the affine transformation of the vector before the affine transformation is performed. When the vector after the affine transformation is a zero vector, the vector before the affine transformation is in a relationship of △ X ≧ △ Xn and △ Y ≧ △ Yn with any of the vectors stored in the storage means. For example, while the vectors △ Xn and △ Yn having the relation are updated with △ X and △ Y, respectively, the vector before the affine transformation is △ X ≧ △ Xn with any of the vectors stored in the storage means. If there is no relation of △ Y ≧ △ Yn, △ X and △ Y are stored in the storage means as △ XN + 1 and △ YN + 1, respectively. As described above, before the affine transformation, it is determined whether the vector after the affine transformation becomes a zero vector, and when the vector becomes the zero vector, the affine transformation is not performed, so that the processing speed is increased.

【実施例】【Example】

以下、この発明を図示の実施例により詳細に説明す
る。 第1図はこの発明の一実施例の回路構成を示すブロッ
ク図である。 この第1図において、1はホストインターフェース
(ホストI/F)部であり、ホストから与えられた回転
角、傾斜角、変倍率、ベクトルフォント(VF)のトップ
アドレス、座標原点からのオフセット値などのアフィン
変換パラメータをパラメータレジスタ2にストアした
り、コマンドをシーケンサ7へデコードする。3はアフ
ィン変換部であり、乗算器、加算器、ラッチ、マルチプ
レクサ等からなり、上記パラメータレジスタ2に格納さ
れているパラメータに基づいてベクトルの回転、傾斜等
のアフィン変換を行う。また、4はベクタラスタ変換部
であり、カウンタ、フルアダー、セレクタ、マルチプレ
クサ、シーケンサ、レジスタ等からなり、上記アフィン
変換部3でアフィン変換されたベクトルデータに基づい
て、例えば、周知のブレーゼンハムのアルゴリズム等の
方法により、直線描画を行う。その時に、上記直線描画
によって表される図形の内部の塗り潰しに誤りが生じな
いようにする処理(例えば、塗り潰しがスイッチングフ
ィルム奇遇法で行う場合における図形の頂点処理)を行
う。5はDDA(ディジタル・ディファレンシャル・アナ
ライザ)バッファである。このバッファ5は、例えば16
ドット×16ドットのバッファであり、上記ベクタラスタ
変換部4によりこのバッファ5に直線描画が行われる。
また、6はメモリコントローラ部であり、上記DDAバッ
ファ5への描画データがオーバーフローした場合に、そ
のオーバーフローしたデータをフレームバッファ(FB)
やワークバッファ(WB)などの外部メモリへ書き込んだ
り、上記VFが格納されているメモリからVFを読み出して
上記外部メモリヘ書き込む。7は回路全体の制御を行う
シーケンサ部である。8はレジスタ部であり、アフィン
変換後のベクトルがゼロベクトルである場合におけるア
フィン変換前のベクトルの始点のX座標と終点のX座標
との差の絶対値である△Xと、始点のY座標と終点のY
座標との差の絶対値である△Yを格納する。以下、この
△X、△Yを差分ベクトルデータと呼ぶ。なお、レジス
タ部8に格納された差分ベクトルデータを△Xn,△Yn
(n=1,2,...)と表し、新しくアフィン変換されるベ
クトルの差分ベクトルデータ△X,△Yと区別する。9は
大小比較部であり、新しくアフィン変換されるベクトル
の差分ベクトルデータと上記レジスタ部8に格納されて
いる差分ベクトルデータとを比較して、その比較結果を
シーケンサ部7に出力する。シーケンサ部7はその比較
結果に基づいてベクトルのアフィン変換を行うかどうか
を決定したり、レジスタ部8の差分ベクトルデータの書
き換えや追加を行う。各種レジスタ部10は、例えばブレ
ーゼンハムのアルゴリズムにおけるメジャー軸やマイナ
ー軸および評価関数の値などの各種データや、ベクトル
データの絶対座標の値などを格納するためのものであ
る。 上記構成からなるベクトルのラスタ変換装置の動作を
第2図のフローチャートに従って説明する。 まず、ステップS1で、上述したアフィン変換パラメー
タをパラメータレジスタ2にロードする。これらの値は
少なくとも1文字を描画するまで変わることがないので
このレジスタ2にストアされる。次に、ステップS2でベ
クトルフォントが格納されているメモリ(図示せず)の
先頭アドレスをロードする。この値はシーケンサ部7の
ラッチ付きカウンタなどにストアされ、ベクトルの処理
が1字分終わるごとにインクリメントされる。 次に、ステップS3において、メモリコントローラ部6
によりベクトルフォントをWBやFBなどの外部メモリにロ
ードする。ベクトルフォントはメモリ容量を小さくする
ために差分データではいっている。次に、ステップS4に
進み、上記ロードした差分データを絶対座標に変換す
る。これは誤差の累積を防ぐために必要である。 次に、アフイン変換からベクトルの直線描画へと進む
わけであるが、最初はレジスタ部8には、△Xnおよび△
Ynは格納されていない。この状態では、ステップS5にお
いて、大小比較部9は、アフィン変換前のベクトルにつ
いて△X≦△Xnかつ△Y≦Ynであるとは判断しないの
で、ステップS6でアフィン変換部3がそのベクトルのア
フィン変換を行い、ステップS7でベクタラスタ変換部4
がDDAバッファ5にアフィン変換されたベクトルの直線
描画を行う。そして、アフィン変換後のベクトルがゼロ
ベクトルでなければ、ステップS8からS9,S14を経てステ
ップS3に戻る。 アフィン変換後のベクトルがゼロベクトルになったと
すると、ステップS8からステップS11およびS12に進み、
そのアフィン変換前のベクトルの△Xと△Yをそれぞれ
△X1と△Y1として上記レジスタ部8に格納する。そし
て、ステップS14を経てステップS3に戻り、次のベクト
ルデータを絶対座標に変換する。 そして、ステップS5で新たにアフィン変換しようとす
るベクトルの△Xおよび△Yをそれぞれ上記△X1および
△Y1と比較する。その比較結果が△X≦△X1かつ△Y≦
△Y1であれば、そのベクトルをアフィン変換しても当然
ゼロベクトルとなるので、アフィン変換処理をスキップ
し、ステップS14からステップS3に戻る。 このアフィン変換は、従来例のところで述べたように
乗算を12回、加算を6回行うため処理時間が長くかかる
ので、これをスキップすることにより処理速度を速くす
ることができる。特に、一画面内の文字数が多い場合に
は文字サイズは小さくなり、当然ゼロベクトルは多くな
るので、非常に有効である。 上記ステップS5で、その比較結果が△X≦△X1かつ△
Y≦△Y1でなければステップS6以降の処理を行う。そし
て、ステップS8でアフィン変換後のベクトルがゼロベク
トルでなければステップS9に進むが、アフィン変換後の
ベクトルがゼロベクトルであればステップS11に進む。 ステップS11で上記比較結果が△X≧△X1かつ△Y≧
△Y1であればステップS12に進みその△Xおよび△Yを
それぞれ新たに△X1および△Y1とする。一方、上記比較
結果が△X≧△X1かつ△Y≧△Y2でなければ、ステップ
S13に進み、その△Xおよび△Yをそれぞれ△X2および
△Y2として上記レジスタ部8の上記△X1および△Y1を格
納しているレジスタとは別のレジスタに格納する。 そして、次にアフィン変換しようとするベクトルにつ
いては、その△Xおよび△Yをそれぞれ△1および△Y
1、△X2および△Y2と比較し、上記の同様の処理を行
う。上記ステップS11,12,13の処理については、例え
ば、△X1=7,△Y1=5で、△X=10,△Y=8なら、△X
1と△Y1はそれぞれ10と8に書き換えられる。また、X1
=7,△Y1=5で、△X=8,△Y=3なら、△X2=8,△Y2
=3という新しい値を△X1および△Y1をストアしている
レジスタと違うレジスタにストアする。そして、次のベ
クトルからは上記両方の値との比較を行う。 一般に上記格納手段に△Xn,△Yn(n=1,2,...,N)が
格納されている場合には、アフィン変換しようとするベ
クトルについてその△Xおよび△Yをそれぞれ上記N組
の△Xnおよび△Ynと比較する。そして、上記アフィン変
換前のベクトルが上記レジスタ部8に格納されているベ
クトルのいずれかと△X≦△Xnつ△Y≦△Ynの関係にあ
る場合には、上記アフィン変換前のベクトルのアフィン
変換をスキップする。一方、上記アフィン変換前のベク
トルが上記レジスタ部8に格納されているベクトルのい
ずれも△X≦△Xnかつ△Y≦△Ynの関係にない場合に
は、上記アフィン変換前のベクトルのアフィン変換を行
う。そして、上記アフィン変換後のベクトルがゼロベク
トルである場合には、上記アフィン変換前のベクトルが
上記レジスタ部8に格納されているベクトルのいずれか
と△X≧△Xnかつ△Y≧△Ynの関係にあれば、その関係
にあるベクトルの△Xnおよび△Ynをそれぞれ上記△Xお
よび△Yで更新し、上記アフィン変換前のベクトルが上
記レジスタ部に格納されているベクトルのいずれとも△
X≧△Xnかつ△Y≧△Ynの関係になければ、その△Xお
よび△Yをそれぞれ△X N+1および△Y N+1として上
記レジスタ部8に格納する。 上記処理により1文字分のアウトラインの作成が終了
すると、ステップS14からステップS15にすすんでそのア
ウトラインの内部の塗り潰しを行う。なお、ステップS9
においてDDAバッファ5がフルになるとDDAバッファ5の
データを外部メモリへ書き込む。 このように、アフィン変換する前にアフィン変換後の
ベクトルがゼロベクトルになるかどうかを判断して、ゼ
ロベクトルになる場合にはアフィン変換を行わないよう
にしているので、処理速度を速くすることができる。 なお、上記実施例においてはベクトルフォントをアフ
ィン変換してベクトルの直線描画を行う場合について述
べたが、直線図形のような塗り潰しの不要な図形を表す
ベクトルのラスタ変換を行うことができることはいうま
でもない
Hereinafter, the present invention will be described in detail with reference to the illustrated embodiments. FIG. 1 is a block diagram showing a circuit configuration of an embodiment of the present invention. In FIG. 1, reference numeral 1 denotes a host interface (host I / F), which includes a rotation angle, a tilt angle, a magnification, a top address of a vector font (VF), an offset value from a coordinate origin, and the like provided by the host. Is stored in the parameter register 2 and the command is decoded to the sequencer 7. Reference numeral 3 denotes an affine transformation unit, which includes a multiplier, an adder, a latch, a multiplexer, and the like, and performs affine transformation such as rotation and inclination of a vector based on the parameters stored in the parameter register 2. Reference numeral 4 denotes a vector raster converter, which includes a counter, a full adder, a selector, a multiplexer, a sequencer, a register, and the like. Based on the vector data affine-transformed by the affine converter 3, for example, a well-known Bresenham algorithm or the like is used. Straight line drawing is performed by the method. At that time, processing is performed to prevent errors from occurring in the filling of the inside of the figure represented by the straight line drawing (for example, the vertex processing of the figure when the filling is performed by the switching film random method). Reference numeral 5 denotes a DDA (Digital Differential Analyzer) buffer. The buffer 5 has, for example, 16
The buffer is a dot × 16 dot buffer, and the vector raster conversion unit 4 draws a straight line in the buffer 5.
Reference numeral 6 denotes a memory controller unit which, when the drawing data to the DDA buffer 5 overflows, stores the overflowed data in a frame buffer (FB).
Or writing to an external memory such as a work buffer (WB), or reading the VF from the memory where the VF is stored and writing it to the external memory. Reference numeral 7 denotes a sequencer for controlling the entire circuit. Reference numeral 8 denotes a register unit, which is an absolute value of the difference between the X coordinate of the start point and the X coordinate of the end point of the vector before the affine transformation when the vector after the affine transformation is the zero vector, and the Y coordinate of the start point And the end point Y
△ Y, which is the absolute value of the difference from the coordinates, is stored. Hereinafter, these △ X and △ Y are referred to as difference vector data. Note that the difference vector data stored in the register unit 8 is represented by △ Xn, △ Yn
(N = 1, 2,...) And are distinguished from the difference vector data △ X, △ Y of the newly affine-transformed vector. Reference numeral 9 denotes a magnitude comparison unit which compares the difference vector data of the newly affine-transformed vector with the difference vector data stored in the register unit 8 and outputs the comparison result to the sequencer unit 7. The sequencer 7 determines whether to perform affine transformation of the vector based on the comparison result, and rewrites or adds the difference vector data of the register 8. The various register units 10 store various data such as values of major axes and minor axes and evaluation functions in the Bresenham algorithm, values of absolute coordinates of vector data, and the like. The operation of the vector raster conversion device having the above configuration will be described with reference to the flowchart of FIG. First, in step S1, the affine transformation parameters described above are loaded into the parameter register 2. These values are stored in this register 2 because they do not change until at least one character is drawn. Next, in step S2, the head address of a memory (not shown) storing the vector font is loaded. This value is stored in a latched counter or the like of the sequencer unit 7, and is incremented each time the processing of the vector is completed for one character. Next, in step S3, the memory controller 6
Loads the vector font into external memory such as WB or FB. Vector fonts are written in differential data to reduce memory capacity. Next, the process proceeds to step S4, in which the loaded difference data is converted into absolute coordinates. This is necessary to prevent accumulation of errors. Next, the process proceeds from the affine transformation to the straight line drawing of the vector. At first, the register unit 8 stores {Xn and △
Yn is not stored. In this state, in step S5, since the magnitude comparison unit 9 does not determine that the vector before the affine transformation is △ X ≦ △ Xn and △ Y ≦ Yn, the affine transformation unit 3 determines in step S6 the affine transformation of the vector. Conversion is performed, and in step S7, the vector raster conversion unit 4
Performs linear drawing of the affine-transformed vector in the DDA buffer 5. If the vector after the affine transformation is not a zero vector, the process returns to step S3 from steps S8 to S9 and S14. If the vector after the affine transformation becomes a zero vector, the process proceeds from step S8 to steps S11 and S12,
Stores the previous affine transformation vector △ X and △ Y respectively as △ X 1 and △ Y 1 in the register unit 8. Then, the process returns to step S3 via step S14, and converts the next vector data into absolute coordinates. The vector to be newly affine transformation at step S5 △ X and △ Y, respectively compared with the △ X 1 and △ Y 1. The comparison result △ X ≦ △ X 1 and △ Y ≦
If △ Y 1, since the vector becomes naturally zero vector also affine transformation, skip affine transformation processing returns from step S14 to step S3. Since the affine transformation takes 12 long multiplications and 6 additions as described in the conventional example, it takes a long processing time. By skipping this, the processing speed can be increased. In particular, when the number of characters in one screen is large, the character size is small, and naturally the number of zero vectors is large, which is very effective. In step S5, the comparison result △ X ≦ △ X 1 and △
Performing Y ≦ △ Y 1 Otherwise step S6 and subsequent steps. Then, in step S8, if the vector after the affine transformation is not a zero vector, the process proceeds to step S9, but if the vector after the affine transformation is a zero vector, the process proceeds to step S11. The comparison result in step S11 is △ X ≧ △ X 1 and △ Y ≧
△ if Y 1 proceeds to step S12 that △ X and △ Y newly respective △ and X 1 and △ Y 1. On the other hand, the comparison result is △ X ≧ △ X 1 and △ Y ≧ △ Y 2 Otherwise, step
Proceeds to S13, and stores the △ X and △ Y to a different register respectively as △ X 2 and △ Y 2 and register storing the △ X 1 and △ Y 1 of the register unit 8. Then, for the vector to be affine-transformed next, its △ X and △ Y are respectively changed to △ 1 and △ Y
1. Perform the same processing as described above, comparing with △ X2 and △ Y2. Regarding the processing in steps S11, S12 and S13, for example, if △ X 1 = 7, △ Y 1 = 5, △ X = 10, △ Y = 8, then △ X
1 and ΔY 1 are rewritten to 10 and 8, respectively. Also X 1
= 7, △ Y 1 = 5, △ X = 8, △ Y = 3, then △ X 2 = 8, △ Y 2
= To store the new value of 3 △ X 1 and △ Y 1 to register a different register that store. Then, the next vector is compared with both values. In general, when △ Xn, △ Yn (n = 1, 2,..., N) are stored in the storage means, the △ X and △ Y of the vector to be affine-transformed △ Xn and △ Yn. If the vector before the affine transformation has a relationship of △ X ≦ △ Xn and △ Y ≦ △ Yn with any of the vectors stored in the register unit 8, the affine transformation of the vector before the affine transformation is performed. To skip. On the other hand, if none of the vectors before the affine transformation is in the relationship of △ X ≦ △ Xn and △ Y ≦ △ Yn, the affine transformation of the vector before the affine transformation is performed. I do. If the vector after the affine transformation is a zero vector, the relationship between the vector before the affine transformation and any of the vectors stored in the register unit 8 is △ X ≧ △ Xn and △ Y ≧ △ Yn. , The related vectors △ Xn and △ Yn are updated with the above △ X and △ Y, respectively, and the vector before the affine transformation is the same as the vector stored in the register unit.
If there is no relationship of X ≧ △ Xn and △ Y ≧ △ Yn, △ X and に Y are stored in the register unit 8 as △ XN + 1 and △ YN + 1, respectively. When the creation of the outline for one character is completed by the above-described processing, the process proceeds from step S14 to step S15, and the inside of the outline is filled. Step S9
When the DDA buffer 5 becomes full, the data in the DDA buffer 5 is written to the external memory. As described above, before the affine transformation, it is determined whether the vector after the affine transformation becomes a zero vector, and when the vector becomes the zero vector, the affine transformation is not performed. Can be. In the above-described embodiment, the case where the vector font is affine-transformed and the vector is drawn in a straight line has been described. Nor

【発明の効果】 以上より明らかなように、この発明のベクトルのラス
タ変換装置は、比較手段が、アフィン変換前の差分ベク
トルデータ(△X,△Y)を、格納手段に格納されている
差分ベクトルデータ(△Xn,△Yn)と比較し、アフィン
変換手段が、上記比較手段による比較結果をうけて、上
記アフィン変換前のベクトルが上記格納手段に格納され
ているベクトルのいずれかと△X≦△Xnかつ△Y≦△Yn
の関係にある場合には、上記アフィン変換前のベクトル
のアフィン変換を行わず、上記アフィン変換前のベクト
ルが上記格納手段に格納されているベクトルのいずれと
も△X≦△Xnかつ△Y≦△Ynの関係にない場合には上記
アフィン変換前のベクトルのアフィン変換を行い、判定
手段が、アフィン変換後のベクトルがゼロベクトルかど
うかを判定し、制御手段が、上記判定手段の判定結果を
うけて、上記アフィン変換後のベクトルがゼロベクトル
である場合に、上記アフィン変換前のベクトルが上記格
納手段に格納されているベクトルのいずれかと△X≧△
Xnかつ△Y≧△Ynの関係にあれば、その関係にあるベク
トルの△Xnおよび△Ynをそれぞれ上記△Xおよび△Yで
更新する一方、上記アフィン変換前のベクトルが上記格
納手段に格納されているベクトルのいずれとも△X≧△
Xnかつ△Y≧△Ynの関係になければその△Xおよび△Y
を上記格納手段に格納するようにしているので、アフィ
ン変換するとゼロベクトルになるベクトルのアフィン変
換を省略することができ、処理速度が速くなる。特に、
1画面内に多くの文字を表示する場合には、文字サイズ
が小さく、ゼロベクトルが多くなるので、非常に有効と
なる。
As is apparent from the above description, in the vector raster conversion apparatus according to the present invention, the comparing means converts the difference vector data (△ X, △ Y) before affine transformation into the difference stored in the storage means. Compared with the vector data (△ Xn, △ Yn), the affine transformation means receives the comparison result by the comparison means, and the vector before the affine transformation is compared with one of the vectors stored in the storage means by △ X ≦ △ Xn and △ Y ≦ △ Yn
In the case of the relationship, the affine transformation of the vector before the affine transformation is not performed, and the vector before the affine transformation is △ X ≦ △ Xn and △ Y ≦ △ with any of the vectors stored in the storage unit. If the relationship is not Yn, the affine transformation of the vector before the affine transformation is performed, the determination unit determines whether the vector after the affine transformation is a zero vector, and the control unit receives the determination result of the determination unit. When the vector after the affine transformation is a zero vector, the vector before the affine transformation is set to {X ≧ △} with one of the vectors stored in the storage unit.
If Xn and △ Y ≧ △ Yn, the vectors に Xn and △ Yn in the relationship are updated with △ X and △ Y, respectively, while the vector before the affine transformation is stored in the storage means. △ X ≧ △
Xn and △ Y unless Xn and 関係 Y ≧ △ Yn
Is stored in the storage means, so that it is possible to omit the affine transformation of a vector which becomes a zero vector when the affine transformation is performed, thereby increasing the processing speed. Especially,
When displaying many characters in one screen, the character size is small and the number of zero vectors increases, which is very effective.

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

第1図はこの発明の一実施例の回路構成を示すブロック
図、第2図は上記実施例の動作を示すフローチャート、
第3図は従来例の動作を示すフローチャートである。 1……ホストI/F、2……パラメータレジスタ、3……
アフィン変換部、4……ベクタラスタ変換部、5……DD
Aバッファ、6……メモリコントローラ部、7……シー
ケンサ部、8……レジスタ部、9……大小比較部、10…
…各種レジスタ部。
FIG. 1 is a block diagram showing the circuit configuration of one embodiment of the present invention, FIG. 2 is a flowchart showing the operation of the above embodiment,
FIG. 3 is a flowchart showing the operation of the conventional example. 1 ... host I / F, 2 ... parameter register, 3 ...
Affine conversion unit, 4 ... Vector raster conversion unit, 5 ... DD
A buffer, 6: memory controller, 7: sequencer, 8: register, 9: size comparison unit, 10
... various registers.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】画像データに基づいて作成されたベクトル
データをアフィン変換し、その結果得られたベクトルデ
ータに基づいてラスタ変換を行って直線描画を行うよう
にしたベクトルのラスタ変換装置において、 アフィン変換後のベクトルがゼロベクトルである場合に
おけるそのアフィン変換前のベクトルの始点のX座標と
終点のX座標との差の絶対値△Xnとそのアフィン変換前
のベクトルの始点のY座標と終点のY座標との差の絶対
値△Ynとを複数組(n=1,2,3,…)格納可能な格納手段
と、 アフィン変換前のベクトルの始点のX座標と終点のX座
標との差の絶対値△Xおよびそのベクトルの始点のY座
標と終点のY座標との差の絶対値△Yを、それぞれ上記
格納手段に格納されている上記絶対値△Xnおよび上記絶
対値△Ynと比較する比較手段と、 上記比較手段による比較結果をうけて、上記アフィン変
換前のベクトルの上記絶対値△Xおよび上記絶対値△Y
が上記格納手段に格納されている上記絶対値△Xnおよび
上記絶対値△Ynのうちの少なくとも1組と△X≦△Xnか
つ△Y≦△Ynの関係にある場合には、上記アフィン変換
前のベクトルのアフィン変換を行わず、上記アフィン変
換前のベクトルの上記絶対値△Xおよび上記絶対値△Y
が上記格納手段に格納されている上記絶対値△Xnおよび
上記絶対値△Ynのいずれの組とも△X≦△Xnかつ△Y≦
△Ynの関係にない場合には上記アフィン変換前のベクト
ルのアフィン変換を行うアフィン変換手段と、 アフィン変換後のベクトルがゼロベクトルかどうかを判
定する判定手段と、 上記判定手段の判定結果をうけて、上記アフィン変換後
のベクトルがゼロベクトルである場合に、上記アフィン
変換前のベクトルの上記絶対値△Xおよび上記絶対値△
Yが上記格納手段に格納されている上記絶対値△Xnおよ
び上記絶対値△Ynのうちの少なくとも1組と△X≧△Xn
かつ△Y≧△Ynの関係にあれば、その関係にある上記格
納手段に格納されている上記絶対値△Xnおよび上記絶対
値△Ynをそれぞれ上記アフィン変換前のベクトルの上記
絶対値△Xおよび上記絶対値△Yで更新する一方、上記
アフィン変換前のベクトルの上記絶対値△Xおよび上記
絶対値△Yが上記格納手段に格納されている上記絶対値
△Xnとおよび上記絶対値△Ynのいずれの組とも△X≧△
Xnかつ△Y≧△Ynの関係になければ上記アフィン変換前
のベクトルの上記絶対値△Xおよび上記絶対値△Yを新
たに上記格納手段に格納する制御手段とを備えたことを
特徴とするベクトルのラスタ変換装置。
1. A vector raster conversion apparatus which performs affine transformation on vector data created based on image data, performs raster conversion based on the vector data obtained as a result, and performs straight line drawing. When the vector after the transformation is a zero vector, the absolute value △ Xn of the difference between the X coordinate of the starting point and the X coordinate of the ending point of the vector before the affine transformation and the Y coordinate and the ending point of the starting point of the vector before the affine transformation Storage means capable of storing a plurality of sets (n = 1, 2, 3,...) Of the absolute value △ Yn of the difference from the Y coordinate, and the difference between the X coordinate of the start point and the X coordinate of the end point of the vector before affine transformation And the absolute value YY of the difference between the Y coordinate of the start point and the Y coordinate of the end point of the vector are compared with the absolute value △ Xn and the absolute value △ Yn stored in the storage means, respectively. Means of comparison And the absolute value △ X and the absolute value △ Y of the vector before the affine transformation,
Is in the relationship of △ X ≦ △ Xn and △ Y ≦ △ Yn with at least one set of the absolute value △ Xn and the absolute value △ Yn stored in the storage means, Of the vector before the affine transformation, the absolute value △ X and the absolute value △ Y of the vector before the affine transformation are performed.
△ Xn and △ Y ≦ in both sets of the absolute value 格納 Xn and the absolute value △ Yn stored in the storage means.
If there is no relationship of ΔYn, affine transformation means for affine transformation of the vector before the affine transformation, decision means for determining whether the vector after the affine transformation is a zero vector, and receiving the decision result of the decision means When the vector after the affine transformation is a zero vector, the absolute value {X and the absolute value} of the vector before the affine transformation
Y is at least one set of the absolute value △ Xn and the absolute value △ Yn stored in the storage means and △ X ≧ △ Xn
And if there is a relationship of △ Y ≧ 絶 対 Yn, the absolute value △ Xn and the absolute value △ Yn stored in the storage means having the relationship are respectively converted into the absolute value △ X and the absolute value ベ ク ト ル X of the vector before the affine transformation. While updating with the absolute value △ Y, the absolute value △ X and the absolute value △ Y of the vector before the affine transformation are obtained by comparing the absolute value が Xn and the absolute value △ Yn stored in the storage means. △ X ≧ △ for both sets
A control means for newly storing the absolute value △ X and the absolute value △ Y of the vector before the affine transformation in the storage means if Xn and △ Y ≧ △ Yn are not satisfied. Vector raster converter.
JP2179787A 1990-07-06 1990-07-06 Vector raster converter Expired - Fee Related JP2641790B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2179787A JP2641790B2 (en) 1990-07-06 1990-07-06 Vector raster converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2179787A JP2641790B2 (en) 1990-07-06 1990-07-06 Vector raster converter

Publications (2)

Publication Number Publication Date
JPH0470695A JPH0470695A (en) 1992-03-05
JP2641790B2 true JP2641790B2 (en) 1997-08-20

Family

ID=16071888

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2179787A Expired - Fee Related JP2641790B2 (en) 1990-07-06 1990-07-06 Vector raster converter

Country Status (1)

Country Link
JP (1) JP2641790B2 (en)

Also Published As

Publication number Publication date
JPH0470695A (en) 1992-03-05

Similar Documents

Publication Publication Date Title
US5241653A (en) Apparatus and method for adjusting and displaying scaled, rasterized characters
US5666520A (en) Graphics display system including graphics processor having a register storing a series of vertex data relating to a polygonal line
US6275241B1 (en) High speed image drawing apparatus for displaying three dimensional images
JPH0660173A (en) Method and apparatus for reducing picture
JP2634851B2 (en) Image processing device
JP2641790B2 (en) Vector raster converter
JPH03119387A (en) Method and apparatus for forming contour of digital type surface
JPS6267632A (en) Method and apparatus for transferring data to display unit from memory
US5297244A (en) Method and system for double error antialiasing in a computer display system
US5670981A (en) Method for mapping a source pixel image to a destination pixel space
JPH0758510B2 (en) Three-dimensional graphic processor
JP2571662B2 (en) Line drawing method and apparatus
US20070216688A1 (en) Display program, data structure and display device
JP3139805B2 (en) Image processing method and apparatus
JP3129717B2 (en) Image processing apparatus and image processing method
US5680153A (en) Image Processing apparatus
JP3337385B2 (en) Display control circuit
JPH0350686A (en) Graphic processing system
JP3089906B2 (en) Drawing equipment
JP3099556B2 (en) Data converter
JP2613653B2 (en) Image processing device
JPS62127971A (en) Clipping system in line segment drawing
JPH09326920A (en) Digital image processing method in the unit of sub pixel
JPH0520466A (en) Method and device for processing picture
JP2551322B2 (en) Image reproduction method and apparatus

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080502

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090502

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100502

Year of fee payment: 13

LAPS Cancellation because of no payment of annual fees