JP2008027396A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
JP2008027396A
JP2008027396A JP2006202586A JP2006202586A JP2008027396A JP 2008027396 A JP2008027396 A JP 2008027396A JP 2006202586 A JP2006202586 A JP 2006202586A JP 2006202586 A JP2006202586 A JP 2006202586A JP 2008027396 A JP2008027396 A JP 2008027396A
Authority
JP
Japan
Prior art keywords
processing
image
data
intermediate code
drawing data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006202586A
Other languages
Japanese (ja)
Other versions
JP4818013B2 (en
JP2008027396A5 (en
Inventor
Yutaka Miyouki
裕 妙木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2006202586A priority Critical patent/JP4818013B2/en
Publication of JP2008027396A publication Critical patent/JP2008027396A/en
Publication of JP2008027396A5 publication Critical patent/JP2008027396A5/ja
Application granted granted Critical
Publication of JP4818013B2 publication Critical patent/JP4818013B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Editing Of Facsimile Originals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reflect processing treatment to a displayed image on a print result with a small processing load. <P>SOLUTION: First drawing data 302 described in a page description language are converted into second drawing data 303 in intermediate code expression and an image is displayed by using the second drawing data 303. The processing treatment according to an input instruction is performed to the displayed image to be displayed. Furthermore, processing data 304 representing the processing are added to the second drawing data to be transmitted to an image forming device 307. Furthermore, the image forming device 307 forms the image based on the received processing data 309 and the second drawing data 308. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は画像処理方法及び装置に関する。   The present invention relates to an image processing method and apparatus.

従来、文書ファイルを拡大縮小して表示・印刷するには、まず通常の大きさでラスタデータに展開した後、指示倍率にしたがってラスタデータを拡大縮小処理していた。しかしこの手法ではラスタデータを補間したり間引いたりして拡大縮小を行なうので、ジャギーが発生したりドットが失われたりして、印刷品質が低下する。また、ラスタデータを操作するので高速処理に不向きであり、プリンタへの送信データ量も多くなる。この手法については、たとえば特開2000−83222号公報(特許文献1)に関連記載がある。   Conventionally, in order to display and print a document file in an enlarged / reduced manner, the raster data is first expanded into raster data in a normal size, and then the raster data is enlarged / reduced in accordance with an instruction magnification. However, in this method, raster data is interpolated or thinned out for enlargement / reduction, jaggies occur or dots are lost, and print quality deteriorates. In addition, since raster data is manipulated, it is not suitable for high-speed processing, and the amount of data transmitted to the printer increases. Regarding this method, for example, JP-A-2000-83222 (Patent Document 1) has a related description.

文書ファイルがページ記述言語(Page Description Language;以下PDL)で記述されていれば、文書ファイルそのものを書き換えることで拡大縮小を行なうことがきる。たとえばPostScriptでは座標系を変換するオペレータとして、translate(移動)・scale(拡大縮小)・rotate(回転)が用意されている。従って、これらを文書の先頭に記述することで、文書全体を移動・拡大縮小・回転させることができる。また、SVG(Scalable Vector Graphics)(非特許文献1)では<g>要素のtransform属性で移動・拡大縮小・回転を指定することができる。従って、SVG文書ファイルの全要素を包含するように<g>要素を記述することで、文書全体を移動・拡大縮小・回転させることができる。あるいは、拡大縮小のみであれば、もっとも外側の<svg>要素にviewBox属性を指定することでも可能である。
特開2000−83222号公報 特開平8−286861号公報 特開2001−130082号公報 特開2001−130083号公報 SVG 1.1 Specification <http://www.w3.org/TR/SVG11/>
If the document file is described in a page description language (PDL), the document file itself can be rewritten to be enlarged or reduced. For example, PostScript provides translate, scale, and rotate as operators that convert the coordinate system. Therefore, by describing these at the top of the document, the entire document can be moved, enlarged, reduced, or rotated. Further, in SVG (Scalable Vector Graphics) (Non-patent Document 1), movement, enlargement / reduction, and rotation can be designated by the transform attribute of the <g> element. Therefore, by describing the <g> element so as to include all elements of the SVG document file, the entire document can be moved, enlarged, reduced, or rotated. Alternatively, if only enlargement / reduction is required, the viewBox attribute can be specified for the outermost <svg> element.
JP 2000-83222 A JP-A-8-286861 Japanese Patent Laid-Open No. 2001-130082 Japanese Patent Laid-Open No. 2001-130083 SVG 1.1 Specification <http://www.w3.org/TR/SVG11/>

しかし、上記の方法ではPDL文書ファイルそのものを書き換える必要がある。ディスプレイにPDL文書を表示してユーザの指示によりリアルタイムで移動・拡大縮小・回転したいような場合は、PDL文書ファイルを書き換えた後にパーズとレンダリングを行なう必要がある。これは、スムースな操作性を持ったシステムを提供するには不適切である。また、この方法はPDLごとに書き換え方が異なるので、複数のPDLに対応しようとすれば、それぞれのPDLに対して個別の処理を行なわなければならない。   However, in the above method, it is necessary to rewrite the PDL document file itself. When a PDL document is displayed on the display and it is desired to move / enlarge / reduce / rotate in real time according to a user instruction, it is necessary to parse and render after rewriting the PDL document file. This is inappropriate for providing a system with a smooth operability. In addition, since this method differs in rewriting method for each PDL, if it is intended to support a plurality of PDLs, individual processing must be performed for each PDL.

ここで、すべての移動・拡大縮小・回転は、3x3の変換行列(そのうちの6つの値のみ使用)で数学的に表現することができる。従って、この変換行列をPDL文書とは別に用意しておいて、印刷時にPDL文書に適用することで、PDL文書の移動・回転・拡大縮小を行なうことができる。この手法についてはたとえば特開平8−286861号公報(特許文献2)に関連記載がある。しかし、この方法ではPDL文書全体に適用される変換操作しか実現できないので、たとえばPDL文書の一部をクリップして印刷するといった処理ができない。また、それぞれのPDLに対して個別の処理を行なわなければならない。   Here, all the movements / scales / rotations can be mathematically expressed by a 3 × 3 transformation matrix (only six of them are used). Accordingly, by preparing this conversion matrix separately from the PDL document and applying it to the PDL document at the time of printing, the PDL document can be moved, rotated, and enlarged / reduced. Regarding this method, for example, JP-A-8-286861 (Patent Document 2) has a related description. However, since this method can only realize the conversion operation applied to the entire PDL document, for example, it is not possible to perform processing such as clipping and printing a part of the PDL document. In addition, individual processing must be performed for each PDL.

また、印刷データを一旦、中間コードに変換することで、印刷イメージのプレビュー表示を柔軟に行なうことができる。この手法についてはたとえば特開2001−130082号公報(特許文献3)や特開2001−130083号公報(特許文献4)に関連記載がある。   In addition, once the print data is converted into an intermediate code, the print image can be previewed flexibly. Regarding this method, for example, JP 2001-130082 (Patent Document 3) and JP 2001-130083 (Patent Document 4) have a related description.

しかし、この方法ではプレビュー表示で拡大縮小や領域選択を行なっても、その操作を印刷に反映させることができない。反映させるためには印刷データを再作成する必要があり、処理コストがかかる。   However, in this method, even if enlargement / reduction or area selection is performed in the preview display, the operation cannot be reflected in printing. In order to reflect this, it is necessary to recreate the print data, which increases processing costs.

本発明は以上の事情に鑑みてなされたものであり、少ない処理負荷で、表示された画像に対する加工処理を、印刷結果に反映させることを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to reflect a processing process on a displayed image in a print result with a small processing load.

上記目的を達成するため、本発明に係る方法は、
ページ記述言語で記述された第1描画データを中間コード表現の第2描画データに変換する変換工程と、
前記第2描画データを用いて、画像を表示する表示工程と、
前記表示工程で表示された画像に、入力した指示に応じた加工処理を施して表示する加工処理工程と、
前記加工処理を表わす加工処理データを前記第2描画データに付加して画像形成デバイスに送信する送信工程と、
を含むことを特徴とする。
In order to achieve the above object, the method according to the present invention comprises:
A conversion step of converting the first drawing data described in the page description language into the second drawing data represented by an intermediate code;
A display step of displaying an image using the second drawing data;
A processing step for displaying the image displayed in the display step by performing a processing according to the input instruction;
A transmission step of adding processing data representing the processing to the second drawing data and transmitting the processing data to the image forming device;
It is characterized by including.

上記目的を達成するため、本発明に係る装置は、
ページ記述言語で記述された第1描画データを中間コード表現の第2描画データに変換する変換手段と、
前記第2描画データを用いて、画像を表示する表示手段と、
前記表示手段で表示された画像に、入力した指示に応じた加工処理を施す加工処理手段と、
前記加工処理を表わす加工処理データを前記第2描画データに付加して画像形成デバイスに送信する送信手段と、
を含むことを特徴とする。
In order to achieve the above object, an apparatus according to the present invention provides:
Conversion means for converting the first drawing data described in the page description language into the second drawing data of intermediate code representation;
Display means for displaying an image using the second drawing data;
Processing means for performing processing according to the input instruction on the image displayed by the display means;
Transmission means for adding processing data representing the processing to the second drawing data and transmitting the processing data to the image forming device;
It is characterized by including.

上記目的を達成するため、本発明に係るプログラムは、
コンピュータが実行することのできる画像処理プログラムであって、
ページ記述言語で記述された第1描画データから変換された中間コード表現の第2描画データを用いて、画像を表示する表示工程と、
前記表示工程で表示された画像に、入力した指示に応じた加工処理を施して表示する加工処理工程と、
前記加工処理を表わす加工処理データを前記第2描画データに付加して画像形成デバイスに送信する送信工程と、
をコンピュータに実行させることを特徴とする。
In order to achieve the above object, a program according to the present invention provides:
An image processing program that can be executed by a computer,
A display step of displaying an image using the second drawing data of the intermediate code representation converted from the first drawing data described in the page description language;
A processing step for displaying the image displayed in the display step by performing a processing according to the input instruction;
A transmission step of adding processing data representing the processing to the second drawing data and transmitting the processing data to the image forming device;
Is executed by a computer.

本発明によれば、少ない処理負荷で、表示された画像に対する加工処理を、印刷結果に反映させることができる。   According to the present invention, the processing for the displayed image can be reflected in the print result with a small processing load.

以下に、図面を参照して、この発明の好適な実施の形態を例示的に詳しく説明する。ただし、この実施の形態に記載されている構成要素はあくまで例示であり、この発明の範囲をそれらのみに限定する趣旨のものではない。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. However, the constituent elements described in this embodiment are merely examples, and are not intended to limit the scope of the present invention only to them.

(一実施形態)
本実施形態は、コンピュータネットワーク環境におけるPDL文書ファイルの表示・印刷方法に関する。特に、表示されたPDL文書ファイルを、拡大縮小処理し、上下左右移動処理し、領域の一部をクリップ(範囲指定処理)して表示し、かつ表示されたままの画像を少ない処理負荷で印刷する方法に関する。
(One embodiment)
The present embodiment relates to a method for displaying and printing a PDL document file in a computer network environment. In particular, the displayed PDL document file is enlarged / reduced, moved up / down / left / right, a part of the area is clipped (range designation process), and the displayed image is printed with a small processing load. On how to do.

本実施の形態では、PDLとしてSVG1.1を使用する。ユーザPC(クライアント)において、ユーザが選択したSVG文書ファイルを中間コードに変換し、ディスプレイに表示する。ユーザが上下左右移動、拡大縮小、領域選択(クリップ)を指示すると、ディスプレイの表示が更新される。ユーザが印刷を指示すると、ユーザPCからプリンタへ中間コードおよび上下左右移動、拡大縮小、クリップ情報が送信される。プリンタでは、上下左右移動、拡大縮小、クリップ情報を参照して中間コードの印刷を行なうことで、ディスプレイ上の表示と同じ印刷結果を得る。   In the present embodiment, SVG 1.1 is used as the PDL. In the user PC (client), the SVG document file selected by the user is converted into an intermediate code and displayed on the display. When the user instructs up / down / left / right movement, enlargement / reduction, or area selection (clip), the display on the display is updated. When the user instructs printing, an intermediate code, up / down / left / right movement, enlargement / reduction, and clip information are transmitted from the user PC to the printer. The printer obtains the same print result as the display on the display by moving the intermediate code with reference to the up / down / left / right movement, enlargement / reduction, and clip information.

[全体構成]
まず、図1を参照して本発明に係る画像処理方法の一実施形態を実現可能なシステムの全体構成を説明する。101はユーザが操作を行なうクライアントPCであり、ネットワークインタフェースを経由してネットワーク103に接続されている。102はネットワーク経由で印刷指示を受け付ける画像形成デバイスの一種としてのプリンタであり、同じくネットワークインタフェースを経由してネットワーク103に接続されている。PC101はネットワーク103を通じてプリンタ102に印刷指示を送信することが可能である。
[overall structure]
First, an overall configuration of a system capable of realizing an embodiment of an image processing method according to the present invention will be described with reference to FIG. A client PC 101 is operated by a user, and is connected to the network 103 via a network interface. Reference numeral 102 denotes a printer as a type of image forming device that receives a print instruction via a network, and is also connected to the network 103 via a network interface. The PC 101 can transmit a print instruction to the printer 102 via the network 103.

[コンピュータ装置およびプリンタの構成]
次に、図2Aと図2Bを参照して、本実施の形態で使用するコンピュータ装置およびプリンタの構成について説明する。図2Aは、クライアント101の構成の一例を示すブロック図である。201はRAM202に格納されている制御プログラムに従って本装置全体の制御を行なうCPUである。202はCPU201が実行する本装置の制御プログラムや、文書画像等のデータを格納するRAM等の内部記憶部である。203はCPU201の制御の下にネットワークとの接続を行なってデータ等を送受信するネットワークインタフェースである。204はデータを保存する磁気ディスク等の外部記憶装置である。205はディスプレイ、206はキーボード、207はマウス等のポインティングデバイスである。RAM202に格納されているプログラムは、同じくRAM202に格納されているOS(Operating System)の機能を必要に応じて使用する。プログラムを実行するCPU201は、RAM202に一時記憶するデータの内容を読み書きしたり、外部記憶装置204上でデータを読み書きしたり、ネットワークインタフェースを通じてデータの送受信を行なったりする。また、キーボード206やポインティングデバイス207からの入力を受け取ったり、ディスプレイ205に表示を行なったりすることで、所定の動作を行なう。
[Configuration of computer device and printer]
Next, with reference to FIG. 2A and FIG. 2B, the structure of the computer apparatus and printer used in the present embodiment will be described. FIG. 2A is a block diagram illustrating an exemplary configuration of the client 101. A CPU 201 controls the entire apparatus according to a control program stored in the RAM 202. Reference numeral 202 denotes an internal storage unit such as a RAM that stores control programs of the apparatus executed by the CPU 201 and data such as document images. Reference numeral 203 denotes a network interface that transmits and receives data and the like by connecting to a network under the control of the CPU 201. Reference numeral 204 denotes an external storage device such as a magnetic disk for storing data. Reference numeral 205 denotes a display, 206 denotes a keyboard, and 207 denotes a pointing device such as a mouse. The program stored in the RAM 202 uses an OS (Operating System) function that is also stored in the RAM 202 as necessary. The CPU 201 that executes the program reads / writes the contents of data temporarily stored in the RAM 202, reads / writes data on the external storage device 204, and transmits / receives data through the network interface. In addition, a predetermined operation is performed by receiving an input from the keyboard 206 or the pointing device 207 or displaying on the display 205.

図2Bは、プリンタ102の構成の一例を示すブロック図である。208、209、210、211は図2Aの201、202、203、204に示したのと同じくそれぞれCPU、RAM、ネットワークインタフェース、外部記憶装置である。212は印刷を行なうプリンタエンジンである。RAM209に格納されているプログラムは、ネットワークインタフェース210を通じて受信した印刷指示にしたがって、プリンタエンジン212を制御して印刷を行なう。その際、RAM209に一時記憶するデータの内容を読み書きしたり、外部記憶装置211上でデータを読み書きしたりすることができる。   FIG. 2B is a block diagram illustrating an example of the configuration of the printer 102. Reference numerals 208, 209, 210, and 211 denote a CPU, a RAM, a network interface, and an external storage device as shown by 201, 202, 203, and 204 in FIG. 2A. A printer engine 212 performs printing. A program stored in the RAM 209 performs printing by controlling the printer engine 212 in accordance with a print instruction received through the network interface 210. At that time, the contents of data temporarily stored in the RAM 209 can be read and written, and data can be read and written on the external storage device 211.

[全体のブロック図]
次に、図3を参照して、本実施の形態で使用するコンピュータ装置内のブロック構成について説明する。
[Overall block diagram]
Next, referring to FIG. 3, a block configuration in the computer apparatus used in the present embodiment will be described.

図3は、物理的に図1のような構成を取るクライアント101、プリンタ102、ネットワーク103において、本実施の形態の動作に主として関わる論理ブロックを示す図である。すなわちプログラムモジュール、ファイルエンティティ、メモリデータ、および通信経路の構成を示すブロック図である。   FIG. 3 is a diagram showing logical blocks mainly related to the operation of the present embodiment in the client 101, printer 102, and network 103 that physically have the configuration shown in FIG. That is, it is a block diagram showing configurations of a program module, a file entity, memory data, and a communication path.

301はクライアント101のブロック境界を表わし、ここではOSの制御下にある環境を指す。中間コードコンバータ305とビューワプログラム306は、通常は外部記憶装置204に保存されているが、ユーザ、OS、あるいは別のプログラムから実行が指示されると、OSの制御によりRAM202に読み込まれ、実行可能な状態となる。302は外部記憶装置204に保存されているSVG文書ファイルであり、中間コードコンバータ305を含むプログラムはOSの機能を利用してSVG文書ファイル302の内容を読み書きすることが可能である。303はRAM202に格納される中間コードデータであり、中間コードコンバータ305を含むプログラムは同じくOSの機能を利用して中間コードデータ303の内容を読み書きすることが可能である。   Reference numeral 301 denotes a block boundary of the client 101, and here indicates an environment under the control of the OS. The intermediate code converter 305 and the viewer program 306 are normally stored in the external storage device 204. However, when execution is instructed by the user, the OS, or another program, the intermediate code converter 305 and the viewer program 306 are read into the RAM 202 under the control of the OS and can be executed. It becomes a state. Reference numeral 302 denotes an SVG document file stored in the external storage device 204, and a program including the intermediate code converter 305 can read and write the contents of the SVG document file 302 using the function of the OS. Reference numeral 303 denotes intermediate code data stored in the RAM 202, and a program including the intermediate code converter 305 can similarly read and write the contents of the intermediate code data 303 using the function of the OS.

中間コードコンバータ305はSVG文書ファイル302から中間コードデータ303への変換を行なう。つまり、中間コードコンバータ305は、ページ記述言語で記述された第1描画データを中間コード表現の第2描画データに変換する変換手段として機能する。この変換動作は両言語の仕様から機械的に決定できるものであるので、本実施の形態では中間コードコンバータ305の動作について詳述しない。   The intermediate code converter 305 performs conversion from the SVG document file 302 to the intermediate code data 303. That is, the intermediate code converter 305 functions as a conversion unit that converts the first drawing data described in the page description language into the second drawing data expressed in the intermediate code. Since this conversion operation can be determined mechanically from the specifications of both languages, the operation of the intermediate code converter 305 will not be described in detail in this embodiment.

中間コードコンバータ305は、ビューワプログラム306を起動する前の任意の時点でユーザが実行し、SVG文書ファイル302を中間コードデータ303に変換する。
ビューワプログラム306は中間コードデータ303の内容をディスプレイ205に表示する。そして、キーボード206またはポインティングデバイス207を通じて、上下左右移動、拡大縮小(印刷倍率)、領域選択(印刷範囲)、印刷についてのユーザの指示を受け付ける。つまり、ビューワプログラム306は、中間コードコンバータ305が生成した第2描画データを用いて、画像を表示する表示手段、及び、表示された画像に、入力した指示に応じた加工処理を施して表示する加工処理手段として機能する。上下左右移動、拡大縮小(印刷倍率)、領域選択(印刷範囲)といった加工処理に関するユーザの指示は表示印刷情報304(加工処理データ)としてRAM202に格納される。ビューワプログラム306はユーザからの印刷指示を受け付けると、ネットワークインタフェース210を使用し、中間コードデータ303と表示印刷情報304をネットワーク103を経由してプリンタコントローラ307に送信する。つまり、ビューワプログラム306は、加工処理を表わす加工処理データを前記第2描画データに内的に付加して画像形成デバイスに送信する送信としても機能する。SVG文書ファイル302と中間コードデータ303の内容、およびビューワプログラム306の動作については図4〜図12を用いて後述する。
The intermediate code converter 305 is executed by the user at an arbitrary time before starting the viewer program 306, and converts the SVG document file 302 into intermediate code data 303.
The viewer program 306 displays the contents of the intermediate code data 303 on the display 205. Then, it accepts a user's instruction for up / down / left / right movement, enlargement / reduction (print magnification), area selection (print range), and printing via the keyboard 206 or the pointing device 207. In other words, the viewer program 306 uses the second drawing data generated by the intermediate code converter 305, and displays the display means for displaying an image and processing the displayed image according to the input instruction. It functions as a processing means. User instructions relating to processing such as vertical and horizontal movement, enlargement / reduction (printing magnification), and region selection (printing range) are stored in the RAM 202 as display print information 304 (processing data). Upon receiving a print instruction from the user, the viewer program 306 uses the network interface 210 to transmit intermediate code data 303 and display print information 304 to the printer controller 307 via the network 103. That is, the viewer program 306 also functions as a transmission that internally adds the processing data representing the processing processing to the second drawing data and transmits it to the image forming device. The contents of the SVG document file 302 and the intermediate code data 303 and the operation of the viewer program 306 will be described later with reference to FIGS.

307はプリンタ102のブロック境界を表わす。コントローラ307はRAM209に格納され、常に実行可能な状態にあるプログラムである。コントローラ307はネットワークインタフェース210を通じてビューワプログラム306から中間コードデータ303と表示印刷情報304を受信すると、RAM209に中間コードデータ308および表示印刷情報309として格納する。そして、その情報にしたがってプリンタエンジン212を制御して印刷を行なう。コントローラ307の動作については図13〜図14を用いて後述する。   Reference numeral 307 denotes a block boundary of the printer 102. The controller 307 is a program that is stored in the RAM 209 and is always executable. When the controller 307 receives the intermediate code data 303 and the display print information 304 from the viewer program 306 through the network interface 210, the controller 307 stores them in the RAM 209 as intermediate code data 308 and display print information 309. Then, printing is performed by controlling the printer engine 212 according to the information. The operation of the controller 307 will be described later with reference to FIGS.

[SVG文書ファイル]
次に、図4〜図5を参照して、本実施の形態で使用するSVG文書ファイルについて説明する。
[SVG document file]
Next, the SVG document file used in the present embodiment will be described with reference to FIGS.

図4は、本実施の形態で使用するSVG文書ファイル302の内容を示す図である。1行目はXML宣言(XML Declaration)であり、本SVG文書ファイルがXML1.0仕様にしたがって記述されていることを示す。   FIG. 4 is a diagram showing the contents of the SVG document file 302 used in the present embodiment. The first line is an XML declaration (XML Declaration), which indicates that this SVG document file is described in accordance with the XML 1.0 specification.

2〜3行目は文書型宣言(Document Type Declaration)であり、外部サブセットとしてSVG1.1の文書型定義(Document Type Definition;DTD)を参照している。   The second and third lines are a document type declaration (Document Type Declaration), and refer to the SVG 1.1 Document Type Definition (DTD) as an external subset.

4〜5行目はルート要素としての<svg>要素の開始タグである。<svg>要素の幅・高さとしてそれぞれ21.0cmと29.7cm(A4サイズ)、ユーザ座標系として(0,0)−(210,297)を指定しているほか、SVG名前空間と、準拠するSVGのバージョン番号を指定している。   The 4th to 5th lines are start tags of <svg> elements as root elements. <Svg> The width and height of the element are 21.0 cm and 29.7 cm (A4 size), respectively, (0,0)-(210,297) is specified as the user coordinate system, and the SVG namespace A compliant SVG version number is specified.

6行目は<desc>要素であり、本SVG文書ファイルについての説明を記述する。<desc>要素の内容はSVG文書のレンダリングには使用されない。   The sixth line is a <desc> element, which describes the description of this SVG document file. The content of the <desc> element is not used for rendering the SVG document.

7、10、13行目はコメント要素である。コメント要素の内容もSVG文書のレンダリングには使用されない。   The seventh, tenth and thirteenth lines are comment elements. The content of the comment element is also not used for rendering the SVG document.

8〜9行目は矩形をレンダリングするための<rect>要素である。左上座標の値はユーザ座標系において(30,30)を指定し、幅と高さの値は4行目のviewBoxに対する割合としてそれぞれ40%と30%を指定している。矩形内部の塗りつぶしの色は"yellow"(黄色)、矩形の外形線の色は"blue"(青色)、外形線の幅はユーザ座標系において2と指定している。   The 8th to 9th lines are <rect> elements for rendering a rectangle. The upper left coordinate value designates (30, 30) in the user coordinate system, and the width and height values designate 40% and 30% as the ratio to the viewBox in the fourth row, respectively. The fill color inside the rectangle is designated as “yellow”, the color of the outline of the rectangle is “blue”, and the width of the outline is designated as 2 in the user coordinate system.

11〜12行目は円をレンダリングするための<circle>要素である。中心座標の値はユーザ座標系において(140,120)を指定し、半径の値はユーザ座標系において50を指定している。円内部の塗りつぶしの色は"red"(赤色)、円の外形線の色は"blue"(青色)、外形線の幅はユーザ座標系において2と指定している。   The 11th to 12th lines are <circle> elements for rendering a circle. The center coordinate value specifies (140, 120) in the user coordinate system, and the radius value specifies 50 in the user coordinate system. The fill color inside the circle is designated as "red", the outline color of the circle is designated as "blue", and the width of the outline is designated as 2 in the user coordinate system.

14〜15行目は三角形をレンダリングするための<path>要素である。パスはユーザ座標系における絶対座標の(100,140)から始まり、次にユーザ座標系における相対座標で(50,90)まで直線を引き、次にユーザ座標系における相対座標で(−100,0)まで直線を引き、最後にパスを閉じている。パス内部の塗りつぶしの色は"green"(緑色)、パスの外形線の色は"blue"(青色)、外形線の幅はユーザ座標系において2と指定している。   The 14th to 15th lines are <path> elements for rendering a triangle. The path starts from absolute coordinates (100,140) in the user coordinate system, then draws a straight line to (50,90) in relative coordinates in the user coordinate system, and then (-100,0) in relative coordinates in the user coordinate system. ) Draw a straight line until the end, and finally close the path. The fill color inside the path is designated as “green”, the color of the outline of the path is designated as “blue”, and the width of the outline is designated as 2 in the user coordinate system.

14行目はルート要素としての<svg>要素の終了タグであり、4〜5行目の開始タグに対応するものである。図4に示したSVG文書ファイルのファイルサイズは、文字コードとしてUTF−8、改行コードとしてMS−DOS(Windows(登録商標))形式の2バイト(0D0AH)を使用した場合、641バイトになる。   The 14th line is the end tag of the <svg> element as the root element, and corresponds to the start tag of the 4th to 5th lines. The file size of the SVG document file shown in FIG. 4 is 641 bytes when UTF-8 is used as the character code and 2 bytes (0D0AH) in the MS-DOS (Windows (registered trademark)) format is used as the line feed code.

図4に示したSVG文書ファイルをレンダリングした結果を図5に示す。501が8〜9行目の<rect>要素に対応する矩形、502が11〜12行目の<circle>要素に対応する円、503が14〜15行目の<path>要素に対応する三角形である。504はSVG文書全体の外接矩形を示している。外接矩形504のサイズは幅21.0cm、高さ29.7cmである。   The result of rendering the SVG document file shown in FIG. 4 is shown in FIG. 501 is a rectangle corresponding to the <rect> element on the 8th to 9th lines, 502 is a circle corresponding to the <circle> element on the 11th to 12th lines, and 503 is a triangle corresponding to the <path> element on the 14th to 15th lines. It is. Reference numeral 504 denotes a circumscribed rectangle of the entire SVG document. The size of the circumscribed rectangle 504 is 21.0 cm in width and 29.7 cm in height.

[中間コード]
次に、図6〜7を参照して、本実施の形態で使用する中間コードについて説明する。図6は、本実施の形態で使用する中間コードの仕様を示す図である。
[Intermediate code]
Next, an intermediate code used in the present embodiment will be described with reference to FIGS. FIG. 6 is a diagram showing the specifications of the intermediate code used in the present embodiment.

601はレンダリング命令を表わすオペコードであり、数字で指定する。本実施の形態では10種類のオペコードを定義している。オペコードは1バイト整数として中間コードデータ303、308に格納される。   Reference numeral 601 denotes an operation code representing a rendering command, which is designated by a number. In the present embodiment, ten types of operation codes are defined. The operation code is stored in the intermediate code data 303 and 308 as a 1-byte integer.

602はオペコードを人間が識別しやすくするためのニーモニックである。ニーモニックは中間コードの内容をダンプして示すような場合にのみ使用し、中間コードデータ303、308には含まれない。   Reference numeral 602 denotes a mnemonic for facilitating human identification of the operation code. The mnemonic is used only when the contents of the intermediate code are dumped and shown, and is not included in the intermediate code data 303 and 308.

603はオペコードに対する引数を表わすオペランドである。オペランドの数とその意味はオペコードによって異なる。オペランドは2バイト浮動小数点数として中間コードデータ303、308に格納される。   Reference numeral 603 denotes an operand representing an argument for the operation code. The number of operands and their meaning depend on the opcode. The operand is stored in the intermediate code data 303 and 308 as a 2-byte floating point number.

本実施の形態で使用する中間コードでは、単位系としてmmのみを使用する。オペランドに座標や長さを指定する場合は、すべてmmに換算した値を指定する。座標値はページ左上を原点とする絶対値で表わす。オペランドに色を指定する場合はRGB(赤・緑・青)で表わし、R(赤)、G(緑)、B(青)の値をそれぞれ0.0〜1.0の範囲で指定する。   In the intermediate code used in the present embodiment, only mm is used as the unit system. When specifying the coordinate or length in the operand, specify the value converted to mm. Coordinate values are expressed as absolute values with the origin at the top left of the page. When a color is designated as an operand, it is expressed in RGB (red / green / blue), and values of R (red), G (green), and B (blue) are designated in the range of 0.0 to 1.0.

オペコード0(ニーモニックPageStart)はページの開始を表わす。オペランドはページの幅(mm)とページの高さ(mm)である。   Opcode 0 (mnemonic PageStart) represents the start of the page. The operands are page width (mm) and page height (mm).

オペコード1(ニーモニックPageEnd)はページの終了を表わす。オペランドはない。   Opcode 1 (mnemonic PageEnd) represents the end of the page. There is no operand.

オペコード2(ニーモニックFill)は塗りつぶしの色の指定である。Fillで指定する塗りつぶしは以降のレンダリング命令すべてに適用される。オペランドは塗りつぶしの色(RGB)である。   Opcode 2 (mnemonic fill) is a fill color specification. The fill specified by Fill is applied to all subsequent rendering instructions. The operand is a fill color (RGB).

オペコード3(ニーモニックStroke)は外形線の指定である。Strokeで指定する外形線は以降のレンダリング命令すべてに適用される。オペランドは外形線の色(RGB)と、外形線の幅(mm)である。   Opcode 3 (mnemonic Stroke) is an outline specification. The outline specified by Stroke is applied to all subsequent rendering commands. The operands are the outline color (RGB) and the outline width (mm).

オペコード4(ニーモニックPathStart)はパスの開始を表わす。オペランドはない。   Opcode 4 (mnemonic PathStart) represents the start of the path. There is no operand.

オペコード5(ニーモニックPathEnd)はパスの終了を表わす。オペランドはクローズフラグであり、"1"が指定された場合はパスの終了位置から開始位置まで直線をレンダリングすることで、パスを閉じることを表わす。"0"が指定された場合は何もしない。   Opcode 5 (mnemonic PathEnd) represents the end of the path. The operand is a close flag. When “1” is designated, it represents that the path is closed by rendering a straight line from the end position to the start position of the path. If "0" is specified, nothing is done.

オペコード6(ニーモニックPathMoveTo)はパスのレンダリング位置の移動を表わす。PathStart命令とPathEnd命令の間でのみ有効である。PathMoveToはレンダリング位置を移動するだけで、実際のレンダリングは行なわない。オペランドは移動位置座標をX(横方向)(mm)とY(縦方向)(mm)の値で指定する。   Opcode 6 (mnemonic PathMoveTo) represents the movement of the rendering position of the path. Valid only between PathStart and PathEnd instructions. PathMoveTo only moves the rendering position, not the actual rendering. The operand specifies the movement position coordinates with values of X (horizontal direction) (mm) and Y (vertical direction) (mm).

オペコード7(ニーモニックPathLineTo)はパスの現在位置からオペランドで指定された位置まで直線をレンダリングする。PathStart命令とPathEnd命令の間でのみ有効である。オペランドは直線終端座標をX(横方向)(mm)とY(縦方向)(mm)の値で指定する。   Opcode 7 (mnemonic PathLineTo) renders a line from the current position of the path to the position specified by the operand. Valid only between PathStart and PathEnd instructions. The operand specifies the end coordinates of the straight line with values of X (horizontal direction) (mm) and Y (vertical direction) (mm).

オペコード8(ニーモニックPathArc)はパスの現在位置から円弧をレンダリングする。PathStart命令とPathEnd命令の間でのみ有効である。PathArcは常に時計回り方向に円弧をレンダリングする。オペランドは円弧中心座標のX(横方向)(mm)とY(縦方向)(mm)の値、および、円弧の長さ(角度で指定する)である。   Opcode 8 (Mnemonic PathArc) renders an arc from the current position of the path. Valid only between PathStart and PathEnd instructions. PathArc always renders arcs in a clockwise direction. The operands are X (horizontal direction) (mm) and Y (vertical direction) (mm) values of the arc center coordinates, and the arc length (specified by an angle).

オペコード9(ニーモニックClip)はレンダリングのクリップの指定である。Clipで指定するクリップは以降のレンダリングすべてに適用される。オペランドはクリップ領域の左上座標のX(横方向)(mm)とY(縦方向)(mm)の値、および、クリップ領域の幅(mm)と高さ(mm)である。   The operation code 9 (mnemonic Clip) is a designation of a clip for rendering. The clip specified by Clip is applied to all subsequent renderings. The operands are the X (horizontal direction) (mm) and Y (vertical direction) (mm) values of the upper left coordinates of the clip area, and the width (mm) and height (mm) of the clip area.

図7は、図4に示した内容のSVG文書ファイル302を中間コードコンバータ305が変換した中間コードデータ303の内容を示す図である。中間コードデータ303は1バイト整数のオペコードと2バイト浮動小数点数のオペランドのみが格納されたバイナリデータであるが、図7に示すのはそれを人間が識別しやすくするためにダンプ表示し、ニーモニックも付記したものである。   FIG. 7 is a diagram showing the contents of intermediate code data 303 obtained by converting the SVG document file 302 having the contents shown in FIG. 4 by the intermediate code converter 305. The intermediate code data 303 is binary data in which only a 1-byte integer opcode and a 2-byte floating-point operand are stored. FIG. 7 shows a mnemonic that is dumped to make it easier for humans to identify. Is also added.

1行目はページ開始命令で、オペランドでページの幅と高さを210.0mmと297.0mmに指定している。図4の<svg>要素の開始タグに相当し、長さ指定をcmからmmに換算している。   The first line is a page start instruction, and the page width and height are specified as 210.0 mm and 297.0 mm by an operand. This corresponds to the start tag of the <svg> element in FIG. 4, and the length designation is converted from cm to mm.

2行目は以降のレンダリングに使用する塗りつぶし命令で、オペランドで塗りつぶしの色を黄色、すなわち(R, G, B)=(1.0, 1.0, 0.0)に指定している。図4の<rect>要素のfill属性に相当し、色指定を文字列表記からRGB表記に変換している。   The second line is a fill command used for subsequent rendering, and the fill color is designated as yellow by the operand, that is, (R, G, B) = (1.0, 1.0, 0.0). This corresponds to the fill attribute of the <rect> element in FIG. 4, and the color designation is converted from character string notation to RGB notation.

3行目は以降のレンダリングに使用する外形線命令で、オペランドで外形線の色を青色、すなわち(R, G, B)=(0.0, 0.0, 1.0)に指定し、線幅を2.0mmに指定している。図4の<rect>要素、<circle>要素、<path>要素のstroke属性およびstroke-width属性に相当し、色指定を文字列表記からRGB表記に変換するとともに、長さ指定をユーザ座標系からmmに換算している。   The third line is the outline command used for the subsequent rendering, and the color of the outline is specified as blue in the operand, that is, (R, G, B) = (0.0, 0.0, 1.0) The line width is specified as 2.0 mm. Corresponds to the stroke attribute and stroke-width attribute of the <rect> element, <circle> element, and <path> element in FIG. 4, and the color designation is converted from character string notation to RGB notation, and the length designation is changed to the user coordinate system. To mm.

4〜9行目は矩形のレンダリングを行なう命令群である。5行目はレンダリング位置移動命令、6〜8行目は直線レンダリング命令、9行目はパス終了命令である。これにより、座標(30.0mm,30.0mm)→(114.0mm,30.0mm)→(114.0mm,119.1mm)→(30.0mm,119.1mm)→(30.0mm,30.0mm)を直線で結ぶ閉パスがレンダリングされる。矩形内部は2行目の命令により黄色で塗りつぶされ、外形線は3行目の命令により青色かつ線幅2mmでレンダリングされる。図4の<rect>要素および図5のレンダリング結果501に相当し、座標指定をユーザ座標系からmmに換算し、長さ指定をパーセント指定から絶対値指定に変換している。   The fourth to ninth lines are a group of instructions for rendering a rectangle. The fifth line is a rendering position movement command, the sixth to eighth lines are straight line rendering commands, and the ninth line is a pass end command. Thus, the coordinates (30.0 mm, 30.0 mm) → (114.0 mm, 30.0 mm) → (114.0 mm, 119.1 mm) → (30.0 mm, 119.1 mm) → (30.0 mm, 30 0.0mm) is rendered as a closed path connecting straight lines. The inside of the rectangle is filled with yellow by the command of the second line, and the outline is rendered with blue and a line width of 2 mm by the command of the third line. This corresponds to the <rect> element in FIG. 4 and the rendering result 501 in FIG. 5. The coordinate designation is converted from the user coordinate system to mm, and the length designation is converted from the percentage designation to the absolute value designation.

10行目は以降の塗りつぶしに使用する塗りつぶし命令で、オペランドで塗りつぶしの色を赤色、すなわち(R, G, B)=(1.0, 0.0, 0.0)に指定している。図4の<circle>要素のfill属性に相当し、色指定を文字列表記からRGB表記に変換している。   The 10th line is a fill command used for the subsequent fill, and the fill color is designated as red by the operand, that is, (R, G, B) = (1.0, 0.0, 0.0). This corresponds to the fill attribute of the <circle> element in FIG. 4, and the color designation is converted from character string notation to RGB notation.

11〜14行目は円のレンダリングを行なう命令群である。12行目のレンダリング位置移動命令および13行目の円弧レンダリング命令によって、座標(140.0mm, 120.0mm)を中心とし、座標(140.0mm, 70.0mm)から始まる、角度360.0度の円がレンダリングされる。円内部は10行目の命令により赤色で塗りつぶされ、外形線は3行目の命令により青色かつ線幅2mmでレンダリングされる。図4の<circle>要素および図5のレンダリング結果502に相当し、座標指定や長さ指定をユーザ座標系からmmに換算している。   The 11th to 14th lines are a group of instructions for rendering a circle. An angle of 360.0 degrees, centered on the coordinates (140.0 mm, 120.0 mm) and starting from the coordinates (140.0 mm, 70.0 mm) by the rendering position move command on the 12th line and the arc rendering command on the 13th line Will be rendered. The inside of the circle is painted red by the command on the 10th line, and the outline is rendered in blue and the line width of 2 mm by the command on the 3rd line. This corresponds to the <circle> element in FIG. 4 and the rendering result 502 in FIG. 5, and the coordinate designation and length designation are converted from the user coordinate system to mm.

15行目は以降の塗りつぶしに使用する塗りつぶし命令で、オペランドで塗りつぶしの色を緑色、すなわち(R, G, B)=(0.0, 1.0, 0.0)に指定している。図4の<path>要素のfill属性に相当し、色指定を文字列表記からRGB表記に変換している。   The fifteenth line is a fill command used for the subsequent fills, and the operand color is designated as green, that is, (R, G, B) = (0.0, 1.0, 0.0). This corresponds to the fill attribute of the <path> element in FIG. 4, and the color designation is converted from character string notation to RGB notation.

16〜20行目は三角形のレンダリングを行なう命令群である。17行目はレンダリング位置移動命令、18〜19行目は直線レンダリング命令、20行目はパス終了命令を表わすオペランドの指定である。これにより、座標(100.0mm,140.0mm)→(150.0mm,230.0mm)→(50.0mm,230.0mm)→(100.0mm,140.0mm)を直線で結ぶ閉パスがレンダリングされる。三角形内部は15行目の命令により緑色で塗りつぶされ、外形線は3行目の命令により青色かつ線幅2mmでレンダリングされる。図4の<path>要素および図5のレンダリング結果503に相当し、座標指定をユーザ座標系からmmに換算するとともに、相対座標指定を絶対座標指定に変換している。   The 16th to 20th lines are a group of instructions for rendering a triangle. The 17th line is a rendering position move command, the 18th to 19th lines are straight line rendering commands, and the 20th line is an operand specification representing a pass end command. As a result, a closed path connecting the coordinates (100.0 mm, 140.0 mm) → (150.0 mm, 230.0 mm) → (50.0 mm, 230.0 mm) → (100.0 mm, 140.0 mm) with a straight line is obtained. Rendered. The inside of the triangle is filled with green by the command of the 15th line, and the outline is rendered in blue and the line width of 2 mm by the command of the 3rd line. This corresponds to the <path> element in FIG. 4 and the rendering result 503 in FIG. 5. The coordinate designation is converted from the user coordinate system to mm, and the relative coordinate designation is converted to the absolute coordinate designation.

この中間コードのサイズは、オペコード1バイト、オペランド各2バイトとして95バイトになる。SVG文書ファイルのサイズ641バイトと比較して約1/7に縮小されているため、ファイルやメモリに保持する際のコスト、ネットワーク経由で送信する際のコストが軽減される。また、SVG文書に対するような複雑なパーズが不要になるので、レンダリングも高速に行なうことができる。   The size of this intermediate code is 95 bytes with 1 byte for the opcode and 2 bytes for each operand. Since the size of the SVG document file is reduced to about 1/7 as compared with the size of 641 bytes, the cost for holding in the file or memory and the cost for transmitting via the network are reduced. Further, since complicated parsing as in the SVG document is not required, rendering can be performed at high speed.

[ビューワプログラムの表示・動作概要]
次に、図8〜図9を参照して、ビューワプログラム306の表示と動作の概要について説明する。
[Viewer Program Display / Operation Overview]
Next, an overview of display and operation of the viewer program 306 will be described with reference to FIGS.

図8はビューワプログラム306が起動直後にクライアント101のディスプレイ205に表示したウィンドウを示す図である。801がウィンドウ全体を表わす。802がSVG文書ファイル302の表示領域である。803、804、805、806は表示領域802に表示されるSVG文書をそれぞれ上、左、下、右に移動(スクロール)するためのボタンである。   FIG. 8 shows a window displayed on the display 205 of the client 101 immediately after the viewer program 306 is started. Reference numeral 801 denotes the entire window. Reference numeral 802 denotes a display area of the SVG document file 302. Reference numerals 803, 804, 805, and 806 denote buttons for moving (scrolling) the SVG document displayed in the display area 802 up, left, down, and right, respectively.

807、808は表示領域802に表示されるSVG文書をそれぞれ拡大(ズームイン)、縮小(ズームアウト)するためのボタンである。809はウィンドウ801をクローズしてビューワプログラム306を終了するためのボタンである。810は表示領域802に表示されているSVG文書を印刷するためのボタンである。   Reference numerals 807 and 808 denote buttons for enlarging (zooming in) and reducing (zooming out) the SVG document displayed in the display area 802, respectively. Reference numeral 809 denotes a button for closing the window 801 and ending the viewer program 306. Reference numeral 810 denotes a button for printing the SVG document displayed in the display area 802.

ユーザはクライアント101のキーボード206やポインティングデバイス207を使って804〜810のボタンを操作したり、表示領域802内でクリップ領域を指定したりすることができる。   The user can operate the buttons 804 to 810 using the keyboard 206 and the pointing device 207 of the client 101, and can designate a clip area in the display area 802.

図9は、ビューワプログラム306が行なう処理の、起動から終了までを表わすフローチャートを示す図である。ステップS901は開始である。ビューワプログラム306は、例えば、クライアントコンピュータ101のディスプレイ205に、アイコンなどとして表示される。ユーザがキーボード206やポインティングデバイス207を用いて表示されたアイコンなどをクリックすることによってビューワプログラム306は起動される。具体的には、外部記憶装置204に格納されたビューワプログラム306が読み出され、その一部または全部がRAM202に一時的に記憶され、CPU201によって実行される。ステップS902は第1描画データとしてのSVG文書ファイル302を変換した第2描画データとしての中間コードデータ303を読み込む処理である。ここでは図7に示した中間コードデータを使用して説明する。以降、ここで読み込んだ中間コードデータを変数dlcで参照する。   FIG. 9 is a flowchart showing the processing performed by the viewer program 306 from the start to the end. Step S901 is a start. The viewer program 306 is displayed as an icon or the like on the display 205 of the client computer 101, for example. When the user clicks an icon displayed using the keyboard 206 or the pointing device 207, the viewer program 306 is activated. Specifically, the viewer program 306 stored in the external storage device 204 is read, and a part or all of it is temporarily stored in the RAM 202 and executed by the CPU 201. Step S902 is processing for reading intermediate code data 303 as second drawing data obtained by converting the SVG document file 302 as the first drawing data. Here, description will be made using the intermediate code data shown in FIG. Thereafter, the intermediate code data read here is referred to by the variable dlc.

ステップS903は変数の初期化処理である。変数windowはビューワプログラム306の表示領域802のサイズをピクセルで表わす。要素xは横方向の長さで、ここでは例として400ピクセルである。要素yは縦方向の長さで、ここでは600ピクセルである。   Step S903 is a variable initialization process. The variable window represents the size of the display area 802 of the viewer program 306 in pixels. Element x is the horizontal length, here 400 pixels as an example. Element y is the length in the vertical direction, here 600 pixels.

変数originは表示領域802の左上がSVG文書の左上原点から見てどの座標に位置するかをピクセルで表わす。要素xは横方向の座標値、要素yは縦方向の座標値で、初期値はともに0である。originが(0, 0)ならばSVG文書の左上原点を表示領域802の左上位置に合わせて表示し、これが初期状態である。originがたとえば(100, 100)ならば、SVG文書の左上原点から(100, 100)ピクセル分だけ右下に移動した場所を表示領域802の左上位置に合わせて表示する。変数originを更新して表示領域802の再表示を行なうことで、SVG文書の上下左右移動表示が可能になる。変数originはユーザがボタン803〜806を操作すると更新される。変数originの更新についてはステップS908で後述する。表示の上下左右移動については図10を参照して後述する。   The variable origin represents in pixels which position the upper left of the display area 802 is located from the upper left origin of the SVG document. Element x is a coordinate value in the horizontal direction, element y is a coordinate value in the vertical direction, and both initial values are zero. If origin is (0, 0), the upper left origin of the SVG document is displayed in accordance with the upper left position of the display area 802, which is the initial state. If origin is (100, 100), for example, the position moved to the lower right by (100, 100) pixels from the upper left origin of the SVG document is displayed in accordance with the upper left position of the display area 802. By updating the variable origin and redisplaying the display area 802, the SVG document can be moved up and down and left and right. The variable origin is updated when the user operates the buttons 803 to 806. The update of the variable origin will be described later in step S908. The up / down / left / right movement of the display will be described later with reference to FIG.

変数magは表示倍率を表わす。SVG文書(幅W(mm)高さH(mm))を表示領域802の幅window.x(ピクセル)にぴったり表示するのに必要な倍率と、高さwindow.y(ピクセル)にぴったり表示するのに必要な倍率のうち、小さい方を初期値とする。ここではW=210.0、window.x=400なので、W÷window.x=1.905となる。また、H=297.0、window.y=600なので、H÷window.y=2.02となる。よって、この例では、magは1.905で初期化される。変数magの更新についてはステップS908で後述する。倍率の変更については図11を参照して後述する。   The variable mag represents the display magnification. Magnification required to display an SVG document (width W (mm) height H (mm)) exactly in the width window.x (pixel) of the display area 802 and the height window.y (pixel) The smaller one of the magnifications required for the above is set as the initial value. Here, since W = 21.0 and window.x = 400, W ÷ window.x = 1.905. Since H = 297.0 and window.y = 600, H ÷ window.y = 2.02. Thus, in this example, mag is initialized to 1.905. The update of the variable mag will be described later in step S908. The change of the magnification will be described later with reference to FIG.

変数clipはクリップ領域をピクセルで表わす。要素xと要素yはクリップ領域の左上原点で、表示領域802の左上位置からの相対座標で表わす。要素wと要素hはクリップ領域の横方向と縦方向の長さである。初期値(0, 0, 400, 600)は表示領域802と同じ位置・同じ大きさになる。変数clipの更新についてはステップS908で後述する。クリップ領域の指定については図12を参照して後述する。   The variable clip represents the clip area in pixels. Element x and element y are the upper left origin of the clip area and are expressed by relative coordinates from the upper left position of the display area 802. Element w and element h are the lengths of the clip area in the horizontal and vertical directions. The initial value (0, 0, 400, 600) is the same position and size as the display area 802. The update of the variable clip will be described later in step S908. The designation of the clip area will be described later with reference to FIG.

ステップS904は、表示工程としての画面表示処理である。まず、表示領域802の左上位置を変数originが表わす位置に移動する。次に、中間コードのオペコードとオペランドの内容にしたがって表示領域802にレンダリングを行なうが、この際、各オペランドの座標値および線幅にすべてmagが表わす倍率を乗算する。実例については図10、図11を参照して後述する。   Step S904 is a screen display process as a display process. First, the upper left position of the display area 802 is moved to the position represented by the variable origin. Next, rendering is performed in the display area 802 according to the opcode of the intermediate code and the contents of the operand. At this time, the coordinate value and the line width of each operand are all multiplied by the magnification represented by mag. Examples will be described later with reference to FIGS.

ステップS905はユーザの指示を示す入力があるまで待つ処理である。ユーザの入力を変数keyに格納する。   Step S905 is processing to wait until there is an input indicating a user instruction. Store user input in variable key.

ステップS906はユーザの入力が終了ボタン809の操作だったかどうかを判定する処理である。終了ボタン809の操作であればステップS911に進んでビューワプログラム306を終了する。それ以外の場合はステップS907に進む。   Step S906 is processing to determine whether or not the user input is an operation of the end button 809. If it is an operation of the end button 809, the process proceeds to step S911, and the viewer program 306 is ended. Otherwise, the process proceeds to step S907.

ステップS907はユーザの入力が印刷ボタン810の操作だったかどうかを判定する処理である。印刷ボタン810の操作であればステップS909に進んで印刷処理を行なう。それ以外の場合はステップS908に進む。   Step S907 is processing to determine whether or not the user input is an operation of the print button 810. If it is an operation of the print button 810, the process proceeds to step S909 to perform a printing process. Otherwise, the process proceeds to step S908.

ステップS908は、加工処理工程としての処理であって、ユーザの入力が上下左右移動ボタン803〜806か、拡大縮小ボタン807〜808か、あるいは領域指定だった場合の処理である。   Step S908 is processing as a processing step, and is processing when the user input is the up / down / left / right movement buttons 803 to 806, the enlargement / reduction buttons 807 to 808, or the area designation.

ユーザの入力が上下左右移動ボタン803〜806であれば、変数originの更新を行なう。ユーザの入力が左移動ボタン804であれば、変数origin.xの値を20ピクセル減算する。ユーザの入力が上移動ボタン805であれば、変数origin.yの値を20ピクセル減算する。ユーザの入力が右移動ボタン806であれば、変数origin.xの値を20ピクセル加算する。ユーザの入力が下移動ボタン805であれば、変数origin.yの値を20ピクセル加算する。変数originを参照した上下左右移動表示については図10を参照して後述する。   If the user input is the up / down / left / right movement buttons 803 to 806, the variable origin is updated. If the user input is the left move button 804, the value of the variable origin.x is subtracted by 20 pixels. If the user input is the up button 805, the value of the variable origin.y is subtracted by 20 pixels. If the user input is the right move button 806, the value of the variable origin.x is added by 20 pixels. If the user input is the down button 805, the value of the variable origin.y is added by 20 pixels. The up / down / left / right movement display referring to the variable origin will be described later with reference to FIG.

ユーザの入力が拡大縮小ボタン807〜808であれば、変数magの更新を行なう。ユーザの入力が拡大ボタン807であれば、変数magの値を1.5倍に乗算する。ユーザの入力が縮小ボタン808であれば、変数magの値を1/1.5に除算する。変数magを参照した拡大縮小表示については図11を参照して後述する。   If the user input is an enlargement / reduction button 807 to 808, the variable mag is updated. If the user input is an enlarge button 807, the value of the variable mag is multiplied by 1.5. If the user input is the reduction button 808, the value of the variable mag is divided by 1 / 1.5. The enlarged / reduced display referring to the variable mag will be described later with reference to FIG.

ユーザの入力が領域指定であれば、ユーザの指定した領域を変数clipに格納する。領域指定については図12を参照して後述する。   If the user input is area specification, the user specified area is stored in the variable clip. The area designation will be described later with reference to FIG.

ステップS909はユーザが印刷を指示した場合に、クリップ領域を中間コードの座標値に換算する処理である。まず、現在の変数clipの左上座標clip.x、clip.yは表示領域802の左上位置からの相対座標であることから、表示領域802の左上位置座標値を示すoriginの値を加算する。結果の値はピクセルなので、これをmmに換算するために、現在の表示倍率magで除算する。次に、現在の変数clipのクリップ領域の幅と高さclip.w、clip.hの値はピクセルなので、これもmagで除算してmmに換算する。最後に、magをmagの初期値で除算して、初期値からの倍率に換算する。このようにプリンタに対して送信するための変数mag、clipは、加工処理を表わす加工処理データに相当する。   Step S909 is processing for converting the clip area into the coordinate value of the intermediate code when the user instructs printing. First, since the upper left coordinates clip.x and clip.y of the current variable clip are relative coordinates from the upper left position of the display area 802, an origin value indicating the upper left position coordinate value of the display area 802 is added. Since the resulting value is a pixel, in order to convert it to mm, it is divided by the current display magnification mag. Next, since the values of clip.w and clip.h of the clip area of the current variable clip are pixels, this is also divided by mag and converted to mm. Finally, mag is divided by the initial value of mag and converted to a magnification from the initial value. As described above, the variables mag and clip to be transmitted to the printer correspond to the processing data representing the processing.

ステップS910はプリンタ102のコントローラ307に印刷データを送信する処理である。第2描画データである中間コードデータ303として変数dlcの内容、加工処理データである表示印刷情報304として変数magと変数clipの内容を送信する。プリンタ側の印刷処理については図13〜図14を参照して後述する。ステップS911は終了処理である。
[ビューワプログラムの上下左右移動表示]
次に、図10を参照して、ビューワプログラムの上下左右移動表示について説明する。図10は、図9で用いた数値(ウィンドウサイズ400×600など)を利用して具体的に例示する。また、図9で示したように変数magの値は、初期値1.905のまま、ユーザが上下左右移動ボタン803〜806を操作して変数originが更新されたものとする。
Step S910 is processing for transmitting print data to the controller 307 of the printer 102. The contents of the variable dlc are transmitted as the intermediate code data 303 that is the second drawing data, and the contents of the variable mag and the variable clip are transmitted as the display print information 304 that is the processing data. The printing process on the printer side will be described later with reference to FIGS. Step S911 is an end process.
[Up / down / left / right movement display of viewer program]
Next, the up / down / left / right movement display of the viewer program will be described with reference to FIG. FIG. 10 is a specific example using the numerical values (window size 400 × 600 or the like) used in FIG. Further, as shown in FIG. 9, it is assumed that the variable origin is updated by the user operating the up / down / left / right movement buttons 803 to 806 with the initial value 1.905 as the value of the variable mag.

1005、1009、1013はビューワプログラム306の表示領域802の位置およびサイズを示す。1004、1008、1012は表示する中間コードデータ303の位置およびサイズを示す。1001と1002は中間コードデータ1004の左上原点を(0, 0)とする座標軸を表わす。   Reference numerals 1005, 1009, and 1013 denote the position and size of the display area 802 of the viewer program 306. Reference numerals 1004, 1008, and 1012 denote the position and size of the intermediate code data 303 to be displayed. Reference numerals 1001 and 1002 denote coordinate axes with the upper left origin of the intermediate code data 1004 as (0, 0).

まず、図10(a)で1003に示すように変数originの値が初期値(0, 0)のままの場合を考える。この時、中間コードデータ1004の左上原点と表示領域1005の左上位置は一致している。また、変数magの初期値1.905はステップS903で中間コードデータの幅を表示領域の幅にぴったり表示するのに必要な倍率が選択されたものである。したがって、中間コードデータ1004のすべての座標値と線幅に変数magの値を乗算すると、中間コードデータ1004の横幅が表示領域1005とちょうど同じになるようにmmからピクセルへの換算が行なわれることになる。以上により、ステップS904で中間コードデータと表示領域の位置・サイズは1004と1005に示すように調整される。この位置・サイズで中間コードデータ1004をレンダリングし、表示領域1005でクリップされる結果、ビューワプログラムのウィンドウ801における表示は図10(b)の1006に示すようになる。   First, consider the case where the value of the variable origin remains the initial value (0, 0) as indicated by 1003 in FIG. At this time, the upper left origin of the intermediate code data 1004 and the upper left position of the display area 1005 coincide. The initial value 1.905 of the variable mag is obtained by selecting the magnification necessary for displaying the width of the intermediate code data exactly to the width of the display area in step S903. Therefore, when all the coordinate values of the intermediate code data 1004 and the line width are multiplied by the value of the variable mag, conversion from mm to pixels is performed so that the horizontal width of the intermediate code data 1004 is exactly the same as that of the display area 1005. become. As described above, the position and size of the intermediate code data and the display area are adjusted as indicated by 1004 and 1005 in step S904. The intermediate code data 1004 is rendered at this position and size, and is clipped in the display area 1005. As a result, the display in the viewer program window 801 is as shown at 1006 in FIG.

次に、ユーザが左移動ボタン804を5回操作した場合を考える。ステップS908の処理により、変数originの値は図10(c)の1007に示すように(−100, 0)になる。この時、表示領域1009の左上位置は中間コードデータ1008の左上原点から見てoriginの値に等しい座標(−100, 0)に位置する。また、変数magの値は初期値1.905のままである。以上により、ステップS904で中間コードデータと表示領域の位置・サイズは1008と1009に示すように調整される。この位置・サイズで中間コードデータ1008をレンダリングし、表示領域1009でクリップされる結果、ビューワプログラムのウィンドウ801における表示は図10(d)の1010に示すようになる。   Next, consider a case where the user operates the left movement button 804 five times. By the processing in step S908, the value of the variable origin becomes (−100, 0) as indicated by 1007 in FIG. At this time, the upper left position of the display area 1009 is located at coordinates (−100, 0) equal to the origin value when viewed from the upper left origin of the intermediate code data 1008. Further, the value of the variable mag remains the initial value 1.905. As described above, in step S904, the position and size of the intermediate code data and the display area are adjusted as indicated by 1008 and 1009. The intermediate code data 1008 is rendered at this position and size and clipped in the display area 1009. As a result, the display in the viewer program window 801 is as shown at 1010 in FIG.

次に、ユーザがさらに下移動ボタン805を8回操作した場合を考える。ステップS908の処理により、変数originの値は図10(e)の1011に示すように(−100, −160)になる。この時、表示領域1009の左上位置は中間コードデータ1012の左上原点から見て変数originの値に等しい座標に位置する。また、変数magの値は初期値1.905のままである。以上により、ステップS904で中間コードデータと表示領域の位置・サイズは1012と1013に示すように調整される。この位置・サイズで中間コード1012をレンダリングし、表示領域1013でクリップされる結果、ビューワプログラムのウィンドウ801における表示は図10(f)の1014に示すようになる。ユーザが右移動ボタン806や上移動ボタン803を操作した場合の表示動作も同様である。   Next, consider a case where the user further operates the down button 805 eight times. By the processing in step S908, the value of the variable origin becomes (−100, −160) as indicated by 1011 in FIG. At this time, the upper left position of the display area 1009 is located at a coordinate equal to the value of the variable origin when viewed from the upper left origin of the intermediate code data 1012. Further, the value of the variable mag remains the initial value 1.905. As described above, the position and size of the intermediate code data and the display area are adjusted as indicated by 1012 and 1013 in step S904. As a result of rendering the intermediate code 1012 at this position and size and clipping it in the display area 1013, the display in the window 801 of the viewer program is as shown at 1014 in FIG. The display operation when the user operates the right movement button 806 or the up movement button 803 is the same.

[ビューワプログラムの拡大縮小表示]
次に、図11を参照して、ビューワプログラムの拡大縮小表示について説明する。図11は、変数originの値がそれぞれ(0, 0)と(−100, −160)である場合に、ユーザが拡大ボタン807を一回操作して変数magの値が初期値の1.5倍(1.905×1.5=2.857)になった場合の表示を示す図である。
[Viewer program enlargement / reduction display]
Next, the enlarged / reduced display of the viewer program will be described with reference to FIG. FIG. 11 shows that when the value of the variable origin is (0, 0) and (−100, −160), respectively, the user operates the enlarge button 807 once and the value of the variable mag is 1.5, which is the initial value. It is a figure which shows a display when it becomes double (1.905 * 1.5 = 2.857).

図11において、1105、1109は、ビューワプログラム306の表示領域802の位置およびサイズを示す。1104、1108は、表示する中間コードデータ303の位置およびサイズを示す。1101と1102は中間コードデータ1104の左上原点を(0, 0)とする座標軸を表わす。   In FIG. 11, 1105 and 1109 indicate the position and size of the display area 802 of the viewer program 306. Reference numerals 1104 and 1108 denote the position and size of the intermediate code data 303 to be displayed. Reference numerals 1101 and 1102 denote coordinate axes having the upper left origin of the intermediate code data 1104 as (0, 0).

まず、図11(a)の1103に示すように変数originの値が初期値のまま(0, 0)の場合を考える。この時、中間コードデータ1104の左上原点と表示領域1105の左上位置は一致している。また、変数magの値は初期値の1.5倍なので、中間コードデータ1004のすべての座標値と線幅に変数magの値を乗算すると、中間コードデータ1004の横幅が表示領域1005のちょうど1.5倍になるようにmmからピクセルへの換算が行なわれる。以上により、ステップS904で中間コードデータと表示領域の位置・サイズは1104と1105に示すように調整される。この位置・サイズで中間コードデータ1104をレンダリングし、表示領域1105でクリップされる結果、ビューワプログラムのウィンドウ801における表示は図11(b)の1106に示すようになる。   First, let us consider a case where the value of the variable origin remains at the initial value (0, 0) as indicated by 1103 in FIG. At this time, the upper left origin of the intermediate code data 1104 coincides with the upper left position of the display area 1105. Further, since the value of the variable mag is 1.5 times the initial value, when all the coordinate values and the line width of the intermediate code data 1004 are multiplied by the value of the variable mag, the horizontal width of the intermediate code data 1004 is exactly 1 in the display area 1005. Conversion from mm to pixels is performed so as to be .5 times. As described above, the intermediate code data and the position / size of the display area are adjusted as indicated by 1104 and 1105 in step S904. As a result of rendering the intermediate code data 1104 at this position and size and clipping it in the display area 1105, the display in the window 801 of the viewer program becomes as shown at 1106 in FIG.

次に、図11(c)の1107に示すように変数originが(−100, −160)になった場合を考える。この時、表示領域1109の左上位置は中間コードデータ1108の左上原点から見てoriginの値に等しい座標に位置する。また、変数magの値は初期値の1.5倍である。以上により、ステップS904で中間コードデータと表示領域の位置・サイズは1108と1109に示すように調整される。この位置・サイズで中間コードデータ1108をレンダリングし、表示領域1109でクリップされる結果、ビューワプログラムのウィンドウ801における表示は図11(d)の1110に示すようになる。縮小表示についても同様である。   Next, consider the case where the variable origin becomes (−100, −160) as indicated by 1107 in FIG. At this time, the upper left position of the display area 1109 is located at a coordinate equal to the origin value when viewed from the upper left origin of the intermediate code data 1108. The value of variable mag is 1.5 times the initial value. As described above, in step S904, the position and size of the intermediate code data and the display area are adjusted as indicated by 1108 and 1109. As a result of rendering the intermediate code data 1108 at this position and size and clipping it in the display area 1109, the display in the window 801 of the viewer program is as shown at 1110 in FIG. The same applies to the reduced display.

[ビューワプログラムの領域選択]
次に、図12を参照して、ビューワプログラムの領域選択について説明する。図12は、変数originの値が(240, 240)、変数magの値が初期値の2倍(1.905×2=3.810)である場合の表示を示す図である。
[Viewer program area selection]
Next, referring to FIG. 12, the area selection of the viewer program will be described. FIG. 12 is a diagram showing a display when the value of the variable origin is (240, 240) and the value of the variable mag is twice the initial value (1.905 × 2 = 3.810).

図12(a)において、1205はビューワプログラム306の表示領域802の位置およびサイズを示す。1204は表示する中間コードデータ303の位置およびサイズを示す。1201と1202は中間コードデータ1204の左上原点を(0, 0)とする座標軸を表わす。ステップS904で中間コードデータと表示領域の位置・サイズは1204と1205に示すように調整される。この位置・サイズで中間コードデータ1204をレンダリングし、表示領域1205でクリップされる結果、ビューワプログラムのウィンドウ801における表示は図12(b)の1208に示すようになる。ユーザはキーボード206やポインティングデバイス207を使って、表示領域1208内の任意の矩形領域を選択することができる。選択した様子を1206に示す。この選択領域はステップS908で変数clipに格納される。ここではユーザがclip=(10, 20, 380, 550)に相当する領域を選択したとする。   In FIG. 12A, reference numeral 1205 indicates the position and size of the display area 802 of the viewer program 306. Reference numeral 1204 denotes the position and size of the intermediate code data 303 to be displayed. Reference numerals 1201 and 1202 denote coordinate axes having the upper left origin of the intermediate code data 1204 as (0, 0). In step S904, the position and size of the intermediate code data and the display area are adjusted as indicated by 1204 and 1205. The intermediate code data 1204 is rendered at this position and size, and is clipped in the display area 1205. As a result, the display in the window 801 of the viewer program is as indicated by 1208 in FIG. The user can select an arbitrary rectangular area in the display area 1208 using the keyboard 206 and the pointing device 207. The selected state is shown at 1206. This selected area is stored in the variable clip in step S908. Here, it is assumed that the user has selected an area corresponding to clip = (10, 20, 380, 550).

ユーザがこの領域選択を行なった状態で印刷を指示すると、ステップS909で単位系の換算が行なわれる。ここではorigin=(240, 240)(単位はピクセル)、mag=3.810、clip=(10, 20, 380, 550)(単位はピクセル)である。これから、clip.x=(240+10)÷3.810=65.617、clip.y=(240+20)÷3.810=68.241、clip.w=380÷3.810=99.738、clip.h=550÷3.810=144.357となる。つまり、clip=(65.617, 68.241, 99.738, 144.357)(単位はmm)となる。また、mag=3.810÷1.905=2となる。したがって、ステップS910で、中間コード303として図7に示すコードと、表示印刷情報304としてmag=2及びclip=(65.617, 68.241, 99.738, 144.357)がプリンタコントローラ307に送信される。   When the user instructs printing in the state where the area is selected, the unit system is converted in step S909. Here, origin = (240, 240) (unit is pixel), mag = 3.810, clip = (10, 20, 380, 550) (unit is pixel). From this, clip.x = (240 + 10) ÷ 3.810 = 65.617, clip.y = (240 + 20) ÷ 3.810 = 68.241, clip.w = 380 ÷ 3.810 = 99.738, clip. h = 550 ÷ 3.810 = 144.357. That is, clip = (65.617, 68.241, 99.738, 144.357) (unit is mm). Also, mag = 3.810 ÷ 1.905 = 2. Accordingly, in step S910, the code shown in FIG. 7 as the intermediate code 303 and mag = 2 and clip = (65.617, 68.241, 99.738, 144.357) as the display print information 304 are sent to the printer controller 307. Sent.

[印刷]
最後に、図13〜図14を参照して、プリンタコントローラ307による印刷について説明する。図13はプリンタコントローラ307の動作を表わすフローチャートを示す図である。
[printing]
Finally, printing by the printer controller 307 will be described with reference to FIGS. FIG. 13 is a flowchart showing the operation of the printer controller 307.

ステップS1301は開始である。ステップS1302は変数の初期化処理である。ビューワプログラム306から受信した中間コードデータ308と表示印刷情報309を参照する変数として、中間コードデータ308を変数dlcで参照する。また、表示印刷情報309のうち倍率に関する情報を変数magで参照し、領域選択に関する情報を変数clipで参照する。   Step S1301 is a start. Step S1302 is a variable initialization process. As a variable for referring to the intermediate code data 308 and the display print information 309 received from the viewer program 306, the intermediate code data 308 is referred to by a variable dlc. In addition, information regarding magnification in the display print information 309 is referred to by a variable mag, and information regarding area selection is referred to by a variable clip.

ステップS1303は中間コードデータdlcのレンダリング処理である。すべての座標値・線幅に変数magの値を乗じてレンダリングする。ステップS1304はレンダリング結果のクリップ処理である。変数clipの値にmagの値を乗じた位置・サイズでクリップを行なう。ステップS1305は出力処理である。レンダリング結果にしたがってプリンタエンジン212を制御し、出力を行なう。ステップS1306は終了処理である。   Step S1303 is a rendering process of the intermediate code data dlc. Renders all coordinate values and line widths multiplied by the value of the variable mag. Step S1304 is a rendering result clipping process. Clips at the position and size obtained by multiplying the value of variable clip by the value of mag. Step S1305 is output processing. The printer engine 212 is controlled according to the rendering result, and output is performed. Step S1306 is an end process.

図14は、図7に示す中間コードデータと、図12に示した倍率mag=2および領域選択clip=(65.617,68.241,99.738,144.357)の表示印刷情報を受信した場合のレンダリングおよびクリップの様子を示す図である。   14 receives the intermediate code data shown in FIG. 7 and the display print information of the magnification mag = 2 and the area selection clip = (65.617, 68.241, 99.738, 144.357) shown in FIG. It is a figure which shows the state of rendering and a clip at the time of doing.

図14(a)の1401はステップS1303で中間コードデータ308をレンダリングした位置およびサイズを示す。変数magの値が乗算されているので、横方向は420.0mm、縦方向は594.0mmになる。1402は中間コード308の用紙サイズを図示したものである。1403は中間コードデータ308の用紙(210.0mm, 297.0mm)を中間コードデータ308の左上原点からclip情報の左上座標(65.617mm, 68.241mm)分だけ移動させた位置およびサイズを示す。   1401 in FIG. 14A indicates the position and size at which the intermediate code data 308 is rendered in step S1303. Since the value of the variable mag is multiplied, the horizontal direction is 42.0 mm and the vertical direction is 594.0 mm. Reference numeral 1402 shows the sheet size of the intermediate code 308. Reference numeral 1403 denotes a position and size obtained by moving the sheet (210.0 mm, 297.0 mm) of the intermediate code data 308 by the upper left coordinates (65.617 mm, 68.241 mm) of the clip information from the upper left origin of the intermediate code data 308. .

1403はステップS1304でレンダリング結果をクリップした位置およびサイズを示す。変数clipに変数magの値が乗算されているので、位置は中間コードデータの左上から(131.234mm, 136.482mm)、大きさは(136.482mm, 288.714mm)になる。ステップS1305で出力を行なった結果、図14(b)の1404に示すサイズの用紙に1405に示す出力結果を得る。   Reference numeral 1403 denotes the position and size where the rendering result is clipped in step S1304. Since the variable clip is multiplied by the value of the variable mag, the position is from the upper left of the intermediate code data (131.234 mm, 136.482 mm), and the size is (136.482 mm, 288.714 mm). As a result of the output in step S1305, the output result shown in 1405 is obtained on the paper having the size shown in 1404 in FIG.

[実施形態の効果]
以上により、容易かつ少ない処理負荷で、ディスプレイ表示時に行なった移動・拡大縮小・領域選択処理を、印刷結果に反映させることができる。印刷指示の際にユーザがディスプレイ上で印刷領域を選択すれば、その選択に応じてクリップされた状態で印刷できる。
[Effect of the embodiment]
As described above, the movement / enlargement / reduction / area selection processing performed at the time of display can be reflected in the print result easily and with a small processing load. If the user selects a print area on the display when issuing a print instruction, printing can be performed in a clipped state in accordance with the selection.

PDL文書をそのまま使用して表示・印刷する場合と比べ、画像変形処理ごとにPDL文書を書き換えたり、パーズ・レンダリングしたりする必要がないので、処理速度が向上する。特に、ユーザの指示によりリアルタイムで移動・拡大縮小表示を行なう際に効果がある。   Compared with the case where the PDL document is used for display and printing as it is, it is not necessary to rewrite or parse / render the PDL document for each image transformation process, so the processing speed is improved. This is particularly effective when moving / enlarging / reducing display in real time according to a user instruction.

また、中間コードを使用することで、PDL文書をプリンタに送信する必要がなく、もともとのPDL文書を書き換えることなく保持しておくことができる。プリンタに送信するデータのサイズも小さく、パーズも容易なので、送信速度も向上する。さらに、中間コードを使用することで、複数種類のPDL文書が対象であっても、同一のビューワプログラムで表示・印刷が可能である。   Further, by using the intermediate code, it is not necessary to transmit the PDL document to the printer, and the original PDL document can be held without being rewritten. Since the size of data transmitted to the printer is small and parsing is easy, the transmission speed is also improved. Further, by using the intermediate code, even if a plurality of types of PDL documents are targeted, they can be displayed and printed with the same viewer program.

(他の実施の形態)
本実施の形態では中間コードデータと表示印刷情報を別途プリンタに送信したが、これ以外に、クライアントPC上で表示印刷情報を用いて中間コードデータそのものを書き換え、プリンタには中間コードデータのみを送信する実施の形態も考えられる。この場合、まず表示印刷情報のうちの倍率を中間コードデータのすべての座標値と線幅に乗算する。さらに、表示印刷情報のうち領域選択に関する情報をオペコード9(ニーモニックClip)命令として中間コードのオペコード9(ニーモニックPageStart)命令の直後に挿入する。前述の実施の形態で使用した中間コードデータ(図7)と表示印刷情報(図12)にしたがって中間コードデータを書き換えた例を図15に示す。
(Other embodiments)
In this embodiment, the intermediate code data and the display print information are separately transmitted to the printer. In addition, the intermediate code data itself is rewritten using the display print information on the client PC, and only the intermediate code data is transmitted to the printer. Embodiments to be considered are also conceivable. In this case, first, the magnification of the display print information is multiplied by all the coordinate values and the line width of the intermediate code data. Further, information relating to area selection in the display print information is inserted immediately after the operation code 9 (mnemonic PageStart) instruction of the intermediate code as an operation code 9 (mnemonic Clip) instruction. FIG. 15 shows an example in which the intermediate code data is rewritten according to the intermediate code data (FIG. 7) and display print information (FIG. 12) used in the above-described embodiment.

この場合、変数clipや変数magを用いた計算処理を、クライアント側で行なうので、プリンタ側の処理負担が軽減される。クライアント側の処理能力に対してプリンタ側の処理能力が低い場合には、全体として印刷速度が向上するという効果がある。   In this case, calculation processing using the variable clip and variable mag is performed on the client side, so the processing load on the printer side is reduced. When the processing capability on the printer side is lower than the processing capability on the client side, there is an effect that the printing speed is improved as a whole.

本実施の形態ではPDLとしてSVG1.1を使用したが、もちろんこれに限るものではなく、SVGのその他のバージョン、あるいは中間コードに変換可能なものであれば任意のPDLを使用することが可能である。   In this embodiment, SVG 1.1 is used as the PDL. However, the present invention is not limited to this, and any other version of SVG or any PDL that can be converted into an intermediate code can be used. is there.

図1においてPCとプリンタはネットワーク接続されるとしたが、これ以外の接続形態であってもよく、たとえばPCとプリンタが直接接続されていても、本発明の実施を妨げるものではない。   In FIG. 1, the PC and the printer are connected to the network. However, other connection forms may be used. For example, even if the PC and the printer are directly connected, the implementation of the present invention is not hindered.

図2でプログラムはRAM202に格納されるとしたが、これに限るものではない。他の実施の形態においてはプログラムを外部記憶装置204から読み込んで実行するようにしてもよいし、ネットワークインタフェース203を介して受信して実行するようにしてもよい。また、図2には示していないが、ROM等の読み出し専用の内部記憶部から読み込んで実行するようにしてもよい。また、キーボード206やポインティングデバイス207の代わりに、あるいはそれらに加えて、音声入力等の他の入力装置を備えることもできる。また、ディスプレイ205、キーボード206、ポインティングデバイス207を他のコンピュータ装置と共有する場合も考えられる。   Although the program is stored in the RAM 202 in FIG. 2, the present invention is not limited to this. In other embodiments, the program may be read from the external storage device 204 and executed, or may be received and executed via the network interface 203. Although not shown in FIG. 2, the program may be read from a read-only internal storage unit such as a ROM and executed. Further, instead of or in addition to the keyboard 206 and the pointing device 207, other input devices such as voice input may be provided. Further, the display 205, the keyboard 206, and the pointing device 207 may be shared with other computer devices.

図3で中間コードデータ303、308および表示印刷情報304、309はRAMに保持したが、これ以外に、ファイルやデータベースその他の永続記憶に保存してもよい。また、同じPDL文書に対する中間コードデータはキャッシュしておいて、次回以降の処理に利用する形態も考えられる。   In FIG. 3, the intermediate code data 303 and 308 and the display print information 304 and 309 are stored in the RAM, but may be stored in a file, database, or other permanent storage. Further, it is also possible to consider a form in which intermediate code data for the same PDL document is cached and used for subsequent processing.

図6において中間コードの仕様を示したが、使用可能な中間コードはこの仕様に限定されるものではない。たとえば単位系はmm以外の任意の単位系またはその組み合わせであってもよい。パスにはベジエ曲線、楕円弧、その他の数学的に表現可能な任意のパスを記述できるようにしてもよい。Fillは単色ではなくブラシ、イメージ、グラデーション等の複雑な塗りを行なえるようにしてもよい。色はRGB以外にアルファ値の追加、カラープロファイルによる指定、デバイスカラーによる指定、特色の指定なども行なえるようにしてもよい。また、オペコードとして1バイト整数、オペランドとして2バイト浮動小数点数を使うことも単なる一例であって、他のエンコード方法を使用しても構わない。   Although the specification of the intermediate code is shown in FIG. 6, the usable intermediate code is not limited to this specification. For example, the unit system may be any unit system other than mm or a combination thereof. The path may be a Bezier curve, elliptical arc, or any other mathematically expressible path. The Fill may be a single color and can be applied with complicated paint such as brushes, images, and gradations. In addition to RGB, an alpha value may be added, specification using a color profile, specification using a device color, specification of a special color, and the like may be performed. The use of a 1-byte integer as an opcode and a 2-byte floating point number as an operand is merely an example, and other encoding methods may be used.

本実施の形態では1ページの表示・印刷を行なう例を示したが、PDLが複数ページに対応するものであれば、中間コード、ビューワプログラム、コントローラをそれに対応させてもよい。   In the present embodiment, an example in which one page is displayed / printed has been described. However, if the PDL corresponds to a plurality of pages, an intermediate code, a viewer program, and a controller may be associated with them.

また、本実施の形態では中間コードコンバータ305は、ビューワプログラム306を起動する前の任意の時点でユーザが実行し、SVG文書ファイル302を中間コードデータ303に変換した。しかしながら、ビューワプログラム306がステップS902でSVG文書ファイルを読み込む仕様とし、ビューワプログラム306が中間コードコンバータ305を呼び出して中間コードデータ303を生成することもできる。   In the present embodiment, the intermediate code converter 305 is executed by the user at an arbitrary time before starting the viewer program 306, and converts the SVG document file 302 into the intermediate code data 303. However, the viewer program 306 may be configured to read the SVG document file in step S902, and the viewer program 306 may call the intermediate code converter 305 to generate the intermediate code data 303.

図9において、一回あたりの移動量は必ずしも20ピクセルでなくてもよく、ユーザがあらかじめ指定できるようにしてもいい。ShiftキーやCtrlキーを併用して上下左右移動ボタンを操作することで、移動量がたとえば5倍になったりするユーザインタフェース仕様も考えられる。同様に、一回あたりの倍率変更は1.5倍単位でなくてもよい。ウィンドウの初期サイズももちろん400ピクセル×600ピクセルに限定されるものではない。   In FIG. 9, the amount of movement per movement does not necessarily have to be 20 pixels, and the user may be able to designate it in advance. A user interface specification in which the amount of movement is increased by, for example, five times by operating the up / down / left / right movement buttons in combination with the Shift key or the Ctrl key can also be considered. Similarly, the change in magnification per time need not be in units of 1.5 times. Of course, the initial size of the window is not limited to 400 pixels × 600 pixels.

なお、本発明は、実施形態の機能を実現するソフトウェアのプログラムを、システムあるいは装置に直接あるいは遠隔から供給し、そのシステムあるいは装置のコンピュータがその供給されたプログラムコードを読み出して実行することによっても達成され得る。その場合、プログラムの機能を有していれば、その形態はプログラムである必要はない。   The present invention can also be achieved by supplying a software program that implements the functions of the embodiment directly or remotely to a system or apparatus, and the system or apparatus computer reads and executes the supplied program code. Can be achieved. In that case, as long as it has the function of a program, the form does not need to be a program.

従って、本発明の機能処理をコンピュータで実現するために、そのコンピュータにインストールされるプログラムコード自体およびそのプログラムを格納した記憶媒体も本発明を構成することになる。つまり、本発明の特許請求の範囲には、本発明の機能処理を実現するためのコンピュータプログラム自体、およびそのプログラムを格納した記憶媒体も含まれる。   Therefore, in order to realize the functional processing of the present invention with a computer, the program code itself installed in the computer and the storage medium storing the program also constitute the present invention. In other words, the claims of the present invention include the computer program itself for realizing the functional processing of the present invention and a storage medium storing the program.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。   In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS.

プログラムを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク等がある。また、MO、CD-ROM、CD-R、CD-RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD-ROM、DVD-R)などがある。   Examples of the storage medium for supplying the program include a flexible disk, a hard disk, an optical disk, and a magneto-optical disk. In addition, there are MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-R) and the like.

