JP2010134539A - Program for controlling printer, information processor and printing system - Google Patents

Program for controlling printer, information processor and printing system Download PDF

Info

Publication number
JP2010134539A
JP2010134539A JP2008307560A JP2008307560A JP2010134539A JP 2010134539 A JP2010134539 A JP 2010134539A JP 2008307560 A JP2008307560 A JP 2008307560A JP 2008307560 A JP2008307560 A JP 2008307560A JP 2010134539 A JP2010134539 A JP 2010134539A
Authority
JP
Japan
Prior art keywords
image
rendering
unit
display
storage area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008307560A
Other languages
Japanese (ja)
Inventor
Kenichi Watanabe
健一 渡邉
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2008307560A priority Critical patent/JP2010134539A/en
Publication of JP2010134539A publication Critical patent/JP2010134539A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimiles In General (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To allow addition of a watermark by processing in a rendering part of a printer driver, and to dispense with issuance of a drawing instruction to a printing device context by the rendering part of the printer driver. <P>SOLUTION: When drawing the watermark, the rendering part of the printer driver obtains a displaying device context (S401), and draws the watermark to the displaying device context (S403-S409). The drawn watermark is obtained from the displaying device context (S411), and the obtained watermark is composed with a drawing memory for printing (S413). Thereby, the rendering part of the printer driver can draw the watermark to the drawing memory for the printing without issuing the drawing instruction to the printing device context. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、プリンタ制御用プログラム、情報処理装置、および印刷システムに関する。   The present invention relates to a printer control program, an information processing apparatus, and a printing system.

従来、文書中にウォーターマークを付加して印刷する技術が知られている。この種の技術は、例えば、関係者以外への配布が禁じられた文書を印刷する場合などに利用され、この場合、文書中に「マル秘」など文字や画像をウォーターマークとして付加して印刷することで、文書を受け取った関係者に注意喚起を図ることができる。   Conventionally, a technique for printing by adding a watermark to a document is known. This type of technology is used, for example, when printing a document that is prohibited from being distributed to other parties. In this case, characters and images such as “secret” are added to the document as a watermark. By doing so, it is possible to call attention to those who have received the document.

このようなウォーターマーク付加機能に関し、例えば下記特許文献1には、プリンタドライバにおいて、印刷すべき画像のビットマップデータを作成するとともに、作成されたビットマップデータにウォーターマークを合成する技術が開示されている。このような技術を利用すれば、プリンタドライバにより、文書中にウォーターマークを付加することができた(特許文献1:[0056]〜[0079]参照)。
特開平11−298717号公報
With regard to such a watermark addition function, for example, Patent Document 1 below discloses a technique for creating bitmap data of an image to be printed and synthesizing a watermark with the created bitmap data in a printer driver. ing. By using such a technique, a watermark could be added to a document by a printer driver (see Patent Document 1: [0056] to [0079]).
JP 11-298717 A

しかしながら、上記特許文献1に記載された技術の場合、プリンタドライバのインタフェース部においてウォーターマークがビットマップ化され、そのビットマップデータがプリンタドライバのレンダリング部に渡される仕組みになっている。   However, in the case of the technique described in Patent Document 1, the watermark is converted into a bitmap in the interface section of the printer driver, and the bitmap data is transferred to the rendering section of the printer driver.

そのため、プリンタドライバのインタフェース部とレンダリング部が同一のPC(Personal Computer)上で動作しない環境(例えば、プリンタが共有設定されている場合)において上記技術を適用すると、ウォーターマークの受け渡しができなくなり、ウォーターマークを印刷することができなくなる、という問題があった。   Therefore, when the above technology is applied in an environment where the interface unit and rendering unit of the printer driver do not operate on the same PC (Personal Computer) (for example, when the printer is set to be shared), the watermark cannot be transferred. There was a problem that the watermark could not be printed.

また、上記のような問題を避けるには、プリンタドライバのレンダリング部でウォーターマークをビットマップ化できるとよいのであるが、ウォーターマークを描画するための描画命令を、プリンタドライバのレンダリング部が発行すると問題が生じることがあった。   In order to avoid the above problems, it is preferable that the watermark can be bitmapped by the rendering unit of the printer driver. However, when the rendering unit of the printer driver issues a rendering command for rendering the watermark. There was a problem.

より具体的に説明すると、Windows(登録商標)系のOS(Operating System)には、GDI(Graphic Device Interface)と呼ばれるソフトウェアが含まれている。このGDIは、仮想化された描画領域であるデバイスコンテキストの管理と、このデバイスコンテキストへの描画に伴う表示用ないし印刷用データの作成とを行う周知のソフトウェアである。   More specifically, a Windows (registered trademark) OS (Operating System) includes software called GDI (Graphic Device Interface). This GDI is well-known software for managing a device context, which is a virtualized drawing area, and creating data for display or printing accompanying drawing in the device context.

このようなGDIを備えるOSが搭載されたPCにおいて、アプリケーションソフトウェアが印刷処理を実行する際には、その処理の中で、印刷用のデバイスコンテキストを取得する。そして、GDIに対して指令を与えるための関数(API;Application Program Interface)を呼び出すことにより、取得した印刷用のデバイスコンテキストに対する描画命令を発行する。   When application software executes a printing process on a PC on which an OS having such a GDI is installed, a device context for printing is acquired in the process. Then, by calling a function (API; Application Program Interface) for giving a command to the GDI, a drawing command for the acquired device context for printing is issued.

これにより、印刷に必要となる各種情報がGDI経由でプリンタドライバのレンダリング部へと伝達されて、プリンタドライバのレンダリング部がGDIを利用した描画処理を実行し、その結果、最終的には印刷出力がなされることになる。   As a result, various types of information necessary for printing are transmitted to the rendering unit of the printer driver via GDI, and the rendering unit of the printer driver executes drawing processing using GDI. Will be made.

しかし、GDIは、本来、アプリケーションソフトウェアが上記のような手順で利用するために用意されたソフトウェアであって、プリンタドライバのレンダリング部が利用することを前提とした設計にはなっていない。   However, GDI is originally software that application software is prepared for use in the above-described procedure, and is not designed to be used by a rendering unit of a printer driver.

そのため、ウォーターマークを描画するためにプリンタドライバのレンダリング部が印刷用のデバイスコンテキストに対する描画命令を発行すると、自ら発行した描画命令に関連する各種情報がGDI経由でプリンタドライバのレンダリング部自身へ戻されるという変則的な状況に陥る。その結果、例えば、描画命令によってはGDIによる描画処理が適切に実行されない、といった問題を招くことがあった。   Therefore, when the rendering unit of the printer driver issues a drawing command for the device context for printing to draw the watermark, various information related to the drawing command issued by itself is returned to the rendering unit itself of the printer driver via GDI. It falls into an irregular situation. As a result, for example, depending on the drawing command, there is a problem that drawing processing by GDI is not properly executed.

本発明は、上記問題を解決するためになされたものであり、その目的は、プリンタドライバのレンダリング部での処理によりウォーターマークを付加可能で、その際、プリンタドライバのレンダリング部が印刷用のデバイスコンテキストに対する描画命令を発行しなくても済むプリンタ制御用プログラム、情報処理装置、および印刷システムを提供することにある。   The present invention has been made to solve the above problem, and an object of the present invention is to add a watermark by processing in the rendering unit of the printer driver, in which case the rendering unit of the printer driver is a device for printing. It is an object of the present invention to provide a printer control program, an information processing apparatus, and a printing system that do not need to issue a drawing command for a context.

以下、本発明において採用した構成について説明する。   Hereinafter, the configuration employed in the present invention will be described.

本発明のプリンタ制御用プログラムは、情報処理装置上で機能する少なくとも1つのソフトウェアからGDI(Graphic Device Interface)経由でプリンタドライバのレンダリング部へ描画命令を伝達することにより、印刷装置での印刷出力を実行可能で、且つ、前記ソフトウェアから前記GDI経由でディスプレイドライバへ描画命令を伝達することにより、表示装置での表示出力を実行可能に構成された前記情報処理装置において、前記情報処理装置が備える制御部を、前記プリンタドライバのレンダリング部として機能させるためのプリンタ制御用プログラムであって、前記ソフトウェアから印刷用のデバイスコンテキストに対する描画命令が発行された際に、前記GDIを利用した描画処理を実行することにより、印刷出力用の記憶領域にベース画像を描画するベース画像描画手段と、表示用のデバイスコンテキストに対する描画命令を発行して、前記GDIを利用した描画処理を前記ディスプレイドライバに実行させることにより、表示出力用の記憶領域に付加画像を描画する付加画像描画手段と、前記付加画像描画手段によって前記表示出力用の記憶領域に描画された前記付加画像を取得する付加画像取得手段と、前記付加画像取得手段によって取得された前記付加画像を、前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、印刷用画像を前記印刷出力用の記憶領域に合成する画像合成手段と、前記画像合成手段によって前記印刷出力用の記憶領域に合成された印刷用画像を、前記印刷装置へと出力するための制御を実行する出力制御手段とを備えた前記プリンタドライバのレンダリング部として、前記制御部を機能させるためのプログラムである。   The printer control program according to the present invention transmits a drawing command from at least one software functioning on the information processing apparatus to a rendering unit of the printer driver via a GDI (Graphic Device Interface), thereby performing print output on the printing apparatus. In the information processing apparatus configured to be executable and capable of executing display output on the display device by transmitting a drawing command from the software to the display driver via the GDI, the control provided in the information processing device Is a printer control program for causing a printing unit to function as a rendering unit of the printer driver, and executes drawing processing using the GDI when a drawing command for a device context for printing is issued from the software As a result, the storage area for print output The base image drawing means for drawing the image and the drawing command for the display device context are issued, and the display driver executes the drawing process using the GDI, thereby adding the additional image to the display output storage area. Additional image drawing means for drawing the image, additional image acquisition means for acquiring the additional image drawn in the storage area for display output by the additional image drawing means, and the additional image acquired by the additional image acquisition means Is superimposed on the base image drawn in the storage area for print output, thereby combining the print image with the storage area for print output, and the printing by the image composition means Output control means for executing control for outputting the print image synthesized in the output storage area to the printing apparatus; As the rendering of the printer driver with a program for causing the control unit.

このように構成されたプリンタ制御用プログラムに従って情報処理装置の制御部をプリンタドライバのレンダリング部として機能させた場合、プリンタドライバのレンダリング部は、ソフトウェアから発行された描画命令に応じて印刷出力用の記憶領域にベース画像を描画する。また、プリンタドライバのレンダリング部は、表示用のデバイスコンテキストに対する描画命令を発行し、その結果、ディスプレイドライバによって表示出力用の記憶領域に付加画像が描画される。そして、この付加画像は、印刷出力用の記憶領域においてベース画像と合成されて印刷用画像とされ、この印刷用画像が印刷装置へと出力される。   When the control unit of the information processing apparatus is caused to function as a printer driver rendering unit in accordance with the printer control program configured as described above, the printer driver rendering unit performs print output in accordance with a rendering command issued from software. A base image is drawn in the storage area. Further, the rendering unit of the printer driver issues a drawing command for the display device context, and as a result, the additional image is drawn in the storage area for display output by the display driver. The additional image is combined with the base image in the print output storage area to be a print image, and the print image is output to the printing apparatus.

このようなプリンタドライバのレンダリング部であれば、付加画像を描画する際には、印刷用のデバイスコンテキストに対する描画命令を発行しなくても済む。したがって、プリンタドライバのレンダリング部が自ら印刷用のデバイスコンテキストに対する描画命令を発行する場合とは異なり、プリンタドライバのレンダリング部にとっては、自ら発行した描画命令がGDI経由でプリンタドライバのレンダリング部自身へ戻ってくる、といった変則的な状況に陥ることがない。よって、GDIを適正に利用することができ、これにより、所期の付加画像を確実に描画することができる。   With such a printer driver rendering unit, it is not necessary to issue a drawing command for a device context for printing when drawing an additional image. Therefore, unlike the case where the rendering unit of the printer driver issues a drawing command for the device context for printing itself, the rendering command of the printer driver returns to the rendering unit of the printer driver itself via GDI. It does not fall into an irregular situation such as coming. Therefore, GDI can be used appropriately, and thereby an intended additional image can be reliably drawn.

また、本発明のプリンタ制御用プログラムにおいては、さらに次のような構成を備えていると好ましい。   The printer control program of the present invention preferably further comprises the following configuration.

まず、本発明のプリンタ制御用プログラムにおいて、前記付加画像描画手段は、前記付加画像を複数の部分画像に分割して、各部分画像を描画するための描画命令を前記表示用のデバイスコンテキストに対して発行することにより、前記ディスプレイドライバに各部分画像を描画させる手段、前記付加画像取得手段は、前記ディスプレイドライバによって1つの前記部分画像が描画される毎に、前記部分画像を取得する手段、前記画像合成手段は、前記付加画像取得手段によって取得された前記部分画像について、当該部分画像を重ね合わせるべき前記ベース画像上の位置を、前記付加画像を複数の部分画像に分割したときの分割条件に基づいて算出し、算出された位置に前記部分画像を合成する手段、とされており、これら前記付加画像描画手段、前記付加画像取得手段、および前記画像合成手段による各処理が、前記複数の部分画像それぞれについて実行されることにより、前記印刷用画像が前記印刷出力用の記憶領域に合成されるものであると好ましい。   First, in the printer control program of the present invention, the additional image drawing means divides the additional image into a plurality of partial images, and sends a drawing command for drawing each partial image to the display device context. Means for causing the display driver to draw each partial image, and the additional image obtaining means obtains the partial image each time one of the partial images is drawn by the display driver, The image compositing means uses the position on the base image on which the partial image is to be superimposed on the partial image acquired by the additional image acquisition means as a dividing condition when the additional image is divided into a plurality of partial images. And means for synthesizing the partial image at the calculated position. The processing by the means, the additional image acquisition means, and the image composition means is executed for each of the plurality of partial images, so that the print image is synthesized in the storage area for print output. And preferred.

このように構成されたプリンタ制御用プログラムに従って情報処理装置の制御部をプリンタドライバのレンダリング部として機能させれば、表示出力用の記憶領域に収まらない大きさの付加画像であっても、複数の部分画像に分割して、各部分画像とベース画像との合成を繰り返すことで、付加画像とベース画像を合成することができる。   If the control unit of the information processing apparatus functions as a printer driver rendering unit in accordance with the printer control program configured as described above, a plurality of additional images having a size that does not fit in the storage area for display output can be obtained. By dividing the image into partial images and repeating the synthesis of each partial image and the base image, the additional image and the base image can be synthesized.

また、本発明のプリンタ制御用プログラムは、前記ベース画像上において想定された複数の領域について、各領域が、当該領域内に重ね合わせるべき前記部分画像が存在する有効領域か、当該領域内に重ね合わせるべき前記部分画像が存在しない無効領域かを判別する判別手段を備えた前記プリンタドライバのレンダリング部として、前記制御部を機能させ、前記判別手段によって前記有効領域と判別された領域を対象にして、前記付加画像描画手段、前記付加画像取得手段、および前記画像合成手段による各処理が、前記複数の部分画像それぞれについて実行されることにより、前記印刷用画像が前記印刷出力用の記憶領域に合成されるものであると好ましい。   Further, the printer control program according to the present invention may be configured such that, for a plurality of regions assumed on the base image, each region is an effective region where the partial image to be superimposed is present in the region, or is superimposed in the region. The control unit functions as a rendering unit of the printer driver that includes a determination unit that determines whether the partial image to be combined does not exist. The region determined as the effective region by the determination unit is targeted. The processing by the additional image drawing means, the additional image acquisition means, and the image composition means is executed for each of the plurality of partial images, so that the print image is synthesized in the storage area for print output. It is preferable that

このように構成されたプリンタ制御用プログラムに従って情報処理装置の制御部をプリンタドライバのレンダリング部として機能させれば、有効領域と判別された領域を対象にして、付加画像描画手段、付加画像取得手段、および画像合成手段による各処理が実行される。したがって、有効領域か無効領域かを問わず、一律に部分画像とベース画像との合成を試行する場合に比べ、付加画像をより迅速に描画することができる。   If the control unit of the information processing apparatus functions as a rendering unit of the printer driver according to the printer control program configured as described above, an additional image drawing unit and an additional image acquisition unit are targeted for an area determined as an effective area. Each process by the image composition means is executed. Therefore, regardless of whether the region is an effective region or an invalid region, the additional image can be drawn more quickly than when trying to synthesize the partial image and the base image uniformly.

また、本発明のプリンタ制御用プログラムは、前記ベース画像描画手段が、前記印刷出力用の記憶領域にベース画像を描画した後に、前記画像合成手段が、前記付加画像を前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、前記印刷用画像を前記印刷出力用の記憶領域に合成するものであると好ましい。   In the printer control program of the present invention, after the base image drawing unit draws a base image in the print output storage area, the image composition unit stores the additional image in the print output storage area. It is preferable that the print image is combined with the print output storage area by overlapping the base image drawn on the image.

このように構成されたプリンタ制御用プログラムに従って情報処理装置の制御部をプリンタドライバのレンダリング部として機能させれば、ベース画像に対して重ねて描画されることを前提とした付加画像が、ベース画像よりも後から描画される。したがって、付加画像に対して重ねて描画されるとの前提がないベース画像を、付加画像よりも後から描画する場合に比べ、付加画像を消失させることなく確実にベース画像と合成することができる。   If the control unit of the information processing apparatus functions as a printer driver rendering unit in accordance with the printer control program configured as described above, an additional image on the premise that the additional image is drawn on the base image is displayed. It will be drawn later. Therefore, a base image that is not assumed to be drawn superimposed on the additional image can be reliably combined with the base image without losing the additional image, compared to a case where the base image is drawn after the additional image. .

次に、本発明の情報処理装置は、情報処理装置上で機能する少なくとも1つのソフトウェアからGDI(Graphic Device Interface)経由でプリンタドライバのレンダリング部へ描画命令を伝達することにより、印刷装置での印刷出力を実行可能で、且つ、前記ソフトウェアから前記GDI経由でディスプレイドライバへ描画命令を伝達することにより、表示装置での表示出力を実行可能に構成された前記情報処理装置であって、前記プリンタドライバのレンダリング部は、前記ソフトウェアから印刷用のデバイスコンテキストに対する描画命令が発行された際に、前記GDIを利用した描画処理を実行することにより、印刷出力用の記憶領域にベース画像を描画するベース画像描画手段と、表示用のデバイスコンテキストに対する描画命令を発行して、前記GDIを利用した描画処理を前記ディスプレイドライバに実行させることにより、表示出力用の記憶領域に付加画像を描画する付加画像描画手段と、前記付加画像描画手段によって前記表示出力用の記憶領域に描画された前記付加画像を取得する付加画像取得手段と、前記付加画像取得手段によって取得された前記付加画像を、前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、印刷用画像を前記印刷出力用の記憶領域に合成する画像合成手段と、前記画像合成手段によって前記印刷出力用の記憶領域に合成された印刷用画像を、前記印刷装置へと出力するための制御を実行する出力制御手段とを備えることを特徴とする。   Next, the information processing apparatus according to the present invention transmits a drawing command from at least one software functioning on the information processing apparatus to a rendering unit of the printer driver via GDI (Graphic Device Interface), thereby performing printing on the printing apparatus. The information processing apparatus configured to execute output and to perform display output on a display device by transmitting a drawing command from the software to a display driver via the GDI, the printer driver A rendering unit for rendering a base image in a storage area for print output by executing a rendering process using the GDI when a rendering command for a device context for printing is issued from the software Issuing drawing commands for drawing means and device context for display , By causing the display driver to perform drawing processing using the GDI, additional image drawing means for drawing an additional image in the display output storage area, and the display output storage area by the additional image drawing means An additional image acquisition means for acquiring the drawn additional image; and the additional image acquired by the additional image acquisition means is overlaid on the base image drawn in the storage area for print output. An image composition unit that synthesizes the print image in the storage area for print output, and an image for outputting the print image synthesized in the storage area for print output by the image composition unit to the printing apparatus. Output control means for executing control.

このように構成された情報処理装置において、プリンタドライバのレンダリング部は、ソフトウェアから発行された描画命令に応じて印刷出力用の記憶領域にベース画像を描画する。また、プリンタドライバのレンダリング部は、表示用のデバイスコンテキストに対する描画命令を発行し、その結果、ディスプレイドライバによって表示出力用の記憶領域に付加画像が描画される。そして、この付加画像は、印刷出力用の記憶領域においてベース画像と合成されて印刷用画像とされ、この印刷用画像が印刷装置へと出力される。   In the information processing apparatus configured as described above, the rendering unit of the printer driver draws a base image in the storage area for print output in accordance with a drawing command issued from software. Further, the rendering unit of the printer driver issues a drawing command for the display device context, and as a result, the additional image is drawn in the storage area for display output by the display driver. The additional image is combined with the base image in the print output storage area to be a print image, and the print image is output to the printing apparatus.

このような情報処理装置によれば、プリンタドライバのレンダリング部は、付加画像を描画する際には、印刷用のデバイスコンテキストに対する描画命令を発行しなくても済む。したがって、プリンタドライバのレンダリング部が自ら印刷用のデバイスコンテキストに対する描画命令を発行する場合とは異なり、プリンタドライバのレンダリング部にとっては、自ら発行した描画命令がGDI経由でプリンタドライバのレンダリング部自身へ戻ってくる、といった変則的な状況に陥ることがない。よって、GDIを適正に利用することができ、これにより、所期の付加画像を確実に描画することができる。   According to such an information processing apparatus, the rendering unit of the printer driver does not need to issue a drawing command for the device context for printing when drawing the additional image. Therefore, unlike the case where the rendering unit of the printer driver issues a drawing command for the device context for printing itself, the rendering command of the printer driver returns to the rendering unit of the printer driver itself via GDI. It does not fall into an irregular situation such as coming. Therefore, GDI can be used appropriately, and thereby an intended additional image can be reliably drawn.

次に、本発明の印刷システムは、情報処理装置と、前記情報処理装置によって制御される印刷装置とを備えてなる印刷システムであって、前記情報処理装置は、前記情報処理装置上で機能する少なくとも1つのソフトウェアからGDI(Graphic Device Interface)経由でプリンタドライバのレンダリング部へ描画命令を伝達することにより、前記印刷装置での印刷出力を実行可能で、且つ、前記ソフトウェアから前記GDI経由でディスプレイドライバへ描画命令を伝達することにより、表示装置での表示出力を実行可能に構成されており、しかも、前記情報処理装置が備える前記プリンタドライバのレンダリング部は、前記ソフトウェアから印刷用のデバイスコンテキストに対する描画命令が発行された際に、前記GDIを利用した描画処理を実行することにより、印刷出力用の記憶領域にベース画像を描画するベース画像描画手段と、表示用のデバイスコンテキストに対する描画命令を発行して、前記GDIを利用した描画処理を前記ディスプレイドライバに実行させることにより、表示出力用の記憶領域に付加画像を描画する付加画像描画手段と、前記付加画像描画手段によって前記表示出力用の記憶領域に描画された前記付加画像を取得する付加画像取得手段と、前記付加画像取得手段によって取得された前記付加画像を、前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、印刷用画像を前記印刷出力用の記憶領域に合成する画像合成手段と、前記画像合成手段によって前記印刷出力用の記憶領域に合成された印刷用画像を、前記印刷装置へと出力するための制御を実行する出力制御手段とを備えることを特徴とする。   Next, the printing system of the present invention is a printing system including an information processing apparatus and a printing apparatus controlled by the information processing apparatus, and the information processing apparatus functions on the information processing apparatus. By transmitting a drawing command from at least one software to the rendering unit of the printer driver via GDI (Graphic Device Interface), it is possible to execute print output in the printing apparatus, and from the software to the display driver via the GDI By transmitting a drawing command to the display device, display output on the display device can be executed, and the rendering unit of the printer driver included in the information processing device draws the device context for printing from the software. When the command is issued, the drawing process using the GDI is executed. By doing so, a base image drawing means for drawing a base image in a storage area for print output, and a drawing command for a display device context are issued to cause the display driver to execute drawing processing using the GDI. The additional image drawing means for drawing the additional image in the storage area for display output, the additional image acquisition means for acquiring the additional image drawn in the storage area for display output by the additional image drawing means, An image that combines the print image with the print output storage area by drawing the additional image acquired by the additional image acquisition means on the base image drawn in the print output storage area. A print unit combined with the print output storage area by the combining unit and the image combining unit to the printing apparatus; Characterized in that it comprises an output control means for performing control to force.

このように構成された印刷システムにおいて、情報処理装置が備えるプリンタドライバのレンダリング部は、ソフトウェアから発行された描画命令に応じて印刷出力用の記憶領域にベース画像を描画する。また、情報処理装置が備えるプリンタドライバのレンダリング部は、表示用のデバイスコンテキストに対する描画命令を発行し、その結果、ディスプレイドライバによって表示出力用の記憶領域に付加画像が描画される。そして、この付加画像は、印刷出力用の記憶領域においてベース画像と合成されて印刷用画像とされ、この印刷用画像が印刷装置へと出力される。   In the printing system configured as described above, the rendering unit of the printer driver included in the information processing apparatus draws a base image in a storage area for print output in accordance with a drawing command issued from software. In addition, the rendering unit of the printer driver provided in the information processing apparatus issues a drawing command for the device context for display, and as a result, the additional image is drawn in the storage area for display output by the display driver. The additional image is combined with the base image in the print output storage area to be a print image, and the print image is output to the printing apparatus.

このような印刷システムによれば、情報処理装置が備えるプリンタドライバのレンダリング部は、付加画像を描画する際には、印刷用のデバイスコンテキストに対する描画命令を発行しなくても済む。したがって、プリンタドライバのレンダリング部が自ら印刷用のデバイスコンテキストに対する描画命令を発行する場合とは異なり、プリンタドライバのレンダリング部にとっては、自ら発行した描画命令がGDI経由でプリンタドライバのレンダリング部自身へ戻ってくる、といった変則的な状況に陥ることがない。よって、GDIを適正に利用することができ、これにより、所期の付加画像を確実に描画することができる。   According to such a printing system, the rendering unit of the printer driver provided in the information processing apparatus does not have to issue a drawing command for a device context for printing when drawing an additional image. Therefore, unlike the case where the rendering unit of the printer driver issues a drawing command for the device context for printing itself, the rendering command of the printer driver returns to the rendering unit of the printer driver itself via GDI. It does not fall into an irregular situation such as coming. Therefore, GDI can be used appropriately, and thereby an intended additional image can be reliably drawn.

次に、本発明の実施形態について一例を挙げて説明する。   Next, an embodiment of the present invention will be described with an example.

[システム全体の構成]
図1は、パーソナルコンピュータ1(以下、PC1という)と、このPC1に接続されたプリンタ2とを備えたシステムの概略構成を示すブロック図である。このシステム内に含まれるPC1は、本発明でいう情報処理装置に相当し、プリンタ2は、本発明でいう印刷装置に相当する。
[Entire system configuration]
FIG. 1 is a block diagram showing a schematic configuration of a system including a personal computer 1 (hereinafter referred to as PC1) and a printer 2 connected to the PC1. The PC 1 included in the system corresponds to the information processing apparatus referred to in the present invention, and the printer 2 corresponds to the printing apparatus referred to in the present invention.

このシステムの内、PC1は、図1に示すように、CPU11、ROM12、RAM13、HDD14(ハードディスク装置14)、操作部15、表示部16、および通信インターフェース17などを備えている。   In this system, the PC 1 includes a CPU 11, a ROM 12, a RAM 13, an HDD 14 (hard disk device 14), an operation unit 15, a display unit 16, and a communication interface 17 as shown in FIG.

CPU11は、ROM12やRAM13に記憶されたプログラムに従って、PC1各部に対する制御および各種演算を実行する装置で、プリンタドライバとしての処理、OSやアプリケーションなどとしての各処理は、このCPU11によって実行される。   The CPU 11 is a device that executes control and various operations for each part of the PC 1 in accordance with programs stored in the ROM 12 and the RAM 13. Processing as a printer driver and processing as an OS and application are executed by the CPU 11.

ROM12は、PC1の電源スイッチを切っても記憶内容を保持可能な記憶装置で、BIOS(Basic Input Output System)や通常であれば更新されない読み出し用のデータ等を記憶している。   The ROM 12 is a storage device that can retain the stored contents even when the power switch of the PC 1 is turned off, and stores BIOS (Basic Input Output System), read data that is not normally updated, and the like.

RAM13は、CPU11から直接アクセスされるメインメモリ等として利用される記憶装置である。このRAM13には、OSや各種アプリケーションなどのソフトウェアがHDD14から読み込まれ、また、CPU11による各種演算の結果やHDD14から読み込まれたデータもRAM13に記憶される。後述するプリンタドライバ(プリンタドライバレンダリング部27およびプリンタドライバインターフェース部29)としての処理を実行する際には、プリンタドライバを機能させる上で必要となるプリンタ制御用プログラムがHDD14からRAM13に読み込まれ、RAM13に記憶されたプログラムに従って、CPU11がプリンタドライバとしての処理を実行することになる。   The RAM 13 is a storage device used as a main memory or the like that is directly accessed from the CPU 11. In the RAM 13, software such as an OS and various applications is read from the HDD 14, and results of various calculations by the CPU 11 and data read from the HDD 14 are also stored in the RAM 13. When executing processing as printer drivers (printer driver rendering unit 27 and printer driver interface unit 29), which will be described later, a printer control program necessary for causing the printer driver to function is read from the HDD 14 into the RAM 13, and the RAM 13 The CPU 11 executes processing as a printer driver in accordance with the program stored in.

HDD14は、OS、各種アプリケーションプログラム、および各種データファイルを保存しておくための装置で、上記プリンタ制御用プログラムもHDD14に保存されている。   The HDD 14 is an apparatus for storing the OS, various application programs, and various data files. The printer control program is also stored in the HDD 14.

操作部15は、利用者からの各種指示を入力するための入力装置であり、例えば、キーボードや各種ポインティングデバイス(例えば、マウス)等によって構成される。表示部16は、各種情報を利用者に提示するための出力装置であり、例えば、液晶ディスプレイ等によって構成される。   The operation unit 15 is an input device for inputting various instructions from the user, and includes, for example, a keyboard and various pointing devices (for example, a mouse). The display unit 16 is an output device for presenting various types of information to the user, and includes, for example, a liquid crystal display.

通信インターフェース17は、プリンタおよびその他の周辺機器を接続可能なシリアルインターフェース(例えば、USBインターフェース)、あるいは、LAN(Local Area Network)インターフェース等である。   The communication interface 17 is a serial interface (for example, USB interface) to which a printer and other peripheral devices can be connected, a LAN (Local Area Network) interface, or the like.

[ウォーターマーク付加機能の概要]
次に、ウォーターマーク付加機能に関連するソフトウェアの概要について、図2に基づいて説明する。
[Outline of watermark addition function]
Next, an outline of software related to the watermark adding function will be described with reference to FIG.

本実施形態において、PC1には、OSとして、WindowsXP(登録商標)が搭載されている。このOSは、周知のマルチタスク機能を備えており、これにより、PC1上では、複数のプロセスが並列に機能して、それら複数のプロセスが連携して各種処理を実行する仕組みになっている。   In the present embodiment, Windows XP (registered trademark) is installed in the PC 1 as the OS. This OS has a well-known multitask function, and thus, on the PC 1, a plurality of processes function in parallel, and the plurality of processes cooperate to execute various processes.

アプリケーション21は、例えばワープロソフトや表計算ソフトなどのソフトウェアであり、このアプリケーション21の印刷機能を利用者が利用した際には、アプリケーション21上で編集された画像(ベース画像)を印刷するための描画命令が発行される。   The application 21 is software such as word processing software or spreadsheet software, for example. When the user uses the printing function of the application 21, the application 21 prints an image (base image) edited on the application 21. A drawing command is issued.

Win32(GDI32)23は、OSの一部として実装されたアプリケーションプログラムインターフェースで、アプリケーション21は、Win32(GDI32)23が提供する関数を呼び出すことにより、GDI25に対して描画命令を与えることができる。   Win32 (GDI32) 23 is an application program interface implemented as a part of the OS, and the application 21 can give a drawing command to the GDI 25 by calling a function provided by the Win32 (GDI32) 23.

GDI25は、仮想化された描画領域であるデバイスコンテキストの管理と、このデバイスコンテキストに対する描画に伴う印刷用データの作成を行う部分である。Win32(GDI32)23の提供する関数をアプリケーション21が呼び出した際、アプリケーション21から渡された各種情報はGDI25へと伝達される。そして、それらの情報がGDI25およびプリンタドライバレンダリング部27において処理される。   The GDI 25 is a part that manages a device context, which is a virtualized drawing area, and creates print data associated with drawing on the device context. When the application 21 calls a function provided by the Win32 (GDI32) 23, various information passed from the application 21 is transmitted to the GDI 25. These pieces of information are processed in the GDI 25 and the printer driver rendering unit 27.

また、プリンタドライバレンダリング部27には、プリンタドライバインターフェース部29から、ウォーターマーク(付加画像)を付加した印刷を実行する上で必要となる情報なども伝達される。   The printer driver rendering unit 27 also receives information necessary for executing printing with a watermark (additional image) from the printer driver interface unit 29.

プリンタドライバインターフェース部29は、アプリケーション21とは別に、印刷関連の各種設定を実施可能なユーザインターフェースを提供する部分である。このユーザインターフェースを利用して、利用者は、ウォーターマークを付加した印刷を指示することができる。また、この他にも、プリンタドライバインターフェース部29を利用すれば、縮小印刷、レイアウト印刷といった特殊な印刷の実行や、用紙種別、印刷部数といった印刷関連の各種設定を指示することができる。   The printer driver interface unit 29 is a part that provides a user interface capable of performing various print-related settings, separately from the application 21. Using this user interface, the user can instruct printing with a watermark. In addition, if the printer driver interface unit 29 is used, special printing such as reduced printing and layout printing, and various printing-related settings such as paper type and number of copies can be instructed.

プリンタドライバレンダリング部27は、描画命令レンダリング部31、ウォーターマーク描画・合成部33、データ出力部35、および描画メモリ37などを備えている。これらの内、描画命令レンダリング部31は、アプリケーション21からの描画命令を、GDI25を利用して処理することで、描画メモリ37への描画を実行する。   The printer driver rendering unit 27 includes a drawing command rendering unit 31, a watermark drawing / combination unit 33, a data output unit 35, a drawing memory 37, and the like. Among these, the drawing command rendering unit 31 executes drawing on the drawing memory 37 by processing the drawing command from the application 21 using the GDI 25.

また、ウォーターマーク描画・合成部33は、プリンタドライバインターフェース部29からウォーターマークを付加した印刷を実行する旨の情報が到来した場合に、ウォーターマークについての描画命令を発行する。   The watermark drawing / combination unit 33 issues a drawing command for a watermark when information indicating that printing with a watermark is executed is received from the printer driver interface unit 29.

ウォーターマークについての描画命令を発行する際、ウォーターマーク描画・合成部33は、表示用のデバイスコンテキスト(=厳密には、ディスプレイのデバイスコンテキストと互換性のあるメモリデバイスコンテキスト)を取得する。そして、この表示用のデバイスコンテキストに対する描画を行うため、Win32(GDI32)23が提供する関数を呼び出すことで、グラフィックエンジン(GDI)41に対して描画命令を与える。   When issuing a drawing command for a watermark, the watermark drawing / combining unit 33 acquires a display device context (= strictly, a memory device context compatible with the display device context). In order to perform drawing on the device context for display, a drawing command is given to the graphic engine (GDI) 41 by calling a function provided by the Win32 (GDI32) 23.

これにより、ウォーターマークについての描画命令は、ディスプレイドライバ43へと伝達され、ディスプレイドライバ43により、表示用の描画メモリ(=上記メモリデバイスコンテキストに対応付けられたイメージバッファ)にウォーターマークとなる画像が描画されることになる。   As a result, the drawing command for the watermark is transmitted to the display driver 43, and the display driver 43 causes an image to be a watermark to be displayed in the drawing memory for display (= the image buffer associated with the memory device context). Will be drawn.

このようにして表示用の描画メモリに描画されたウォーターマークとなる画像は、描画命令レンダリング部31によって読み出され、その解像度や色数が印刷用の描画メモリ37に合わせて最適化される。そして、その最適化された画像がウォーターマーク描画・合成部33によって描画メモリ37へと合成され、その結果、アプリケーション21上で編集された画像(ベース画像)とウォーターマーク(付加画像)を合成してなる画像が描画メモリ37内に形成されることになる。   The watermark image drawn in the display drawing memory in this way is read out by the drawing command rendering unit 31, and the resolution and the number of colors are optimized in accordance with the printing drawing memory 37. Then, the optimized image is synthesized into the drawing memory 37 by the watermark drawing / synthesizing unit 33. As a result, the image (base image) edited on the application 21 and the watermark (additional image) are synthesized. The resulting image is formed in the drawing memory 37.

こうして描画メモリ37内に形成されたウォーターマーク付きの画像は、データ出力部35によってプリンタ2へと出力される。なお、プリンタ2への出力に当たっては、周知のスプーラシステムが利用され、その際、データ出力部35は、印刷ジョブを管理するための各種コマンド等も発行する。ただし、このようなスプーラシステムそのものは周知技術であり、本発明の要部に直接関連する技術ではないので、これ以上の説明は省略する。   The watermarked image thus formed in the drawing memory 37 is output to the printer 2 by the data output unit 35. Note that a known spooler system is used for output to the printer 2, and the data output unit 35 also issues various commands for managing print jobs. However, since such a spooler system itself is a well-known technique and is not a technique directly related to the main part of the present invention, further explanation is omitted.

[PC1における印刷処理の説明]
次に、上記PC1において実行される印刷処理の詳細について、図3のフローチャートに基づいて説明する。なお、本明細書においては、説明を簡潔にするため、図3〜図5に示した各処理ステップが、アプリケーション21およびプリンタドライバレンダリング部27によって実行される旨の説明を行う。ただし、これらの処理ステップが、厳密には、アプリケーション21として機能するCPU11、およびプリンタドライバレンダリング部27として機能するCPU11によって実行されることは周知の通りである。
[Description of Print Processing in PC 1]
Next, details of the printing process executed in the PC 1 will be described based on the flowchart of FIG. In this specification, for the sake of brevity, it is described that each processing step shown in FIGS. 3 to 5 is executed by the application 21 and the printer driver rendering unit 27. However, as is well known, these processing steps are strictly executed by the CPU 11 functioning as the application 21 and the CPU 11 functioning as the printer driver rendering unit 27.

図3に示す印刷処理は、アプリケーション21およびプリンタドライバレンダリング部27が協働することで実行されることになる処理であり、図3には、アプリケーション側(図中左側)およびプリンタドライバレンダリング部側(図中右側)の各処理が併記してある。   The printing process shown in FIG. 3 is a process that is executed by the cooperation of the application 21 and the printer driver rendering unit 27. FIG. 3 shows the application side (left side in the figure) and the printer driver rendering unit side. Each process (right side in the figure) is also shown.

アプリケーション側の処理は、利用者がドキュメントの印刷を指令する操作を実行したときに開始される処理で、この処理を開始すると、アプリケーション21は、まず、印刷用デバイスコンテキストを作成する(S101)。デバイスコンテキスト作成の命令は、Win32(GDI32)23が提供する関数をアプリケーション21が呼び出すことで、GDI25を介してプリンタドライバレンダリング部27へと伝達される。これにより、プリンタドライバレンダリング部27は、GDI25を利用して印刷に必要な情報を作成する(S201)。   The process on the application side is started when the user performs an operation for instructing printing of the document. When this process is started, the application 21 first creates a device context for printing (S101). The device context creation command is transmitted to the printer driver rendering unit 27 via the GDI 25 when the application 21 calls a function provided by the Win 32 (GDI 32) 23. As a result, the printer driver rendering unit 27 creates information necessary for printing using the GDI 25 (S201).

続いて、アプリケーション21は、ドキュメントの開始を命令する(S103)。ドキュメント開始の命令も、Win32(GDI32)23が提供する関数をアプリケーション21が呼び出すことで、GDI25を介してプリンタドライバレンダリング部27へと伝達される。これにより、プリンタドライバレンダリング部27は、GDI25を利用して印刷ジョブに必要な情報の取得と印刷ジョブのコマンド出力を実行する(S203)。   Subsequently, the application 21 commands the start of the document (S103). The document start command is also transmitted to the printer driver rendering unit 27 via the GDI 25 when the application 21 calls a function provided by the Win32 (GDI32) 23. As a result, the printer driver rendering unit 27 uses the GDI 25 to acquire information necessary for the print job and output a command for the print job (S203).

そして、アプリケーション21は、ページの開始を命令する(S105)。ページ開始の命令も、他の命令同様、Win32(GDI32)23が提供する関数をアプリケーション21が呼び出すことで、GDI25を介してプリンタドライバレンダリング部27へと伝達される。これにより、プリンタドライバレンダリング部27は、GDI25を利用して各ページに必要な情報の取得とページ開始のコマンド出力を実行する(S205)。   Then, the application 21 commands the start of the page (S105). The page start command is transmitted to the printer driver rendering unit 27 via the GDI 25 when the application 21 calls a function provided by the Win 32 (GDI 32) 23, as with other commands. Accordingly, the printer driver rendering unit 27 uses the GDI 25 to execute acquisition of information necessary for each page and output of a page start command (S205).

次いで、アプリケーション21は、ページ内の描画を命令する(S107)。このS107は、ページ内にある個々の描画物毎に実行され、例えば、複数の描画物が存在する場合であればS107が複数回にわたって実行され、これにより、各描画物に対応する描画命令が順に発行されることになる。   Next, the application 21 commands drawing within the page (S107). This S107 is executed for each individual drawing object in the page. For example, if there are a plurality of drawing objects, S107 is executed a plurality of times, whereby a drawing command corresponding to each drawing object is issued. It will be issued in order.

S107においても、Win32(GDI32)23が提供する関数をアプリケーション21が呼び出すことで描画命令が発行され、その情報がGDI25を介してプリンタドライバレンダリング部27へと伝達される。これにより、プリンタドライバレンダリング部27は、各ページに対して描画される命令をコマンドとして出力、または、描画メモリに描画してBMP(ビットマップ)化する(S207)。   Also in S107, a drawing command is issued when the application 21 calls a function provided by the Win32 (GDI32) 23, and the information is transmitted to the printer driver rendering unit 27 via the GDI25. As a result, the printer driver rendering unit 27 outputs a command to be drawn for each page as a command, or draws it in a drawing memory to form a BMP (bitmap) (S207).

S207において、コマンドとして出力するか描画メモリに描画してBMP(ビットマップ)化するかは、プリンタ2側にコマンドによる描画を実行する機能があるか否かによって変わる。   In S207, whether to output as a command or to draw in the drawing memory to make a BMP (bitmap) depends on whether or not the printer 2 has a function to execute drawing by the command.

このようにしてページ内の描画をすべて終えたら、これにより、アプリケーション21上で編集された1ページ分の画像(ベース画像)の描画が完了したことになるので、アプリケーション21は、ページの終了を命令する(S109)。ページの終了命令も、他の命令同様、Win32(GDI32)23が提供する関数をアプリケーション21が呼び出すことで、GDI25を介してプリンタドライバレンダリング部27へと伝達される。これにより、プリンタドライバレンダリング部27は、ページ出力処理を実行する(S209)。このページ出力処理の中で、ウォーターマークの描画などが実行されることになるが、その詳細については後述する。   When all the drawing on the page is completed in this way, the drawing of the image (base image) for one page edited on the application 21 is completed. Thus, the application 21 terminates the page. Command is given (S109). The page end command is transmitted to the printer driver rendering unit 27 via the GDI 25 when the application 21 calls a function provided by the Win 32 (GDI 32) 23, as with other commands. Accordingly, the printer driver rendering unit 27 executes page output processing (S209). In this page output process, watermark drawing and the like are executed, and details thereof will be described later.

なお、以上説明したS105〜S109は、ドキュメント内に含まれる個々のページ毎に実行され、例えば、複数のページからなるドキュメントの場合であれば、S105〜S109が複数回にわたって繰り返される。その結果、複数ページ分の描画がなされることになる。   Note that S105 to S109 described above are executed for each page included in the document. For example, in the case of a document including a plurality of pages, S105 to S109 are repeated a plurality of times. As a result, drawing for a plurality of pages is performed.

このような処理の結果、ドキュメント内の最終ページについての処理が完了したら、アプリケーション21は、ドキュメントの終了を命令する(S111)。ドキュメントの終了も、他の命令同様、Win32(GDI32)23が提供する関数をアプリケーション21が呼び出すことで、GDI25を介してプリンタドライバレンダリング部27へと伝達される。これにより、プリンタドライバレンダリング部27は、印刷ジョブ終了のコマンド出力を実行する(S211)。   If the processing for the last page in the document is completed as a result of such processing, the application 21 commands the end of the document (S111). The end of the document is also transmitted to the printer driver rendering unit 27 via the GDI 25 when the application 21 calls a function provided by the Win 32 (GDI 32) 23, as with other commands. Accordingly, the printer driver rendering unit 27 executes a command output for ending the print job (S211).

最後に、アプリケーション21は、印刷用デバイスコンテキストの破棄を命令する(S113)。S113で発行された命令も、他の命令同様、Win32(GDI32)23が提供する関数をアプリケーション21が呼び出すことで、GDI25を介してプリンタドライバレンダリング部27へと伝達される。これにより、プリンタドライバレンダリング部27は、印刷に必要な情報を破棄する(S213)。   Finally, the application 21 commands the discard of the printing device context (S113). The command issued in S113 is transmitted to the printer driver rendering unit 27 via the GDI 25 when the application 21 calls a function provided by the Win32 (GDI32) 23, as with other commands. Accordingly, the printer driver rendering unit 27 discards information necessary for printing (S213).

そして、以上のようなS101〜S113の処理手順すべてを終えたら、これにて、アプリケーション21による印刷処理は終了することになる。   When all the processing steps from S101 to S113 are completed, the printing process by the application 21 is finished.

[ページ出力処理の詳細]
次に、上記S209のページ出力処理について、その詳細を図4および図5に基づいて説明する。
[Details of page output processing]
Next, the details of the page output processing in S209 will be described with reference to FIGS.

このページ出力処理を開始すると、プリンタドライバレンダリング部27は、ウォーターマークの描画が必要か否かを判断する(S305)。ウォーターマークの描画が必要か否かは、プリンタドライバインターフェース部29を利用して、利用者が任意に設定可能となっており、S305では、利用者による設定に基づく判断がなされる。   When this page output process is started, the printer driver rendering unit 27 determines whether or not drawing of a watermark is necessary (S305). Whether or not the watermark drawing is necessary can be arbitrarily set by the user using the printer driver interface unit 29. In S305, a determination is made based on the setting by the user.

S305において、ウォーターマークの描画が必要と判断された場合(S305:YES)、プリンタドライバレンダリング部27は、ウォーターマーク描画処理を実行する(S307)。このS307は、詳しくは図5に示すような処理となる。   If it is determined in S305 that drawing of a watermark is necessary (S305: YES), the printer driver rendering unit 27 executes a watermark drawing process (S307). This S307 is a process as shown in detail in FIG.

以下、図5に示す処理の説明をするに当たっては、具体的な事例として、図6(a)に示す印刷用の描画エリア51に対して、ウォーターマーク53を描画する事例を挙げて説明を続ける。   Hereinafter, in describing the processing shown in FIG. 5, the description will be continued by giving a case where the watermark 53 is drawn in the printing drawing area 51 shown in FIG. 6A as a specific case. .

ここで例示する描画エリア51は、解像度が横4900×縦6400ドットのエリアで、この描画エリア51は描画メモリ37内に確保されるものである。また、ウォーターマーク53は、上記横4900×縦6400ドットの左上を原点(0,0)とする座標系で、「左上頂点の座標(x,y)=(1000,1700)、(横方向ドット数cx,縦方向ドット数cy)=(3000,3000)の範囲」に描かれている。また、表示部16としては、解像度:横800×縦600の表示装置を採用しており、表示用の描画エリアの解像度も横800×縦600ドットとなっている。   The drawing area 51 illustrated here is an area having a resolution of 4900 horizontal × 6400 dots vertical, and the drawing area 51 is secured in the drawing memory 37. The watermark 53 is a coordinate system in which the upper left of the above 4900 × 6400 dots is the origin (0, 0), and the coordinates of the upper left vertex (x, y) = (1000, 1700), (horizontal dots Number cx, number of vertical dots cy) = (range of 3000, 3000) ”. Further, the display unit 16 employs a display device having a resolution of 800 × 600 in the horizontal direction, and the resolution of the display drawing area is 800 × 600 in the horizontal direction.

さて、図5に示す処理に進んだ場合について説明を続けると、プリンタドライバレンダリング部27は、まず、表示用デバイスコンテキストを取得する(S401)。S401により、表示用のデバイスコンテキストとしては、ディスプレイのデバイスコンテキストと、およびそのディスプレイのデバイスコンテキストと互換性のあるメモリデバイスコンテキストが取得される。   Continuing the description of the case where the process proceeds to the process shown in FIG. 5, the printer driver rendering unit 27 first acquires a display device context (S401). Through S401, as the display device context, a display device context and a memory device context compatible with the display device context are acquired.

続いて、プリンタドライバレンダリング部27は、表示用デバイスコンテキストから描画可能なサイズを取得し、分割数を算出する(S403)。S403において、表示用デバイスコンテキストから取得される「描画可能なサイズ」は、表示部16の描画エリアの解像度に相当し、本実施形態で例示する事例の場合、解像度:横800×縦600が取得される。   Subsequently, the printer driver rendering unit 27 obtains a drawable size from the display device context and calculates the number of divisions (S403). In S403, the “drawable size” acquired from the display device context corresponds to the resolution of the drawing area of the display unit 16, and in the example illustrated in the present embodiment, the resolution: horizontal 800 × vertical 600 is acquired. Is done.

また、S403において算出される分割数は、印刷用の描画エリア51を、表示部16の描画エリア相当のサイズを持つ領域単位で分割した場合に、横および縦それぞれがいくつの領域に分割されるのかを示す値である。   The number of divisions calculated in S403 is divided into a number of regions in the horizontal and vertical directions when the print drawing area 51 is divided into regions each having a size equivalent to the drawing area of the display unit 16. It is a value indicating whether or not.

例えば、印刷用の描画エリア51が上記横4900×縦6400ドット、表示用の描画エリアが上記横800×縦600ドットの場合、横方向の分割数としては、計算式「4900÷800=6.125」から小数点以下を切り上げることで、分割数「7」が算出される。同様に、縦方向の分割数としては、計算式「6400÷600=10.66…」から小数点以下を切り上げることにより、分割数「11」が算出される。   For example, when the printing drawing area 51 is 4900 × 6400 dots in the horizontal direction and the drawing area for display is 800 × 600 dots in the horizontal direction, the number of divisions in the horizontal direction is calculated by the formula “4900 ÷ 800 = 6. The number of divisions “7” is calculated by rounding up the decimal part from “125”. Similarly, the number of divisions “11” is calculated as the number of divisions in the vertical direction by rounding up the decimal part from the calculation formula “6400 ÷ 600 = 10.66.

この場合、印刷用の描画エリア51(横4900×縦6400ドット)は、仮想的には、図6(b)に示すように、横800×縦600ドットの単位描画エリアを横方向に7列、縦方向に11行並べてなる仮想的な描画エリア55(横5600×縦6600ドット)の一部に該当する領域であると見なすことができる。   In this case, the drawing area 51 for printing (horizontal 4900 × vertical 6400 dots) is virtually divided into seven horizontal unit drawing areas of 800 × 600 horizontal dots as shown in FIG. 6B. It can be regarded as a region corresponding to a part of a virtual drawing area 55 (5600 horizontal × 6600 vertical) arranged in 11 rows in the vertical direction.

また、そのように見なした場合、上記「座標x,y(1000,1700)を左上の頂点とする横方向ドット数cx,縦方向ドット数cy(3000,3000)の範囲」に描かれるウォーターマーク53は、上記仮想的な描画エリア55内では、図6(c)に示すような位置にあるものと見なすことができる。この場合、ウォーターマーク53が実際に描画されるのは、図6(d)に示すように、番号:16〜19,23〜26,30〜33,37〜40,44〜47,51〜54が付された横4×縦6の各単位描画エリアとなる。   Further, in such a case, the water drawn in the “range of the horizontal dot number cx and the vertical dot number cy (3000, 3000) having the coordinates x, y (1000, 1700) as the upper left vertex” is described above. The mark 53 can be regarded as being in the position shown in FIG. 6C in the virtual drawing area 55. In this case, the watermark 53 is actually drawn, as shown in FIG. 6D, numbers 16-19, 23-26, 30-33, 37-40, 44-47, 51-54. Each unit drawing area is 4 × 6 in the horizontal direction.

このような想定の下、S403を終えたら、プリンタドライバレンダリング部27は、ウォーターマーク53の描画対象領域から、分割された表示用デバイスコンテキストへの描画の有無を判別する(S405)。S405では、上記横4×縦6の各単位描画エリアについては、分割された表示用デバイスコンテキストへの描画があり、それ以外の各単位描画エリアについては、分割された表示用デバイスコンテキストへの描画がないものと判別する。   Under this assumption, after finishing S403, the printer driver rendering unit 27 determines whether or not drawing is performed on the divided display device context from the drawing target area of the watermark 53 (S405). In S405, the horizontal 4 × vertical 6 unit drawing areas are drawn in the divided display device context, and the other unit drawing areas are drawn in the divided display device context. It is determined that there is not.

より具体的には、次の4つの関係式;「ウォーターマーク53の左上頂点のx座標(x)>{(表示用の描画エリアの横方向ドット数)×(仮想的な描画エリア55内にある単位描画エリアの左からの位置)}」、「ウォーターマーク53の左上頂点のy座標(y)>{(表示用の描画エリアの縦方向ドット数)×(仮想的な描画エリア55内にある単位描画エリアの上からの位置)}」、「{ウォーターマーク53の左上頂点のx座標(x)+ウォーターマーク53の横方向ドット数(cx)}<{(表示用の描画エリアの横方向ドット数)×((仮想的な描画エリア55内にある単位描画エリアの左からの位置)−1)}」、「{ウォーターマーク53の左上頂点のy座標(y)+ウォーターマーク53の縦方向ドット数(cy)}<{(表示用の描画エリアの縦方向ドット数)×((仮想的な描画エリア55内にある単位描画エリアの上からの位置)−1)}」について、仮想的な描画エリア55内にある各単位描画エリアが、いずれか1つの関係式を満たす場合、S405では、分割された表示用デバイスコンテキストへの描画がないと判別される。   More specifically, the following four relational expressions: “x coordinate (x) of upper left vertex of watermark 53> {(number of horizontal dots in display drawing area) × (in virtual drawing area 55 “Position from the left of a certain unit drawing area)}”, “y coordinate (y) of the upper left vertex of the watermark 53> {(number of vertical dots in the drawing area for display) × (in the virtual drawing area 55 Position from the top of a certain unit drawing area}}, “{the x coordinate (x) of the upper left vertex of the watermark 53 + the number of horizontal dots of the watermark 53 (cx)} <{(the width of the display drawing area Number of direction dots) × ((position from left of unit drawing area in virtual drawing area 55) −1)} ”,“ {y coordinate (y) of upper left vertex of watermark 53 + watermark 53 Number of dots in the vertical direction (cy)} <{( “Number of dots in the vertical direction of the drawing area for indication) × ((position from above the unit drawing area in the virtual drawing area 55) −1)}” ”, each unit in the virtual drawing area 55 If the drawing area satisfies any one of the relational expressions, it is determined in S405 that there is no drawing on the divided display device context.

例えば、番号:1が付された単位描画エリアの場合、「ウォーターマーク53の左上頂点のx座標(x=1000)>{(表示用の描画エリアの横方向ドット数=800)×(仮想的な描画エリア55内にある単位描画エリアの左からの位置=1)}」については、「1000>800」となって関係式が成り立つので、この場合、「分割された表示用デバイスコンテキストへの描画がない(=図6(c)でいえば、ウォーターマーク53との重なりがない単位描画エリア)」と判別される。   For example, in the case of the unit drawing area with the number “1”, “x coordinate (x = 1000) of upper left vertex of watermark 53> {(number of horizontal dots in display drawing area = 800) × (virtual The position of the unit drawing area in the correct drawing area 55 from the left = 1)} ”is“ 1000> 800 ”, and the relational expression is established. It is determined that there is no drawing (= the unit drawing area that does not overlap with the watermark 53 in FIG. 6C).

また、番号:16が付された単位描画エリアの場合、「ウォーターマーク53の左上頂点のx座標(x=1000)>{(表示用の描画エリアの横方向ドット数=800)×(仮想的な描画エリア55内にある単位描画エリアの左からの位置=2)}」については、「1000>1600」となって成り立たない。同様に、「ウォーターマーク53の左上頂点のy座標(y=1700)>{(表示用の描画エリアの縦方向ドット数=600)×(仮想的な描画エリア55内にある単位描画エリアの上からの位置=3)}」についても、「1700>1800」となって成り立たず、「{ウォーターマーク53の左上頂点のx座標(x=1000)+ウォーターマーク53の横方向ドット数(cx=3000)}<{(表示用の描画エリアの横方向ドット数=800)×((仮想的な描画エリア55内にある単位描画エリアの左からの位置=2)−1)}」についても、「1000+3000<800×(2−1)」となって成り立たず、「{ウォーターマーク53の左上頂点のy座標(y=1700)+ウォーターマーク53の縦方向ドット数(cy=3000)}<{(表示用の描画エリアの縦方向ドット数=600)×((仮想的な描画エリア55内にある単位描画エリアの上からの位置=3)−1)}」についても、「1700+3000<600×(3−1)」となって成り立たない。したがって、この場合、4つの関係式すべてが成り立たないので、この場合、「分割された表示用デバイスコンテキストへの描画がある(=図6(c)でいえば、ウォーターマーク53との重なりがある単位描画エリア)」と判別される。   Further, in the case of the unit drawing area to which the number: 16 is attached, “x coordinate (x = 1000) of the upper left vertex of the watermark 53> {(number of horizontal dots in the drawing area for display = 800) × (virtual In the drawing area 55, the position of the unit drawing area from the left = 2)} ”does not hold because“ 1000> 1600 ”. Similarly, “y coordinate of upper left vertex of watermark 53 (y = 1700)> {(number of vertical dots in display drawing area = 600) × (above unit drawing area in virtual drawing area 55 "1700> 1800" does not hold, and "{the x coordinate of the upper left vertex of the watermark 53 (x = 1000) + the number of horizontal dots of the watermark 53 (cx = 3000)} <{(number of horizontal dots of the drawing area for display = 800) × ((position from the left of the unit drawing area in the virtual drawing area 55 = 2) −1)} ” “1000 + 3000 <800 × (2-1)” does not hold, and “{y coordinate of the upper left vertex of the watermark 53 (y = 1700) + number of vertical dots of the watermark 53 (cy = 30) 0)} <{(number of vertical dots of display drawing area = 600) × ((position from above unit drawing area in virtual drawing area 55 = 3) −1)} ” “1700 + 3000 <600 × (3-1)” is not satisfied. Therefore, in this case, since all four relational expressions do not hold, in this case, “there is drawing in a divided display device context (= in FIG. 6C, there is an overlap with the watermark 53. Unit drawing area) ”.

つまり、上記のような判別方法により、図6(d)に示すような、番号:16〜19,23〜26,30〜33,37〜40,44〜47,51〜54が付された横4×縦6の各単位描画エリアを残して、それ以外の単位描画エリアを処理対象から除外できるのである。   That is, according to the discrimination method as described above, the numbers 16 to 19, 23 to 26, 30 to 33, 37 to 40, 44 to 47, and 51 to 54 as shown in FIG. By leaving each 4 × 6 unit drawing area, the other unit drawing areas can be excluded from the processing target.

さて、このようにして処理対象となる単位描画エリアを選別したら、続いて、処理対象となる単位描画エリアの数に相当する回数の繰り返し処理を実行し、各回ともに、以下に説明するS407〜S413を実行する。   Now, after the unit drawing areas to be processed are selected in this way, the number of repetition processes corresponding to the number of unit drawing areas to be processed is subsequently executed, and in each case S407 to S413 described below. Execute.

すなわち、まず、プリンタドライバレンダリング部27は、表示用デバイスコンテキストに対しての描画座標を計算して(S407)、表示用デバイスコンテキストに対してAPI(Win32(GDI32)23)を利用してウォーターマークを描画する(S409)。   That is, first, the printer driver rendering unit 27 calculates drawing coordinates for the display device context (S407), and uses the API (Win32 (GDI32) 23) for the display device context as a watermark. Is drawn (S409).

上記S407では、ウォーターマーク53の左上頂点としてどのような座標を指定してウォーターマーク53の描画を行えば、左上頂点の座標が(0,0)となっている表示用描画エリアに対し、所期の「分割されたウォーターマーク53の一部」を描画できるのかが計算により求められる。   In S407, if the watermark 53 is drawn by designating what coordinates are as the upper left vertex of the watermark 53, the display upper right vertex is set to (0, 0) with respect to the display drawing area. Whether or not the “part of the divided watermark 53” of the period can be drawn is calculated.

具体的には、次の2つの計算式;「x座標(cx’)=(ウォーターマーク53の左上頂点のx座標)−{(表示用の描画エリアの横方向ドット数)×((仮想的な描画エリア55内にある単位描画エリアの左からの位置)−1)}」、「y座標(cy’)=(ウォーターマーク53の左上頂点のy座標)−{(表示用の描画エリアの縦方向ドット数)×((仮想的な描画エリア55内にある単位描画エリアの上からの位置)−1)}」に基づいて、ウォーターマーク53の左上頂点として設定される座標が算出される。   Specifically, the following two calculation formulas: “x coordinate (cx ′) = (x coordinate of the upper left vertex of the watermark 53) − {(number of horizontal dots in the drawing area for display) × ((virtual 1)} ”,“ y coordinate (cy ′) = (y coordinate of upper left vertex of watermark 53) − {(in the drawing area for display) Based on (vertical number of dots) × ((position from above the unit drawing area in the virtual drawing area 55) −1)} ”, the coordinates set as the upper left vertex of the watermark 53 are calculated. .

例えば、繰り返し処理の1回目において、番号:16が付された単位描画エリアが処理対象となった場合であれば、図6(b)に示す通り、左から2個目、上から3個目のエリアなので、「cx’=1000−(800×(2−1))=200」、「cy’=1700−(600×(3−1))=500」と算出される。   For example, in the first iteration, if the unit drawing area numbered 16 is a processing target, the second from the left and the third from the top as shown in FIG. 6B. Therefore, “cx ′ = 1000− (800 × (2-1)) = 200” and “cy ′ = 1700− (600 × (3-1)) = 500” are calculated.

この場合、S409では、左上頂点の座標が(0,0)となっている表示用描画エリア(800×600)における座標(200,500)を左上頂点としてウォーターマーク53を描画し、これにより、番号:16が付された単位描画エリア内に描かれるべき部分画像が表示用描画エリア内に描画されることになる。   In this case, in S409, the watermark 53 is drawn with the coordinates (200, 500) in the display drawing area (800 × 600) where the coordinates of the upper left vertex are (0, 0) as the upper left vertex, The partial image to be drawn in the unit drawing area numbered 16 is drawn in the display drawing area.

同様に、繰り返し処理の2回目において、番号:17が付された単位描画エリアが処理対象となった場合であれば、図6(b)に示す通り、左から3個目、上から3個目のエリアなので、「cx’=1000−(800×(3−1))=−600」、「cy’=1700−(600×(3−1))=500」と算出される。   Similarly, in the second iteration, if the unit drawing area numbered 17 is the processing target, the third from the left and the third from the top as shown in FIG. 6B. Since it is the eye area, “cx ′ = 1000− (800 × (3-1)) = − 600” and “cy ′ = 1700− (600 × (3-1)) = 500” are calculated.

この場合、S409では、左上頂点の座標が(0,0)となっている表示用描画エリア(800×600)における座標(−600,500)を左上頂点としてウォーターマーク53を描画し、これにより、番号:17が付された単位描画エリア内に描かれるべき部分画像が表示用描画エリア内に描画されることになる。   In this case, in S409, the watermark 53 is drawn with the coordinates (−600,500) in the display drawing area (800 × 600) where the coordinates of the upper left vertex are (0, 0) as the upper left vertex, thereby , The partial image to be drawn in the unit drawing area numbered 17 is drawn in the display drawing area.

すなわち、ウォーターマーク53の左上頂点のx座標として負の値を設定することにより、表示用描画エリア(800×600)の左方へウォーターマーク53の一部がはみ出すかたちで描画を実行し、これにより、表示用描画エリア内には、所期の部分画像(ウォーターマーク53内で表示用描画エリアと一致する座標を持つ範囲)を描画することができるのである。   That is, by setting a negative value as the x coordinate of the upper left vertex of the watermark 53, the drawing is executed in such a way that a part of the watermark 53 protrudes to the left of the display drawing area (800 × 600). Thus, an intended partial image (a range having coordinates that coincide with the display drawing area in the watermark 53) can be drawn in the display drawing area.

さらに同様に、繰り返し処理の24回目において、番号:54が付された単位描画エリアが処理対象となった場合であれば、図6(b)に示す通り、左から5個目、上から8個目のエリアなので、「cx’=1000−(800×(5−1))=−2200」、「cy’=1700−(600×(8−1))=−3900」と算出される。   Similarly, in the 24th iteration, if the unit drawing area numbered 54 is a processing target, as shown in FIG. 6B, the fifth from the left and 8 from the top. Since it is the first area, “cx ′ = 1000− (800 × (5-1)) = − 2200” and “cy ′ = 1700− (600 × (8-1)) = − 3900” are calculated.

この場合、S409では、左上頂点の座標が(0,0)となっている表示用描画エリア(800×600)における座標(−2200,−3900)を左上頂点としてウォーターマーク53を描画し、これにより、番号:54が付された単位描画エリア内に描かれるべき部分画像が表示用描画エリア内に描画される。   In this case, in S409, the watermark 53 is drawn with the coordinates (−2200, −3900) in the display drawing area (800 × 600) where the coordinates of the upper left vertex are (0, 0) as the upper left vertex. Thus, the partial image to be drawn in the unit drawing area numbered 54 is drawn in the display drawing area.

このケースが、ウォーターマーク53の左上頂点のx,y座標として絶対値が最も大きい負の値を設定するケースである。このケースでは、表示用描画エリア(800×600)の最も左方および最も上方までウォーターマーク53の一部が大きくはみ出すかたちで描画が実行され、その結果、表示用描画エリア内には、ウォーターマーク53の最も右下に当たる部分画像を描画することができる。   This case is a case where a negative value having the largest absolute value is set as the x and y coordinates of the upper left vertex of the watermark 53. In this case, the drawing is executed in such a way that a part of the watermark 53 protrudes to the left and the uppermost part of the display drawing area (800 × 600). As a result, the watermark is displayed in the display drawing area. The partial image corresponding to the lowermost right of 53 can be drawn.

なお、以上説明したS409において、表示用描画エリアへの描画は、表示用のデバイスコンテキストに対する描画として実行される。ただし、その際には、S401において取得したデバイスコンテキストの内、ディスプレイのデバイスコンテキストは利用せず、メモリデバイスコンテキストの方を利用する。これにより、表示用のデバイスコンテキストに対する描画を実行しても、描画物が実際に表示部16に表示されてしまうのを回避することができる。   Note that in S409 described above, drawing in the display drawing area is executed as drawing for a display device context. However, in that case, the memory device context is used instead of the display device context in the device context acquired in S401. As a result, even if drawing is performed on the device context for display, it is possible to avoid the fact that the drawn matter is actually displayed on the display unit 16.

さて、このようにして処理対象となった1つの単位描画エリアに対応する部分画像(ウォーターマーク53の一部)を描画したら、プリンタドライバレンダリング部27は、表示用デバイスコンテキストから、描画されたウォーターマークを取得する(S411)。このS411では、S409において描画された表示用描画エリア相当のサイズを持つウォーターマークの一部分に相当する画像を取得する。   Now, after drawing a partial image (a part of the watermark 53) corresponding to one unit drawing area to be processed in this way, the printer driver rendering unit 27 draws the drawn water from the display device context. A mark is acquired (S411). In S411, an image corresponding to a part of a watermark having a size equivalent to the display drawing area drawn in S409 is acquired.

そして、取得したウォーターマークを印刷用の描画メモリと合成する(S413)。すなわち、既に説明したS207により、印刷用の描画エリア51内には、アプリケーション21上で編集された画像(ベース画像)が格納されているので、これに対し、取得したウォーターマークを合成する。   Then, the acquired watermark is combined with the drawing memory for printing (S413). That is, the image (base image) edited on the application 21 is stored in the print drawing area 51 by S207 described above, and the acquired watermark is combined therewith.

ここで、例えば、繰り返し処理の1回目において、番号:16が付された単位描画エリアが処理対象となった場合であれば、図7(a)に示すように、印刷用の描画エリア51内にウォーターマーク53の一部が合成される。以下、繰り返し処理の2〜4回目においては、図7(b)に示すように、印刷用の描画エリア51内にウォーターマーク53の一部が矢印で示す順に合成されてゆく。さらに、繰り返し処理の5〜6回目においては、図7(c)に示すように、上から2つ目の位置にも、印刷用の描画エリア51内にウォーターマーク53の一部が矢印で示す順に合成されてゆく。そして、最終的には、番号:54が付された単位描画エリアが処理対象となって、図7(d)に示すように、24個目の部分画像が合成されて、印刷用の描画エリア51内にウォーターマーク53全体が合成されることになる。   Here, for example, in the first iteration, if the unit drawing area with the number: 16 is a processing target, as shown in FIG. A part of the watermark 53 is synthesized. Thereafter, in the second to fourth iterations, as shown in FIG. 7B, a part of the watermark 53 is synthesized in the drawing area 51 for printing in the order indicated by the arrows. Furthermore, in the fifth to sixth iterations, a part of the watermark 53 is indicated by an arrow in the print drawing area 51 at the second position from the top as shown in FIG. 7C. They are synthesized in order. Finally, the unit drawing area with the number 54 is processed, and the 24th partial image is synthesized as shown in FIG. The entire watermark 53 is combined in 51.

以上説明したようなS407〜S413の処理は、ウォーターマークに必要な描画がすべて終了するまで繰り返される(S415:NO)。そして、ウォーターマークに必要な描画がすべて終了した場合(S415:YES)、プリンタドライバレンダリング部27は、表示用デバイスコンテキストを破棄する(S417)。すなわち、S401において取得したディスプレイのデバイスコンテキストとメモリデバイスコンテキストを破棄し、これらのデバイスコンテキストに関連するリソースを解放する。   The processes in S407 to S413 as described above are repeated until all the drawing necessary for the watermark is completed (S415: NO). If all the drawing necessary for the watermark is completed (S415: YES), the printer driver rendering unit 27 discards the display device context (S417). That is, the display device context and the memory device context acquired in S401 are discarded, and resources related to these device contexts are released.

さて、以上のような手順で、図5に示したS401〜S417を終了すると、図4に示したS307を終了することになる。そこで、以下、図4に戻って処理の説明を続けると、S307を終えた場合、S309へと進む。また、S305において、ウォーターマークの描画が不要と判断した場合(S305:NO)、プリンタドライバレンダリング部27は、S307を実行せず、この場合もS309へと進む。つまり、上記S307を実行するか否かは、ウォーターマークの描画が必要か不要かに応じて変わるが、いずれの場合ともS309へ進む。   Now, when S401 to S417 shown in FIG. 5 are ended by the above procedure, S307 shown in FIG. 4 is ended. Therefore, returning to FIG. 4 to continue the description of the process, when S307 is completed, the process proceeds to S309. If it is determined in S305 that drawing of a watermark is unnecessary (S305: NO), the printer driver rendering unit 27 does not execute S307, and also proceeds to S309. In other words, whether or not to execute S307 varies depending on whether or not drawing of the watermark is necessary, but in either case, the process proceeds to S309.

そして、S309では、BMP化された描画メモリの画像やページ終了のコマンドを出力して(S309)、図4に示したページ出力処理を終了する。このS309によって、1ページ分の画像がプリンタ2に対して出力されることになる。このとき、S307を実行していれば、アプリケーション21上で編集された画像(ベース画像)に対してウォーターマークが付加された画像がプリンタ2へ出力されることになる。また、S307を実行していなければ、アプリケーション21上で編集された画像(ベース画像)そのものがプリンタ2へ出力されることになる。   In step S309, the BMP-format drawing memory image and page end command are output (step S309), and the page output process shown in FIG. 4 ends. With this S309, an image for one page is output to the printer 2. At this time, if S307 is executed, an image in which a watermark is added to the image (base image) edited on the application 21 is output to the printer 2. If S307 is not executed, the image (base image) edited on the application 21 itself is output to the printer 2.

[効果]
以上説明した通り、上記プリンタドライバレンダリング部27を備えたPC1によれば、S207により、アプリケーション21等のソフトウェアから発行された描画命令に応じて印刷出力用の記憶領域である描画メモリ37にベース画像を描画する。また、プリンタドライバレンダリング部27は、S409により、表示用のデバイスコンテキストに対する描画命令を発行し、その結果、ディスプレイドライバ43によって表示出力用の記憶領域に付加画像が描画される。そして、この付加画像は、S411,S413により、印刷出力用の記憶領域においてベース画像と合成されて印刷用画像とされ、この印刷用画像がS309により印刷装置へと出力される。
[effect]
As described above, according to the PC 1 having the printer driver rendering unit 27, the base image is stored in the drawing memory 37, which is a storage area for print output, according to the drawing command issued from the software such as the application 21 in S207. Draw. In step S409, the printer driver rendering unit 27 issues a drawing command for the display device context, and as a result, the display driver 43 draws the additional image in the storage area for display output. Then, in S411 and S413, this additional image is combined with the base image in the print output storage area to be a printing image, and this printing image is output to the printing apparatus in S309.

そのため、このようなプリンタドライバレンダリング部27を備えたPC1であれば、付加画像を描画する際には、S409により、表示用のデバイスコンテキストに対する描画命令を発行すればよく、印刷用のデバイスコンテキストに対する描画命令を発行しなくても済む。したがって、プリンタドライバレンダリング部27が自ら印刷用のデバイスコンテキストに対する描画命令を発行する場合とは異なり、プリンタドライバレンダリング部27にとっては、自ら発行した描画命令がGDI経由でプリンタドライバレンダリング部27自身へ戻ってくる、といった変則的な状況に陥ることがない。よって、GDIを適正に利用することができ、これにより、所期の付加画像を確実に描画することができる。   Therefore, in the case of the PC 1 having such a printer driver rendering unit 27, when drawing an additional image, a drawing command for a display device context may be issued in S409. There is no need to issue a drawing command. Therefore, unlike the case where the printer driver rendering unit 27 issues a drawing command for the device context for printing, the drawing command issued by the printer driver rendering unit 27 returns to the printer driver rendering unit 27 itself via GDI. It does not fall into an irregular situation such as coming. Therefore, GDI can be used appropriately, and thereby an intended additional image can be reliably drawn.

また、上記のような手法で、プリンタドライバレンダリング部27においてウォーターマークがビットマップ化されれば、プリンタドライバインターフェース部29からプリンタドライバレンダリング部27へビットマップデータを渡さなくてもよい。したがって、例えばプリンタが共有設定されている場合のように、プリンタドライバレンダリング部27およびプリンタドライバインターフェース部29が必ずしも同一のPC上で動作するとは限らない環境であっても、プリンタドライバインターフェース部29を備えるPC側において、ウォーターマークの描画、印刷出力を実施することができる。   If the watermark is converted into a bitmap in the printer driver rendering unit 27 by the above method, the bitmap data need not be passed from the printer driver interface unit 29 to the printer driver rendering unit 27. Accordingly, even in an environment where the printer driver rendering unit 27 and the printer driver interface unit 29 do not always operate on the same PC, such as when the printer is set to be shared, the printer driver interface unit 29 is On the provided PC side, a watermark can be drawn and printed out.

また、上記プリンタドライバレンダリング部27を備えたPC1によれば、表示出力用の記憶領域(描画メモリ)に収まらない大きさの付加画像であっても、S403〜S415により、複数の部分画像に分割して、各部分画像とベース画像との合成を繰り返すことで、付加画像とベース画像を合成することができる。   Further, according to the PC 1 including the printer driver rendering unit 27, even an additional image having a size that does not fit in the display output storage area (drawing memory) is divided into a plurality of partial images through S403 to S415. Then, by repeating the synthesis of each partial image and the base image, the additional image and the base image can be synthesized.

さらに、上記プリンタドライバレンダリング部27を備えたPC1によれば、S405により、有効領域と判別された領域を対象にして、S409(付加画像描画手段)、S411(付加画像取得手段)、およびS413(画像合成手段)による各処理が実行される。したがって、有効領域か無効領域かを問わず、一律に部分画像とベース画像との合成を試行する場合に比べ、付加画像をより迅速に描画することができる。   Further, according to the PC 1 provided with the printer driver rendering unit 27, S409 (additional image drawing unit), S411 (additional image acquisition unit), and S413 (for the region determined to be an effective region in S405). Each process by the image synthesizing means) is executed. Therefore, regardless of whether the region is an effective region or an invalid region, the additional image can be drawn more quickly than when trying to synthesize the partial image and the base image uniformly.

加えて、上記プリンタドライバレンダリング部27を備えたPC1によれば、S207を実行した後に、S209を実行することで、ベース画像に対して重ねて描画されることを前提とした付加画像が、ベース画像よりも後から描画されることになる。したがって、付加画像に対して重ねて描画されるとの前提がないベース画像を、付加画像よりも後から描画する場合に比べ、付加画像を消失させることなく確実にベース画像と合成することができる。   In addition, according to the PC 1 having the printer driver rendering unit 27, after executing S207, an additional image based on the premise that the additional image is drawn on the base image is executed by executing S209. It will be drawn later than the image. Therefore, a base image that is not assumed to be drawn superimposed on the additional image can be reliably combined with the base image without losing the additional image, compared to a case where the base image is drawn after the additional image. .

[変形例等]
以上、本発明の実施形態について説明したが、本発明は上記の具体的な一実施形態に限定されず、この他にも種々の形態で実施することができる。
[Modifications, etc.]
As mentioned above, although embodiment of this invention was described, this invention is not limited to said specific one Embodiment, In addition, it can implement with a various form.

例えば、上記実施形態では、表示用の描画領域にウォーターマークの一部に相当する画像を描画して、その画像を印刷用の描画領域に合成する処理を複数回にわたって繰り返す事例を示したが、このような画像の分割を行うか否かも任意である。例えば、付加したいウォーターマークが比較的小さい場合には、表示用の描画領域に分割することなくウォーターマークを描画できることもあるので、その場合、上記実施形態で説明したような画像の分割は不要となる。   For example, in the above-described embodiment, an example in which an image corresponding to a part of the watermark is drawn in the display drawing area and the process of combining the image with the printing drawing area is repeated multiple times. Whether or not to perform such image division is also arbitrary. For example, if the watermark to be added is relatively small, the watermark may be drawn without being divided into display drawing areas. In this case, the image division as described in the above embodiment is unnecessary. Become.

さらに、上記実施形態では、S405により、仮想的な描画エリア55内において、ウォーターマークの描画が必要となる単位描画エリア(上記実施形態の場合、番号:16〜19,23〜26,30〜33,37〜40,44〜47,51〜54が付された横4×縦6の各単位描画エリア)を抽出していたが、このような処理を行うか否かも任意である。すなわち、例えば、このような処理を行うことなく、仮想的な描画エリア55内にあるすべての単位描画エリアを対象に、ウォーターマークの描画処理を行っても、最終的な処理結果としては、上記実施形態とまったく差異のない処理結果が得られる。ただし、より迅速に処理を完了したい場合には、上記実施形態の如く、処理対象とすべき単位描画エリアを選別する方が好ましい。   Furthermore, in the above embodiment, the unit drawing area (numbers: 16 to 19, 23 to 26, 30 to 33 in the above embodiment) that requires drawing of the watermark in the virtual drawing area 55 in S405. , 37 to 40, 44 to 47, and 51 to 54 are extracted (4 × 6 unit drawing areas), whether or not to perform such processing is also arbitrary. That is, for example, even if the watermark drawing process is performed on all unit drawing areas in the virtual drawing area 55 without performing such a process, the final processing result is as described above. A processing result that is completely different from the embodiment can be obtained. However, when it is desired to complete the processing more quickly, it is preferable to select a unit drawing area to be processed as in the above embodiment.

印刷システムのハードウェア構成を示すブロック図。1 is a block diagram showing a hardware configuration of a printing system. 印刷システムのソフトウェア構成を示すブロック図。FIG. 2 is a block diagram illustrating a software configuration of the printing system. 印刷処理のフローチャート。10 is a flowchart of print processing. ページ出力処理のフローチャート。The flowchart of a page output process. ウォーターマーク描画処理のフローチャート。The flowchart of a watermark drawing process. 印刷用の描画エリアと表示用の描画エリアと仮想的な描画エリアの関係を説明するための説明図。Explanatory drawing for demonstrating the relationship between the drawing area for printing, the drawing area for a display, and a virtual drawing area. 表示用の描画エリアから取得した画像を印刷用の描画エリアに合成してゆく状況を説明するための説明図。Explanatory drawing for demonstrating the condition which combines the image acquired from the drawing area for a display with the drawing area for printing.

符号の説明Explanation of symbols

1・・・パーソナルコンピュータ(PC)、2・・・プリンタ、11・・・CPU、12・・・ROM、13・・・RAM、14・・・ハードディスク装置、15・・・操作部、16・・・表示部、17・・・通信インターフェース、21・・・アプリケーション、23・・・Win32(GDI32)、25…グラフィックデバイスインターフェース(GDI)、27・・・プリンタドライバレンダリング部、29・・・プリンタドライバインターフェース部、31・・・描画命令レンダリング部、33・・・ウォーターマーク描画・合成部、35・・・データ出力部、37・・・描画メモリ、41・・・グラフィックエンジン(GDI)、43・・・ディスプレイドライバ、51・・・印刷用の描画エリア、53・・・ウォーターマーク、55・・・仮想的な描画エリア。   DESCRIPTION OF SYMBOLS 1 ... Personal computer (PC), 2 ... Printer, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Hard disk drive, 15 ... Operation part, 16. ..Display unit, 17 ... Communication interface, 21 ... Application, 23 ... Win32 (GDI32), 25 ... Graphic device interface (GDI), 27 ... Printer driver rendering unit, 29 ... Printer Driver interface unit, 31... Rendering command rendering unit, 33... Watermark rendering / synthesizing unit, 35 .. data output unit, 37 .. rendering memory, 41 .. graphic engine (GDI), 43 ... Display driver, 51 ... Drawing area for printing, 53 ... Watermark 55 ... virtual drawing area.

Claims (6)

情報処理装置上で機能する少なくとも1つのソフトウェアからGDI(Graphic Device Interface)経由でプリンタドライバのレンダリング部へ描画命令を伝達することにより、印刷装置での印刷出力を実行可能で、且つ、前記ソフトウェアから前記GDI経由でディスプレイドライバへ描画命令を伝達することにより、表示装置での表示出力を実行可能に構成された前記情報処理装置において、前記情報処理装置が備える制御部を、前記プリンタドライバのレンダリング部として機能させるためのプリンタ制御用プログラムであって、
前記ソフトウェアから印刷用のデバイスコンテキストに対する描画命令が発行された際に、前記GDIを利用した描画処理を実行することにより、印刷出力用の記憶領域にベース画像を描画するベース画像描画手段と、
表示用のデバイスコンテキストに対する描画命令を発行して、前記GDIを利用した描画処理を前記ディスプレイドライバに実行させることにより、表示出力用の記憶領域に付加画像を描画する付加画像描画手段と、
前記付加画像描画手段によって前記表示出力用の記憶領域に描画された前記付加画像を取得する付加画像取得手段と、
前記付加画像取得手段によって取得された前記付加画像を、前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、印刷用画像を前記印刷出力用の記憶領域に合成する画像合成手段と、
前記画像合成手段によって前記印刷出力用の記憶領域に合成された印刷用画像を、前記印刷装置へと出力するための制御を実行する出力制御手段と
を備えた前記プリンタドライバのレンダリング部として、前記制御部を機能させるためのプリンタ制御用プログラム。
By transmitting a drawing command from at least one software functioning on the information processing apparatus to the rendering unit of the printer driver via GDI (Graphic Device Interface), print output on the printing apparatus can be executed. In the information processing apparatus configured to execute display output on a display device by transmitting a drawing command to the display driver via the GDI, the control unit included in the information processing device includes a rendering unit of the printer driver A printer control program for functioning as
A base image rendering unit for rendering a base image in a storage area for print output by executing a rendering process using the GDI when a rendering command for a device context for printing is issued from the software;
An additional image rendering means for rendering an additional image in a storage area for display output by issuing a rendering command for a device context for display and causing the display driver to perform rendering processing using the GDI;
Additional image acquisition means for acquiring the additional image drawn in the storage area for display output by the additional image drawing means;
The additional image acquired by the additional image acquisition unit is drawn on the base image drawn in the storage area for print output so as to be combined with the storage area for print output. Image synthesis means;
As the rendering unit of the printer driver, comprising: output control means for executing control for outputting the print image synthesized by the image synthesis means to the storage area for print output to the printing apparatus; A printer control program for causing the control unit to function.
前記付加画像描画手段は、前記付加画像を複数の部分画像に分割して、各部分画像を描画するための描画命令を前記表示用のデバイスコンテキストに対して発行することにより、前記ディスプレイドライバに各部分画像を描画させる手段、
前記付加画像取得手段は、前記ディスプレイドライバによって1つの前記部分画像が描画される毎に、前記部分画像を取得する手段、
前記画像合成手段は、前記付加画像取得手段によって取得された前記部分画像について、当該部分画像を重ね合わせるべき前記ベース画像上の位置を、前記付加画像を複数の部分画像に分割したときの分割条件に基づいて算出し、算出された位置に前記部分画像を合成する手段、
とされており、
これら前記付加画像描画手段、前記付加画像取得手段、および前記画像合成手段による各処理が、前記複数の部分画像それぞれについて実行されることにより、前記印刷用画像が前記印刷出力用の記憶領域に合成される
ことを特徴とする請求項1に記載のプリンタ制御用プログラム。
The additional image rendering means divides the additional image into a plurality of partial images, and issues a rendering command for rendering each partial image to the display device context, thereby providing each display driver with a rendering command. Means for drawing a partial image,
The additional image acquisition means acquires the partial image every time the partial image is drawn by the display driver;
The image synthesizing means, with respect to the partial image acquired by the additional image acquisition means, a position on the base image on which the partial image is to be superimposed, a division condition when the additional image is divided into a plurality of partial images Means for combining the partial image with the calculated position,
And
The processing by the additional image drawing unit, the additional image acquisition unit, and the image synthesis unit is executed for each of the plurality of partial images, so that the print image is synthesized in the storage area for print output. The printer control program according to claim 1, wherein:
前記ベース画像上において想定された複数の領域について、各領域が、当該領域内に重ね合わせるべき前記部分画像が存在する有効領域か、当該領域内に重ね合わせるべき前記部分画像が存在しない無効領域かを判別する判別手段
を備えた前記プリンタドライバのレンダリング部として、前記制御部を機能させ、
前記判別手段によって前記有効領域と判別された領域を対象にして、前記付加画像描画手段、前記付加画像取得手段、および前記画像合成手段による各処理が、前記複数の部分画像それぞれについて実行されることにより、前記印刷用画像が前記印刷出力用の記憶領域に合成される
ことを特徴とする請求項2に記載のプリンタ制御用プログラム。
For a plurality of regions assumed on the base image, whether each region is an effective region where the partial image to be superimposed in the region is present or an invalid region where the partial image to be superimposed is not present in the region The control unit functions as a rendering unit of the printer driver including a determination unit that determines
Each process by the additional image rendering unit, the additional image acquisition unit, and the image composition unit is executed for each of the plurality of partial images for the region determined as the effective region by the determination unit. The printer control program according to claim 2, wherein the print image is combined with the print output storage area.
前記ベース画像描画手段が、前記印刷出力用の記憶領域にベース画像を描画した後に、前記画像合成手段が、前記付加画像を前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、前記印刷用画像を前記印刷出力用の記憶領域に合成する
ことを特徴とする請求項1〜請求項3のいずれかに記載のプリンタ制御用プログラム。
After the base image drawing means draws a base image in the print output storage area, the image composition means draws the additional image in an overlapping manner with the base image drawn in the print output storage area. The printer control program according to any one of claims 1 to 3, wherein the print image is combined with the print output storage area.
情報処理装置上で機能する少なくとも1つのソフトウェアからGDI(Graphic Device Interface)経由でプリンタドライバのレンダリング部へ描画命令を伝達することにより、印刷装置での印刷出力を実行可能で、且つ、前記ソフトウェアから前記GDI経由でディスプレイドライバへ描画命令を伝達することにより、表示装置での表示出力を実行可能に構成された前記情報処理装置であって、
前記プリンタドライバのレンダリング部は、
前記ソフトウェアから印刷用のデバイスコンテキストに対する描画命令が発行された際に、前記GDIを利用した描画処理を実行することにより、印刷出力用の記憶領域にベース画像を描画するベース画像描画手段と、
表示用のデバイスコンテキストに対する描画命令を発行して、前記GDIを利用した描画処理を前記ディスプレイドライバに実行させることにより、表示出力用の記憶領域に付加画像を描画する付加画像描画手段と、
前記付加画像描画手段によって前記表示出力用の記憶領域に描画された前記付加画像を取得する付加画像取得手段と、
前記付加画像取得手段によって取得された前記付加画像を、前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、印刷用画像を前記印刷出力用の記憶領域に合成する画像合成手段と、
前記画像合成手段によって前記印刷出力用の記憶領域に合成された印刷用画像を、前記印刷装置へと出力するための制御を実行する出力制御手段と
を備えることを特徴とする情報処理装置。
By transmitting a drawing command from at least one software functioning on the information processing apparatus to the rendering unit of the printer driver via GDI (Graphic Device Interface), print output on the printing apparatus can be executed. The information processing apparatus configured to execute display output on a display device by transmitting a drawing command to the display driver via the GDI,
The rendering unit of the printer driver
A base image rendering unit for rendering a base image in a storage area for print output by executing a rendering process using the GDI when a rendering command for a device context for printing is issued from the software;
An additional image rendering means for rendering an additional image in a storage area for display output by issuing a rendering command for a device context for display and causing the display driver to perform rendering processing using the GDI;
Additional image acquisition means for acquiring the additional image drawn in the storage area for display output by the additional image drawing means;
The additional image acquired by the additional image acquisition unit is drawn on the base image drawn in the storage area for print output so as to be combined with the storage area for print output. Image synthesis means;
An information processing apparatus comprising: output control means for executing control for outputting the printing image synthesized in the storage area for print output by the image synthesizing means to the printing apparatus.
情報処理装置と、前記情報処理装置によって制御される印刷装置とを備えてなる印刷システムであって、
前記情報処理装置は、
前記情報処理装置上で機能する少なくとも1つのソフトウェアからGDI(Graphic Device Interface)経由でプリンタドライバのレンダリング部へ描画命令を伝達することにより、前記印刷装置での印刷出力を実行可能で、且つ、前記ソフトウェアから前記GDI経由でディスプレイドライバへ描画命令を伝達することにより、表示装置での表示出力を実行可能に構成されており、しかも、
前記情報処理装置が備える前記プリンタドライバのレンダリング部は、
前記ソフトウェアから印刷用のデバイスコンテキストに対する描画命令が発行された際に、前記GDIを利用した描画処理を実行することにより、印刷出力用の記憶領域にベース画像を描画するベース画像描画手段と、
表示用のデバイスコンテキストに対する描画命令を発行して、前記GDIを利用した描画処理を前記ディスプレイドライバに実行させることにより、表示出力用の記憶領域に付加画像を描画する付加画像描画手段と、
前記付加画像描画手段によって前記表示出力用の記憶領域に描画された前記付加画像を取得する付加画像取得手段と、
前記付加画像取得手段によって取得された前記付加画像を、前記印刷出力用の記憶領域に描画された前記ベース画像に重ねて描画することにより、印刷用画像を前記印刷出力用の記憶領域に合成する画像合成手段と、
前記画像合成手段によって前記印刷出力用の記憶領域に合成された印刷用画像を、前記印刷装置へと出力するための制御を実行する出力制御手段と
を備えることを特徴とする印刷システム。
A printing system comprising an information processing device and a printing device controlled by the information processing device,
The information processing apparatus includes:
By transmitting a drawing command from at least one software functioning on the information processing apparatus to a rendering unit of a printer driver via GDI (Graphic Device Interface), print output on the printing apparatus can be executed, and By transmitting a drawing command from the software to the display driver via the GDI, the display output on the display device can be executed,
The rendering unit of the printer driver included in the information processing apparatus includes:
A base image rendering unit for rendering a base image in a storage area for print output by executing a rendering process using the GDI when a rendering command for a device context for printing is issued from the software;
An additional image rendering means for rendering an additional image in a storage area for display output by issuing a rendering command for a device context for display and causing the display driver to perform rendering processing using the GDI;
Additional image acquisition means for acquiring the additional image drawn in the storage area for display output by the additional image drawing means;
The additional image acquired by the additional image acquisition unit is drawn on the base image drawn in the storage area for print output so as to be combined with the storage area for print output. Image synthesis means;
A printing system comprising: output control means for executing control for outputting the printing image synthesized in the storage area for printing output by the image synthesizing means to the printing apparatus.
JP2008307560A 2008-12-02 2008-12-02 Program for controlling printer, information processor and printing system Pending JP2010134539A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008307560A JP2010134539A (en) 2008-12-02 2008-12-02 Program for controlling printer, information processor and printing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008307560A JP2010134539A (en) 2008-12-02 2008-12-02 Program for controlling printer, information processor and printing system

Publications (1)

Publication Number Publication Date
JP2010134539A true JP2010134539A (en) 2010-06-17

Family

ID=42345806

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008307560A Pending JP2010134539A (en) 2008-12-02 2008-12-02 Program for controlling printer, information processor and printing system

Country Status (1)

Country Link
JP (1) JP2010134539A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012221173A (en) * 2011-04-07 2012-11-12 Nec System Technologies Ltd Print data generation device, print data generation method, and program
JP2015041268A (en) * 2013-08-22 2015-03-02 株式会社リコー Program, information processor, and image processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012221173A (en) * 2011-04-07 2012-11-12 Nec System Technologies Ltd Print data generation device, print data generation method, and program
JP2015041268A (en) * 2013-08-22 2015-03-02 株式会社リコー Program, information processor, and image processing system

Similar Documents

Publication Publication Date Title
US20120140249A1 (en) Information processing device, information processing method, and computer program product
US20110279843A1 (en) Apparatus for Controlling Image Formation, Computer Readable Device Having Stored Thereon Computer-Executable Instructions for Forming Images, and Method of Generating Image Formation Setting Information
JP2010134539A (en) Program for controlling printer, information processor and printing system
US8928933B2 (en) Information processing apparatus for generating printing data by different methods, computer readable recording medium and method of controlling the information processing apparatus
JP5929374B2 (en) Program and information processing apparatus
JP2006215725A (en) Print system, printer management method, computer-readable storage medium storing program, and program
US8773692B2 (en) Printing control apparatus and printing control method for document layout processing
JP2009003712A (en) Printing system and control method
JP5734089B2 (en) Information processing apparatus, control method, and program
JP5734020B2 (en) Print control apparatus, print control method for print control apparatus, and program
JP4481779B2 (en) Printing system, printing data generation method, and program
JP2007011515A (en) Print system, control method of print system and program
JP5849485B2 (en) Print control program, information processing apparatus, and recording medium
JP6939303B2 (en) Control program
JP6238589B2 (en) Image forming apparatus, image processing method, and program
US20240127019A1 (en) Information processing apparatus, control method for information processing apparatus, and storage medium
JP2008020994A (en) Printer driver software and computer
JP5526863B2 (en) Printer driver and print control apparatus
JP2008217433A (en) Information processor, information processing method, program, and storage medium
JP2008219418A (en) Image forming apparatus, image processing method and image processing program
JP2008245067A (en) Printing controller, printing control method, and printing control program
JP2005148926A (en) Display method, program and information processor
JP5611014B2 (en) Information processing apparatus, control method thereof, and program
JP2006178623A (en) Print controller, print control method, and print control program
JP2005159764A (en) Recording method, apparatus, program, and storage medium