その他、ブラウザを用いてインターネットのホームページに接続し、そのホームページからプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをハードディスク等の記憶媒体にダウンロードすることによっても供給できる。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWebサーバも、本発明の請求の範囲に含まれるものである。   Alternatively, the program can be supplied by connecting to a homepage on the Internet using a browser and downloading the program itself or a compressed file including an automatic installation function from the homepage to a storage medium such as a hard disk. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a Web server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the scope of the present invention.

また、プログラムを暗号化してCD-ROM等の記憶媒体に格納してユーザに配布してもよい。所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせ、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。   Further, the program may be encrypted and stored in a storage medium such as a CD-ROM and distributed to users. This is realized by having a user who has cleared a predetermined condition download key information to be decrypted from a homepage via the Internet, execute the encrypted program by using the key information, and install it on a computer. It is also possible.

また、コンピュータが、読み出したプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   Further, the function of the above-described embodiment can be realized by an OS or the like running on the computer performing part or all of the actual processing based on the instructions of the read program.

本発明の実施形態に係る画像処理システムの全体構成を示す図である。1 is a diagram illustrating an overall configuration of an image processing system according to an embodiment of the present invention. 本発明に係る画像処理装置を実現可能なコンピュータの構成を示す図である。It is a figure which shows the structure of the computer which can implement | achieve the image processing apparatus which concerns on this invention. 本発明の実施形態に係るプリンタ装置の構成を示す図である。1 is a diagram illustrating a configuration of a printer apparatus according to an embodiment of the present invention. 本発明の実施形態に係る画像処理システムの機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image processing system which concerns on embodiment of this invention. SVG文書ファイルの例を示す図である。It is a figure which shows the example of a SVG document file. SVG文書ファイルのレンダリング結果の例を示す図である。It is a figure which shows the example of the rendering result of a SVG document file. 中間コード仕様の例を示す図である。It is a figure which shows the example of an intermediate code specification. SVG文書ファイルを変換した中間コードのダンプ表示の例を示す図である。It is a figure which shows the example of the dump display of the intermediate code which converted the SVG document file. ビューワプログラムの表示画面の例を示す図である。It is a figure which shows the example of the display screen of a viewer program. ビューワプログラムの動作を示すフローチャートである。It is a flowchart which shows operation | movement of a viewer program. ビューワプログラムの上下左右移動表示について説明する図である。It is a figure explaining the up-down / left-right movement display of a viewer program. ビューワプログラムの拡大表示について説明する図である。It is a figure explaining the enlarged display of a viewer program. ビューワプログラムの領域指定について説明する図である。It is a figure explaining area specification of a viewer program. プリンタコントローラの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer controller. 印刷結果の例を示す図である。It is a figure which shows the example of a printing result. 中間コードを直接変換した例について示す図である。It is a figure shown about the example which directly converted the intermediate code.

符号の説明Explanation of symbols

101 クライアント
102 サーバ
103 ネットワーク
201 CPU
202 RAM
203 ネットワークインタフェース
204 外部記憶装置
205 ディスプレイ
206 キーボード
207 ポインティングデバイス
208 CPU
209 RAM
210 ネットワークインタフェース
211 外部記憶装置
212 プリンタエンジン
101 Client 102 Server 103 Network 201 CPU
202 RAM
203 Network Interface 204 External Storage Device 205 Display 206 Keyboard 207 Pointing Device 208 CPU
209 RAM
210 Network interface 211 External storage device 212 Printer engine

Claims (7)

ページ記述言語で記述された第1描画データを中間コード表現の第2描画データに変換する変換工程と、
前記第2描画データを用いて、画像を表示する表示工程と、
前記表示工程で表示された画像に、入力した指示に応じた加工処理を施して表示する加工処理工程と、
前記加工処理を表わす加工処理データを前記第2描画データに付加して画像形成デバイスに送信する送信工程と、
を含むことを特徴とする画像処理方法。
A conversion step of converting the first drawing data described in the page description language into the second drawing data represented by an intermediate code;
A display step of displaying an image using the second drawing data;
A processing step for displaying the image displayed in the display step by performing a processing according to the input instruction;
A transmission step of adding processing data representing the processing to the second drawing data and transmitting the processing data to the image forming device;
An image processing method comprising:
前記送信工程は、前記第2描画データに前記加工処理データが含まれるように、内的に付加することを特徴とする請求項1に記載の画像処理方法。   2. The image processing method according to claim 1, wherein in the transmission step, the second drawing data is internally added so that the processing data is included. 3. 前記加工処理は、表示された前記画像に対する移動処理、拡大縮小処理、または、範囲指定処理の少なくとも何れか一つであることを特徴とする請求項1に記載の画像処理方法。   The image processing method according to claim 1, wherein the processing process is at least one of a movement process, an enlargement / reduction process, and a range designation process for the displayed image. 前記送信工程によって送信された前記第2描画データと前記加工処理データとに基づいて前記画像形成デバイスで画像形成を行なう画像形成工程を更に含むことを特徴とする請求項1に記載の画像処理方法。   The image processing method according to claim 1, further comprising an image forming step of forming an image with the image forming device based on the second drawing data and the processing data transmitted in the transmitting step. . 前記加工処理データは、前記第2描画データで表わされる画像に対する印刷範囲及び印刷倍率を示すデータであることを特徴とする請求項1に記載の画像処理方法。   The image processing method according to claim 1, wherein the processing data is data indicating a print range and a print magnification for an image represented by the second drawing data. ページ記述言語で記述された第1描画データを中間コード表現の第2描画データに変換する変換手段と、
前記第2描画データを用いて、画像を表示する表示手段と、
前記表示手段で表示された画像に、入力した指示に応じた加工処理を施す加工処理手段と、
前記加工処理を表わす加工処理データを前記第2描画データに付加して画像形成デバイスに送信する送信手段と、
を含むことを特徴とする画像処理装置。
Conversion means for converting the first drawing data described in the page description language into the second drawing data of intermediate code representation;
Display means for displaying an image using the second drawing data;
Processing means for performing processing according to the input instruction on the image displayed by the display means;
Transmission means for adding processing data representing the processing to the second drawing data and transmitting the processing data to the image forming device;
An image processing apparatus comprising:
コンピュータが実行することのできる画像処理プログラムであって、
ページ記述言語で記述された第1描画データから変換された中間コード表現の第2描画データを用いて、画像を表示する表示工程と、
前記表示工程で表示された画像に、入力した指示に応じた加工処理を施して表示する加工処理工程と、
前記加工処理を表わす加工処理データを前記第2描画データに付加して画像形成デバイスに送信する送信工程と、
をコンピュータに実行させることを特徴とする画像処理プログラム。
An image processing program that can be executed by a computer,
A display step of displaying an image using the second drawing data of the intermediate code representation converted from the first drawing data described in the page description language;
A processing step for displaying the image displayed in the display step by performing a processing according to the input instruction;
A transmission step of adding processing data representing the processing to the second drawing data and transmitting the processing data to the image forming device;
An image processing program for causing a computer to execute.
JP2006202586A 2006-07-25 2006-07-25 Image processing method, image processing apparatus, and image processing program Expired - Fee Related JP4818013B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006202586A JP4818013B2 (en) 2006-07-25 2006-07-25 Image processing method, image processing apparatus, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006202586A JP4818013B2 (en) 2006-07-25 2006-07-25 Image processing method, image processing apparatus, and image processing program

Publications (3)

Publication Number Publication Date
JP2008027396A true JP2008027396A (en) 2008-02-07
JP2008027396A5 JP2008027396A5 (en) 2009-09-10
JP4818013B2 JP4818013B2 (en) 2011-11-16

Family

ID=39117932

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006202586A Expired - Fee Related JP4818013B2 (en) 2006-07-25 2006-07-25 Image processing method, image processing apparatus, and image processing program

Country Status (1)

Country Link
JP (1) JP4818013B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010088009A (en) * 2008-10-02 2010-04-15 Seiko Epson Corp Printing device and printing method
JP2012190390A (en) * 2011-03-14 2012-10-04 Canon Inc Information processing device, information processing method, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05270055A (en) * 1992-03-30 1993-10-19 Canon Inc Image recording method and device, and information processing method
JP2002084411A (en) * 2000-09-06 2002-03-22 Minolta Co Ltd Data processing unit and method
JP2003036158A (en) * 2001-07-25 2003-02-07 Minolta Co Ltd Print data processor
JP2006154912A (en) * 2004-11-25 2006-06-15 Canon Inc Document display, print system, method and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05270055A (en) * 1992-03-30 1993-10-19 Canon Inc Image recording method and device, and information processing method
JP2002084411A (en) * 2000-09-06 2002-03-22 Minolta Co Ltd Data processing unit and method
JP2003036158A (en) * 2001-07-25 2003-02-07 Minolta Co Ltd Print data processor
JP2006154912A (en) * 2004-11-25 2006-06-15 Canon Inc Document display, print system, method and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010088009A (en) * 2008-10-02 2010-04-15 Seiko Epson Corp Printing device and printing method
JP2012190390A (en) * 2011-03-14 2012-10-04 Canon Inc Information processing device, information processing method, and program

Also Published As

Publication number Publication date
JP4818013B2 (en) 2011-11-16

Similar Documents

Publication Publication Date Title
KR100743797B1 (en) Digital document processing
US8056006B2 (en) Systems and methods for digital document processing
JP4667280B2 (en) Information processing apparatus, control method therefor, and program
JP6157210B2 (en) Document conversion apparatus, document conversion method, and program
CN106055290B (en) image processing apparatus and image processing method
JP4960900B2 (en) Information processing apparatus and image forming apparatus
EP1272922B1 (en) Digital document processing
JP4480160B2 (en) Printing apparatus, printing apparatus control method, printing apparatus control program, storage medium, and Web server
JP4818013B2 (en) Image processing method, image processing apparatus, and image processing program
JP2011013771A (en) Device, method, and program for controlling print
JP6330790B2 (en) Print control system, print control apparatus, and program
JP2006341457A (en) Printer
JP2019117366A (en) Information processing apparatus, information processing method, and information processing program
JP5991365B2 (en) Form system, information processing apparatus, processing method thereof, and program
JP2023020591A (en) Information processing device, control method thereof, and program
Dengler et al. Scalable vector graphics (SVG) 1.1
JP5171973B2 (en) Information processing apparatus and control method thereof
JP2010125810A (en) Information processor, method for processing data, program, and recording medium
JP2006178622A (en) Document conversion method, document conversion apparatus, and program
Repole Exporting SAS/GRAPH® Output for Inclusion in Web Pages and Other Software Applications
WO2001080069A1 (en) Systems and methods for digital document processing
JP2009087243A (en) Image forming unit
JP2007316866A (en) Image forming device and image forming method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090727

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090727

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110531

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110603

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110728

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110826

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110830

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

Free format text: PAYMENT UNTIL: 20140909

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140909

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees