JP2012128580A - Information processing unit, information processing method and program - Google Patents
Information processing unit, information processing method and program Download PDFInfo
- Publication number
- JP2012128580A JP2012128580A JP2010278404A JP2010278404A JP2012128580A JP 2012128580 A JP2012128580 A JP 2012128580A JP 2010278404 A JP2010278404 A JP 2010278404A JP 2010278404 A JP2010278404 A JP 2010278404A JP 2012128580 A JP2012128580 A JP 2012128580A
- Authority
- JP
- Japan
- Prior art keywords
- graphic
- opacity
- information
- stored
- partial
- 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
Links
Images
Landscapes
- Image Generation (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
本発明は、グラフィックスの描画を行う技術に関するものである。 The present invention relates to a technique for drawing graphics.
従来、画像データ、図形データ及び文字データ等の描画オブジェクトを含むグラフィックスの描画処理においては、再描画時の処理高速化のために描画オブジェクト毎に描画結果のイメージを保存し、再利用する方法が知られている(例えば、特許文献1参照)。また、描画オブジェクトのスキャンライン毎のエッジ座標を保存し、再利用する方法も知られている(例えば、特許文献2参照)。これらの方法では、一度グラフィックスの描画処理を行った際に、描画結果のイメージや、スキャンライン毎のエッジ座標をメモリに格納していた。そして、再描画時にメモリに格納されたイメージデータやエッジ座標を使用することにより、描画速度の高速化を行っていた。 Conventionally, in graphics drawing processing including drawing objects such as image data, graphic data, and character data, a method of storing and reusing a drawing result image for each drawing object in order to increase processing speed at the time of redrawing Is known (see, for example, Patent Document 1). Also known is a method of storing and reusing edge coordinates for each scan line of a drawing object (for example, see Patent Document 2). In these methods, once a graphics drawing process is performed, an image of a drawing result and edge coordinates for each scan line are stored in a memory. Then, the image data and edge coordinates stored in the memory at the time of redrawing are used to increase the drawing speed.
しかしながら、描画結果のイメージをメモリに保存する方法では、一般にイメージデータのデータサイズは大きくなるため、相応のメモリが必要となるという課題があった。また、イメージデータを保存する方法では、元となる描画オブジェクトの色に変更が発生した場合に再利用できなくなるという課題があった。 However, in the method of storing the drawing result image in the memory, since the data size of the image data is generally large, there is a problem that a corresponding memory is required. In addition, the method of saving image data has a problem that it cannot be reused when the color of the original drawing object is changed.
エッジ座標を保存する方法は、描画オブジェクトの色の変更が発生した場合にも再利用が可能であるが、アンチエイリアス処理(エッジ部分を滑らかに描画する処理)を行うためには、エッジ部分の色決定のために計算負荷のかかる処理が必要であった。また、高品質なアンチエイリアス処理を行うためにスキャンラインを増やす方法がしばしば用いられるが、その場合には保存すべきエッジ座標が増加するため、メモリ消費量も増加するという課題があった。 The method of saving edge coordinates can be reused even when the color of the drawing object changes, but in order to perform anti-aliasing processing (processing that draws the edge portion smoothly), the color of the edge portion A process requiring a calculation load is necessary for the determination. In addition, a method of increasing the number of scan lines is often used in order to perform high-quality anti-aliasing processing. In this case, however, there is a problem that memory consumption increases because edge coordinates to be stored increase.
そこで、本発明の目的は、比較的少ないメモリ使用量で元データの色変更にも対応可能な方法で、高速に再描画を行うことにある。 Therefore, an object of the present invention is to perform redrawing at a high speed by a method that can cope with a color change of the original data with a relatively small memory usage.
本発明の情報処理装置は、第1の図形の形状を示す形状情報に基づいて、前記第1の図形のエッジ部分を構成する各ピクセルの不透明度を示す不透明度情報を算出する算出手段と、前記算出手段により算出された前記第1の図形の不透明度情報を記憶手段に格納する格納手段と、第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されているか否かを判定する判定手段と、前記判定手段により前記第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されていると判定された場合、前記第1の図形の不透明度情報に基づいて、前記第2の図形の描画を行う描画手段とを有することを特徴とする。 The information processing apparatus according to the present invention, based on shape information indicating the shape of the first graphic, calculation means for calculating opacity information indicating the opacity of each pixel constituting the edge portion of the first graphic; Storage means for storing the opacity information of the first graphic calculated by the calculation means in the storage means, and opacity information of the first graphic that can be used when drawing the second graphic is stored. And determining means for determining whether or not the opacity information of the first graphic that can be used when drawing the second graphic is stored by the determining means. And a drawing means for drawing the second graphic based on the opacity information of the first graphic.
本発明によれば、比較的少ないメモリ使用量で元データの色変更にも対応可能な方法で、高速に再描画を行うことが可能となる。 According to the present invention, it is possible to perform redrawing at a high speed by a method that can cope with the color change of the original data with a relatively small memory usage.
以下、本発明を適用した好適な実施形態を、添付図面を参照しながら詳細に説明する。 DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments to which the invention is applied will be described in detail with reference to the accompanying drawings.
先ず、第1の実施形態について説明する。図1は、第1の実施形態に係る情報処理装置の構成を示す図である。以下、図1を参照しながら、本実施形態に係る情報処理装置の構成について説明する。 First, the first embodiment will be described. FIG. 1 is a diagram illustrating a configuration of the information processing apparatus according to the first embodiment. Hereinafter, the configuration of the information processing apparatus according to the present embodiment will be described with reference to FIG.
図1において、CPU101は、システム制御部として情報処理装置全体を制御する。ROM102は、CPU101の制御プログラムや各種固定データを格納する読取専用のメモリである。RAM103は、SRAM、DRAM等で構成された書換え可能なメモリであり、プログラム制御変数等を格納する。各種設定パラメータ、各種ワーク用バッファ等もRAM103に格納される。表示部104は、LCD等を用いて構成され、画像表示を行うものである。操作部105は、キーボードやポインティングデバイス等で構成され、オペレータが各種入力操作を行うためのものである。システムバス106は、101〜105の各ユニットを通信可能に接続する。
In FIG. 1, a
図2は、本実施形態に係る情報処理装置における描画用バッファの一部を模式的に示す図である。図2に示すように、描画用バッファは左上を原点(0,0)とする座標空間を表し、201で示す一つの矩形が1つのピクセル(画素)に相当する。描画用バッファはRAM103に存在し、各ピクセルはRGB各1バイト(8ビット)、合計3バイト(24ビット)で表現される。ここで、RGBはそれぞれ赤緑青の色成分を表す値である。図2の点線で示した円形は、本実施形態において、この座標空間に描画しようとする円形である。このような描画用バッファにおいて、特にX軸方向のピクセルの並びをスキャンラインと呼ぶ。描画用バッファに格納された各ピクセルの色情報に基づいて、表示部104に描画結果の表示が行われる。
FIG. 2 is a diagram schematically showing a part of a drawing buffer in the information processing apparatus according to the present embodiment. As shown in FIG. 2, the drawing buffer represents a coordinate space with the upper left as the origin (0, 0), and one rectangle denoted by 201 corresponds to one pixel. The drawing buffer exists in the
図3は、図2に点線で表した円形を定義したXML(Extensible Markup Language)文書を示す図である。図3に示したXML文書は、SVG(Scalable Vector Graphics)形式で記述されたものである。このXML文書は、幅16ピクセル、高さ16ピクセルの座標空間に、座標(8,8)を中心とする半径5ピクセルの円を不透明の青色で描画することを意味する。本実施形態に係る情報処理装置は、図3に示したXML文書を解析し、そのXML文書で記述されたグラフィックスを表示部104に表示する。
FIG. 3 is a diagram showing an XML (Extensible Markup Language) document in which a circle represented by a dotted line in FIG. 2 is defined. The XML document shown in FIG. 3 is described in SVG (Scalable Vector Graphics) format. This XML document means that a circle with a radius of 5 pixels centered on coordinates (8, 8) is drawn in opaque blue in a coordinate space of 16 pixels wide and 16 pixels high. The information processing apparatus according to the present embodiment analyzes the XML document shown in FIG. 3 and displays graphics described in the XML document on the
図3に示すXML文書は、円形を描画することが記述されているが、各ピクセルは矩形であるため、円形を表現するためにアンチエイリアスという手法が用いられる。アンチエイリアスは、図形のエッジ部分(端部分)のピクセルに半透明の処理を施すことにより、矩形のピクセルで表現されるギザギザを目立たなくする手法である。本実施形態に係る情報処理装置の処理を説明する前に、図4〜図6を用いてアンチエイリアス処理について説明する。 The XML document shown in FIG. 3 describes that a circle is drawn. Since each pixel is a rectangle, a technique called anti-aliasing is used to represent the circle. Anti-aliasing is a technique for making jagged edges represented by rectangular pixels inconspicuous by applying translucent processing to the pixels at the edge (end) of the figure. Before describing the processing of the information processing apparatus according to the present embodiment, anti-aliasing processing will be described with reference to FIGS.
図4は、アンチエイリアス処理の際のエッジ抽出を説明するための図である。アンチエイリアス処理では、図形のエッジ部分の不透明度(オパシティ)を算出する必要がある。そのために、先ず各ピクセルをX軸方向、Y軸方向ともに2分割した仮想の座標空間が想定され、描画しようとする円形のエッジ部分と各スキャンラインとの交点が求められる。図4に示した円周上の黒点がその交点である。このようにして求められたエッジ部分の座標集合(エッジ座標リスト)から、円形を構成する各ピクセルの不透明度が求められる。 FIG. 4 is a diagram for explaining edge extraction during anti-aliasing. In the anti-aliasing process, it is necessary to calculate the opacity (opacity) of the edge portion of the figure. For this purpose, first, a virtual coordinate space is assumed in which each pixel is divided into two in both the X-axis direction and the Y-axis direction, and an intersection between a circular edge portion to be drawn and each scan line is obtained. The black points on the circumference shown in FIG. 4 are the intersections. From the coordinate set (edge coordinate list) of the edge part thus obtained, the opacity of each pixel constituting the circle is obtained.
図5は、円形を構成するピクセルの不透明度の算出方法を説明するための図である。図5の501で示したピクセルの場合、図4に示した交点から、4分割された仮想ピクセルのうち3個が塗り潰されることが算出できる。仮想ピクセル4個が実際の1個のピクセルに相当するため、完全不透明を4とした場合、このピクセルは不透明度が3であるとみなすことができる。このピクセルを描画バッファに描画する場合には、背景色とのアルファブレンドを行って色を決定した上で描画することになる。例えば、背景色が不透明の白であれば、円形は不透明の青であるため、501で示したピクセルは背景の白が1、青が3の割合で合成した色となる。
FIG. 5 is a diagram for explaining a method of calculating the opacity of pixels constituting a circle. In the case of the pixel indicated by
図6は、図5を用いて説明した方法により円形を含む矩形の各ピクセルの不透明度を求めた結果を示す図である。ここで、0は完全透明を意味し、4は完全不透明を意味する。描画する図形は不透明な円形であるが、図6に示すとおり、円形のエッジ部分では半透明(不透明度が1〜3)のピクセルが現れる。 FIG. 6 is a diagram illustrating a result of obtaining the opacity of each rectangular pixel including a circle by the method described with reference to FIG. Here, 0 means completely transparent and 4 means completely opaque. Although the figure to be drawn is an opaque circle, as shown in FIG. 6, semitransparent (opacity is 1 to 3) pixels appear at the edge of the circle.
図4及び図5においては、X軸方向、Y軸方向ともに2分割した仮想の座標空間を想定したが、より細かく分割することにより、より高品質なアンチエイリアス処理を行うことも可能である。また、エッジ部分の不透明度を求める方法は他にもあり、必ずしもここで説明した方法を用いなくてもよい。 In FIGS. 4 and 5, a virtual coordinate space divided into two in both the X-axis direction and the Y-axis direction is assumed. However, it is possible to perform higher-quality anti-aliasing by dividing more finely. There are other methods for obtaining the opacity of the edge portion, and the method described here is not necessarily used.
図7は、本実施形態に係る情報処理装置の処理の流れを示すフローチャートである。一般に、表示するグラフィックスは、複数の図形、画像及び文字によって構成される。これらの図形、画像及び文字のことを描画オブジェクトと称す。図7は、グラフィックスを構成する描画オブジェクトのうちの一つを処理する際の流れを示している。 FIG. 7 is a flowchart showing the flow of processing of the information processing apparatus according to the present embodiment. Generally, graphics to be displayed are composed of a plurality of figures, images, and characters. These figures, images, and characters are referred to as drawing objects. FIG. 7 shows a flow when processing one of the drawing objects constituting the graphics.
図7に示すように、先ずCPU101は、描画しようとする描画オブジェクトに関して、使用可能なオパシティ情報(不透明度情報)がRAM(メモリ)103に格納されているか否かを判定する(ステップS701)。ここでオパシティ情報とは、図6に示す各ピクセルの不透明度を示す情報のことである。ここで、円形についてのオパシティ情報がRAM103に格納されていたとしても、円形の大きさが異なれば、CPU101は使用可能ではないと判定する。円形の大きさが異なれば、特にエッジ部分のピクセルが変わってくるので、RAM103に格納されたオパシティ情報をそのまま使用することができないためである。またCPU101は、矩形等の描画オブジェクトを描画する場合、描画オブジェクトの回転角が異なると使用可能ではないと判定する。なお、色が異なる描画オブジェクトについては、その描画オブジェクトのオパシティ情報がRAM103に格納されていれば、CPU101は、使用可能なオパシティ情報がRAM103に格納されていると判定する。
As shown in FIG. 7, first, the
ステップS701において、使用可能なオパシティ情報がRAM103に格納されていないと判定された場合、CPU101は、図4で説明したように、描画オブジェクトのエッジ座標リストを作成する(ステップS702)。次にCPU101は、図5〜図6で説明したように、エッジ座標リストから各ピクセルの不透明度(オパシティ)を計算し、その結果(オパシティ情報)をRAM103に格納する(ステップS703)。次にCPU101は、オパシティ情報と描画オブジェクトの色情報とから各ピクセルの描画色を算出する(ステップS704)。次にCPU101は、各ピクセルの描画色を描画バッファに描画する(ステップS705)。
If it is determined in step S701 that usable opacity information is not stored in the
一方、ステップS701において、使用可能なオパシティ情報がRAM103に格納されていると判定された場合、CPU101は、RAM103に格納されているオパシティ情報と描画オブジェクトの色情報とから各ピクセルの描画色を算出する(ステップS704)。次にCPU101は、各ピクセルの描画色を描画バッファに描画する(ステップS705)。
On the other hand, if it is determined in step S701 that usable opacity information is stored in the
CPU101は、ステップS703において、或る描画オブジェクト(第1の図形)のオパシティ情報をRAM103に格納する際には、オパシティ情報とともにその描画オブジェクトの形状情報も関連付けてRAM103に格納する。CPU101は、描画しようとする描画オブジェクト(第2の図形)に関して使用可能なオパシティ情報が格納されているか否かは、描画オブジェクト(第1の図形)の形状情報に基づいて判定する。
In step S <b> 703, when the
ステップS703で格納される各ピクセルのオパシティ情報は、図6に示したとおり、0〜4の値であるため、データ量としては1ピクセルあたり3ビットあれば十分である。一般に描画結果を全てRAM103に格納し、再利用する方法が知られているが、この場合には、RGB各8ビットのグラフィックスの場合、1ピクセルあたり24ビットのデータを必要とする。本実施形態では、ステップS705に示した処理、即ちオパシティ情報から各ピクセルの描画色を計算する処理が必要になるものの、キャッシュとしてRAM103に格納するデータは8分の1程度に抑えることができる。また、オブジェクトの色が異なる場合であっても、このオパシティ情報を再利用することが可能である。
Since the opacity information of each pixel stored in step S703 is a value from 0 to 4 as shown in FIG. 6, a data amount of 3 bits per pixel is sufficient. In general, there is known a method of storing all the drawing results in the
なお、本実施形態では、各ピクセルがとり得るオパシティ情報の範囲を0〜4としたが、より高品質なグラフィックスを描画するために、オパシティ情報の範囲を0〜16や0〜64等にしてもよい。また、本実施形態では、図6に示す各ピクセルのオパシティ情報をRAM103に格納する方法を用いたが、図6に示すオパシティ情報のうち、円周(オブジェクトの外郭線)に沿ったピクセルのオパシティ情報のみを格納するようにしてもよい。このようにすることで、メモリ消費量をさらに抑えることができる場合がある。
In this embodiment, the range of opacity information that each pixel can take is set to 0 to 4. However, in order to draw higher-quality graphics, the range of opacity information is set to 0 to 16, 0 to 64, or the like. May be. Further, in this embodiment, the method of storing the opacity information of each pixel shown in FIG. 6 in the
次に、第2の実施形態について説明する。本実施形態に係る情報処理装置の構成も、図1に示す第1の実施形態に係る情報処理装置の構成と同様である。 Next, a second embodiment will be described. The configuration of the information processing apparatus according to the present embodiment is the same as that of the information processing apparatus according to the first embodiment shown in FIG.
図8は、本実施形態に係る情報処理装置が描画するグラフィックスを定義したXML文書を示す図である。このXML文書には、図3に示した円形に加えて、円周部分を幅4ピクセル、不透明度0.5の赤色で塗ることが記述されている。即ち、図8に示すXML文書には、図3に示す円形(第1の部分図形)の外郭線を示す形状情報や第1の部分図形の色情報の他に、第2の部分図形を定義した当該外郭線からの線幅を示す線幅情報や第2の部分図形の色情報が記述されている。なお、SVGにおいては、stroke−opacity属性で示された不透明度は、0〜1の値をとるものであり、0は完全透明、1は完全不透明を意味する。SVGの場合、定義されたオブジェクトのfill属性で示された塗り色は図形の内側を塗る色であり、stroke属性で示された塗り色は図形の外周部分を塗る色である。本実施形態では、図形の内側部分を塗る処理をフィル処理と呼び、図形の外周部分を塗る処理をストローク処理と呼ぶ。 FIG. 8 is a diagram showing an XML document that defines graphics to be drawn by the information processing apparatus according to the present embodiment. This XML document describes that in addition to the circle shown in FIG. 3, the circumferential portion is painted in red with a width of 4 pixels and an opacity of 0.5. That is, the XML document shown in FIG. 8 defines the second partial graphic in addition to the shape information indicating the outline of the circle (first partial graphic) shown in FIG. 3 and the color information of the first partial graphic. The line width information indicating the line width from the contour line and the color information of the second partial figure are described. In SVG, the opacity indicated by the stroke-opacity attribute takes a value of 0 to 1, with 0 being completely transparent and 1 being completely opaque. In the case of SVG, the paint color indicated by the fill attribute of the defined object is a color that paints the inside of the graphic, and the paint color indicated by the stroke attribute is a color that paints the outer periphery of the graphic. In the present embodiment, the process of painting the inner part of the graphic is called fill processing, and the process of painting the outer peripheral part of the graphic is called stroke processing.
図9は、図8に示すグラフィックスのストローク部分の描画範囲を示す図である。図8に示すXML文書によれば、ストロークの幅(線幅情報)は4ピクセルであるから、図9の2つの点線(第1の部分図形901と第2の部分図形902)に挟まれた領域がストローク処理により塗られることになる。以下では、第1の部分図形901の内側の領域をフィル部分と称し、第1の部分図形901と第2の部分図形とに挟まれた領域をストローク部分と称する。 FIG. 9 is a diagram showing a drawing range of the stroke portion of the graphics shown in FIG. According to the XML document shown in FIG. 8, since the stroke width (line width information) is 4 pixels, the stroke is sandwiched between the two dotted lines (first partial graphic 901 and second partial graphic 902) in FIG. The area will be painted by stroke processing. Hereinafter, an area inside the first partial graphic 901 is referred to as a fill part, and an area sandwiched between the first partial graphic 901 and the second partial graphic is referred to as a stroke part.
図10は、図8に示すグラフィックスのストローク部分のみを描画する場合の各ピクセルのオパシティ情報を示す図である。ここで、0は完全透明を意味し、4は完全不透明を意味する。このオパシティ情報は、図4及び図5で説明した方法と同様に、エッジ座標リストを作成することにより算出することができる。図8に示すグラフィックスでは、stroke−opacity属性が0.5となっているが、図10に示すオパシティ情報ではstroke−opacity属性の値は考慮されていない。 FIG. 10 is a diagram showing the opacity information of each pixel when only the stroke portion of the graphics shown in FIG. 8 is drawn. Here, 0 means completely transparent and 4 means completely opaque. This opacity information can be calculated by creating an edge coordinate list in the same manner as the method described with reference to FIGS. In the graphics shown in FIG. 8, the stroke-opacity attribute is 0.5, but the opacity information shown in FIG. 10 does not consider the value of the stroke-opacity attribute.
図11は、第2の実施形態に係る情報処理装置の処理の流れを示すフローチャートである。図11に示すとおり、先ずCPU101は、描画オブジェクトがフィル部分とストローク部分との両方から構成されるか否かを判定する(ステップS1101)。ここで、フィル部分とストローク部分とのうちの何れか一方しかないと判定された場合、以降の処理は図7に示す処理と同様であるため、説明を省略する。
FIG. 11 is a flowchart showing a flow of processing of the information processing apparatus according to the second embodiment. As shown in FIG. 11, the
一方、ステップS1101において、描画オブジェクトがフィル部分とストローク部分との両方から構成されると判定された場合、以降、CPU10は、フィル部分とストローク部分とを別々に処理する。先ずCPU101は、フィル部分に対応した使用可能なオパシティ情報がRAM103に格納されているか否かを判定する(ステップS1102)。ここで、フィル部分に対応した使用可能なオパシティ情報がRAM103に格納されてないと判定された場合、ステップS702及びS703と同様に、CPU101は、フィル部分のエッジ座標リストを作成する(S1103)。次にCPU101は、フィル部分の各ピクセルのオパシティ情報を計算してRAM103に格納する(ステップS1104)。このとき、オパシティ情報はフィル部分の形状情報と関連付けてRAM103に格納される。ステップS1102における、フィル部分に対応した使用可能なオパシティ情報がRAM103に格納されているか否かの判定は、当該形状情報に基づいて行われる。なお、ステップS1104は、第1の算出手段及び第1の格納手段の処理例である。また、ステップS1104においてオパシティ情報が格納されるRAM103の一部記憶領域は、第1の記憶手段の適用例となる構成である。
On the other hand, if it is determined in step S1101 that the drawing object is composed of both the fill part and the stroke part, the CPU 10 processes the fill part and the stroke part separately. First, the
次にCPU101は、RAM103に格納されたオパシティ情報と描画オブジェクトの色情報とからフィル部分の各ピクセルの描画色を計算する(ステップS1105)。次にCPU101は、フィル部分の各ピクセルの描画色を描画バッファに描画する(ステップS1106)。
Next, the
一方、ステップS1102において、フィル部分に対応した使用可能なオパシティ情報がRAM103に格納されていると判定された場合、CPU101は、オパシティ情報と描画オブジェクトの色情報とから各ピクセルの描画色を計算する(ステップS1105)。次にCPU101は、各ピクセルの描画色を描画バッファに描画する(ステップS1106)。
On the other hand, if it is determined in step S1102 that usable opacity information corresponding to the fill portion is stored in the
次にCPU101は、ストローク部分に対応した使用可能なオパシティ情報がRAM103に格納されているか否かを判定する(ステップS1107)。ここで、ストローク部分に対応した使用可能なオパシティ情報がRAM103に格納されてないと判定された場合、CPU101は、ストローク部分のエッジ座標リストを作成する(ステップS1108)。次にCPU101は、ストローク部分の各ピクセルのオパシティ情報を計算してRAM103に格納する(ステップS1109)。このとき、オパシティ情報はフィル部分の形状情報及び線幅情報と関連付けてRAM103に格納される。ステップS1107における、ストローク部分に対応した使用可能なオパシティ情報がRAM103に格納されているか否かの判定は、当該形状情報及び当該線幅情報に基づいて行われる。なお、ステップS1109は、第2の算出手段及び第2の格納手段の処理例である。また、ステップS1109においてオパシティ情報が格納されるRAM103の一部記憶領域は、第2の記憶手段の適用例となる構成である。
Next, the
次にCPU101は、RAM103に格納されたオパシティ情報と描画オブジェクトの描画色とからストローク部分の各ピクセルの描画色を計算する(ステップS1110)。次にCPU101は、ストローク部分の各ピクセルの描画色を描画バッファに描画する(ステップS1111)。
Next, the
一方、ステップS1107において、ストローク部分に対応した使用可能なオパシティ情報がRAM103に格納されていると判定された場合、CPU101は、そのオパシティ情報と描画オブジェクトの色情報とからストローク部分の各ピクセルの描画色を計算する(ステップS1110)。次にCPU101は、ストローク部分の各ピクセルの描画色を描画バッファに描画する(ステップS1111)。
On the other hand, when it is determined in step S1107 that usable opacity information corresponding to the stroke portion is stored in the
なお、ステップS1105及びS1110において各ピクセルの描画色を算出する際には、それぞれfill−opacity属性とstroke−opacity属性の値も考慮する。本実施形態の方法を用いれば、フィル部分とストローク部分との両方が指定された描画オブジェクトに関しても、オパシティ情報をキャッシュし、再利用することが可能となる。また、フィル部分、ストローク部分以外にも複数の描画要素から成る描画オブジェクトに関して、同様の方法を用いて処理を行うことが可能である。 In addition, when calculating the drawing color of each pixel in steps S1105 and S1110, the values of the fill-opacity attribute and the stroke-opacity attribute are also considered. If the method of this embodiment is used, opacity information can be cached and reused for a drawing object in which both a fill part and a stroke part are specified. In addition to the fill part and the stroke part, a drawing object composed of a plurality of drawing elements can be processed using the same method.
以上は、表示部104を有する情報処理装置を例に挙げて説明したが、本発明は、印刷装置、カメラ、複写機、スキャナ、テレビ等、表示部を有するあらゆる装置に適用可能である。また、本発明は、図形に限らず、画像、動画及び文字等のグラフィックスにも適用可能である。
The information processing apparatus having the
以上のように、上述した実施形態によれば、比較的少ないメモリ使用量で元データの色変更にも対応可能な方法で、高速に再描画を行うことが可能となる。 As described above, according to the above-described embodiment, it is possible to perform redrawing at a high speed by a method that can cope with the color change of the original data with a relatively small memory usage.
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。 The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
Claims (9)
前記算出手段により算出された前記第1の図形の不透明度情報を記憶手段に格納する格納手段と、
第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されているか否かを判定する判定手段と、
前記判定手段により前記第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されていると判定された場合、前記第1の図形の不透明度情報に基づいて、前記第2の図形の描画を行う描画手段とを有することを特徴とする情報処理装置。 Calculation means for calculating opacity information indicating the opacity of each pixel constituting the edge portion of the first graphic based on the shape information indicating the shape of the first graphic;
Storage means for storing in the storage means the opacity information of the first graphic calculated by the calculation means;
Determination means for determining whether or not the opacity information of the first graphic that can be used in drawing the second graphic is stored;
When it is determined by the determination means that the opacity information of the first graphic that can be used when drawing the second graphic is stored, based on the opacity information of the first graphic, An information processing apparatus comprising drawing means for drawing the second graphic.
前記第1の算出手段により算出された前記第1の部分図形の不透明度情報を第1の記憶手段に格納する第1の格納手段と、
前記外郭線からの線幅を示す線幅情報に基づいて、前記線幅情報によって定義される第1の図形の他の部分である第2の部分図形のエッジ部分を構成する各ピクセルの不透明度を示す不透明度情報を算出する第2の算出手段と、
前記第2の算出手段により算出された前記第2の部分図形の不透明度情報を第2の記憶手段に格納する第2の格納手段と、
前記第1の部分図形の不透明度情報及び前記第2の部分図形の不透明度情報のうちの少なくとも何れか一方について、第2の図形の描画の際に使用可能な不透明度情報が格納されているか否かを判定する判定手段と、
前記判定手段により前記第2の図形の描画の際に使用可能な不透明度情報が格納されていると判定された場合、格納されている前記第1の部分図形の不透明度情報及び前記第2の部分図形の不透明度情報のうちの少なくとも何れか一方に基づいて、前記第2の図形の描画を行う描画手段とを有することを特徴とする情報処理装置。 Opacity information indicating the opacity of each pixel constituting the edge portion of the first partial graphic is calculated based on the shape information defining the outline of the first partial graphic that is a part of the first graphic. First calculating means;
First storage means for storing opacity information of the first partial graphic calculated by the first calculation means in a first storage means;
Based on the line width information indicating the line width from the outline line, the opacity of each pixel constituting the edge part of the second partial graphic that is the other part of the first graphic defined by the line width information Second calculating means for calculating opacity information indicating
Second storage means for storing the opacity information of the second partial graphic calculated by the second calculation means in a second storage means;
Whether at least one of the opacity information of the first partial graphic and the opacity information of the second partial graphic is stored as opacity information that can be used when drawing the second graphic Determining means for determining whether or not;
When it is determined by the determining means that opacity information that can be used when drawing the second graphic is stored, the stored opacity information of the first partial graphic and the second graphic An information processing apparatus comprising: a drawing unit that draws the second graphic based on at least one of the opacity information of the partial graphic.
第1の図形の形状を示す形状情報に基づいて、前記第1の図形のエッジ部分を構成する各ピクセルの不透明度を示す不透明度情報を算出する算出ステップと、
前記算出ステップにより算出された前記第1の図形の不透明度情報を記憶手段に格納する格納ステップと、
第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されているか否かを判定する判定ステップと、
前記判定ステップにより前記第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されていると判定された場合、前記第1の図形の不透明度情報に基づいて、前記第2の図形の描画を行う描画ステップとを含むことを特徴とする情報処理方法。 An information processing method executed by an information processing apparatus,
A calculation step of calculating opacity information indicating the opacity of each pixel constituting the edge portion of the first graphic based on the shape information indicating the shape of the first graphic;
A storage step of storing in the storage means the opacity information of the first graphic calculated by the calculation step;
A determination step of determining whether opacity information of the first graphic that can be used when drawing the second graphic is stored;
When it is determined in the determination step that the opacity information of the first graphic that can be used when drawing the second graphic is stored, based on the opacity information of the first graphic, A drawing step of drawing the second graphic.
第1の図形の一部分である第1の部分図形の外郭線を定義した形状情報に基づいて、前記第1の部分図形のエッジ部分を構成する各ピクセルの不透明度を示す不透明度情報を算出する第1の算出ステップと、
前記第1の算出ステップにより算出された前記第1の部分図形の不透明度情報を第1の記憶手段に格納する第1の格納ステップと、
前記外郭線からの線幅を示す線幅情報に基づいて、前記線幅情報によって定義される第1の図形の他の部分である第2の部分図形のエッジ部分を構成する各ピクセルの不透明度を示す不透明度情報を算出する第2の算出ステップと、
前記第2の算出ステップにより算出された前記第2の部分図形の不透明度情報を第2の記憶手段に格納する第2の格納ステップと、
前記第1の部分図形の不透明度情報及び前記第2の部分図形の不透明度情報のうちの少なくとも何れか一方について、第2の図形の描画の際に使用可能な不透明度情報が格納されているか否かを判定する判定ステップと、
前記判定ステップにより前記第2の図形の描画の際に使用可能な不透明度情報が格納されていると判定された場合、格納されている前記第1の部分図形の不透明度情報及び前記第2の部分図形の不透明度情報のうちの少なくとも何れか一方に基づいて、前記第2の図形の描画を行う描画ステップとを含むことを特徴とする情報処理方法。 An information processing method executed by an information processing apparatus,
Opacity information indicating the opacity of each pixel constituting the edge portion of the first partial graphic is calculated based on the shape information defining the outline of the first partial graphic that is a part of the first graphic. A first calculation step;
A first storage step of storing in the first storage means the opacity information of the first partial graphic calculated by the first calculation step;
Based on the line width information indicating the line width from the outline line, the opacity of each pixel constituting the edge part of the second partial graphic that is the other part of the first graphic defined by the line width information A second calculation step of calculating opacity information indicating
A second storage step of storing the opacity information of the second partial graphic calculated in the second calculation step in a second storage means;
Whether at least one of the opacity information of the first partial graphic and the opacity information of the second partial graphic is stored as opacity information that can be used when drawing the second graphic A determination step for determining whether or not;
If it is determined in the determination step that opacity information that can be used in drawing the second graphic is stored, the stored opacity information of the first partial graphic and the second graphic And a drawing step of drawing the second graphic based on at least one of the opacity information of the partial graphic.
前記算出ステップにより算出された前記第1の図形の不透明度情報を記憶手段に格納する格納ステップと、
第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されているか否かを判定する判定ステップと、
前記判定ステップにより前記第2の図形の描画の際に使用可能な前記第1の図形の不透明度情報が格納されていると判定された場合、前記第1の図形の不透明度情報に基づいて、前記第2の図形の描画を行う描画ステップとをコンピュータに実行させるためのプログラム。 A calculation step of calculating opacity information indicating the opacity of each pixel constituting the edge portion of the first graphic based on the shape information indicating the shape of the first graphic;
A storage step of storing in the storage means the opacity information of the first graphic calculated by the calculation step;
A determination step of determining whether opacity information of the first graphic that can be used when drawing the second graphic is stored;
When it is determined in the determination step that the opacity information of the first graphic that can be used when drawing the second graphic is stored, based on the opacity information of the first graphic, A program for causing a computer to execute a drawing step for drawing the second graphic.
前記第1の算出ステップにより算出された前記第1の部分図形の不透明度情報を第1の記憶手段に格納する第1の格納ステップと、
前記外郭線からの線幅を示す線幅情報に基づいて、前記線幅情報によって定義される第1の図形の他の部分である第2の部分図形のエッジ部分を構成する各ピクセルの不透明度を示す不透明度情報を算出する第2の算出ステップと、
前記第2の算出ステップにより算出された前記第2の部分図形の不透明度情報を第2の記憶手段に格納する第2の格納ステップと、
前記第1の部分図形の不透明度情報及び前記第2の部分図形の不透明度情報のうちの少なくとも何れか一方について、第2の図形の描画の際に使用可能な不透明度情報が格納されているか否かを判定する判定ステップと、
前記判定ステップにより前記第2の図形の描画の際に使用可能な不透明度情報が格納されていると判定された場合、格納されている前記第1の部分図形の不透明度情報及び前記第2の部分図形の不透明度情報のうちの少なくとも何れか一方に基づいて、前記第2の図形の描画を行う描画ステップとをコンピュータに実行させるためのプログラム。 Opacity information indicating the opacity of each pixel constituting the edge portion of the first partial graphic is calculated based on the shape information defining the outline of the first partial graphic that is a part of the first graphic. A first calculation step;
A first storage step of storing in the first storage means the opacity information of the first partial graphic calculated by the first calculation step;
Based on the line width information indicating the line width from the outline line, the opacity of each pixel constituting the edge part of the second partial graphic that is the other part of the first graphic defined by the line width information A second calculation step of calculating opacity information indicating
A second storage step of storing the opacity information of the second partial graphic calculated in the second calculation step in a second storage means;
Whether at least one of the opacity information of the first partial graphic and the opacity information of the second partial graphic is stored as opacity information that can be used when drawing the second graphic A determination step for determining whether or not;
If it is determined in the determination step that opacity information that can be used in drawing the second graphic is stored, the stored opacity information of the first partial graphic and the second graphic A program for causing a computer to execute a drawing step of drawing the second graphic based on at least one of the opacity information of the partial graphic.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010278404A JP2012128580A (en) | 2010-12-14 | 2010-12-14 | Information processing unit, information processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010278404A JP2012128580A (en) | 2010-12-14 | 2010-12-14 | Information processing unit, information processing method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012128580A true JP2012128580A (en) | 2012-07-05 |
Family
ID=46645545
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010278404A Pending JP2012128580A (en) | 2010-12-14 | 2010-12-14 | Information processing unit, information processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2012128580A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015087809A (en) * | 2013-10-28 | 2015-05-07 | キヤノン株式会社 | Plotting device, method, and program |
-
2010
- 2010-12-14 JP JP2010278404A patent/JP2012128580A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015087809A (en) * | 2013-10-28 | 2015-05-07 | キヤノン株式会社 | Plotting device, method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1840837A2 (en) | Graphics-rendering apparatus | |
US20100283780A1 (en) | Information processing apparatus, information processing method, and storage medium | |
US20150287220A1 (en) | Rendering text using anti-aliasing techniques, cached coverage values, and/or reuse of font color values | |
US20160343155A1 (en) | Dynamic filling of shapes for graphical display of data | |
EP2766874B1 (en) | Caching coverage values for rendering text using anti-aliasing techniques | |
JP4370438B2 (en) | Vector image drawing apparatus, vector image drawing method and program | |
JP5067501B2 (en) | Multicolor vector image processing apparatus and method | |
JP6298422B2 (en) | Character string processing technology for graphic display of man-machine interface | |
CN107038729B (en) | Digital instrument panel drawing method based on OpenGL-ES | |
US9064340B2 (en) | Drawing apparatus, drawing method, and drawing program | |
JP3547250B2 (en) | Drawing method | |
WO2010089805A1 (en) | Graphical user interface device and method for realizing graphical user interface | |
JP2012108825A (en) | Information processing device, information processing method and program | |
JP2012128580A (en) | Information processing unit, information processing method and program | |
JP2010055374A (en) | Data creating device, data creating method, data creating program, drawing device, drawing method, drawing program, and computer readable recording medium | |
JP3872056B2 (en) | Drawing method | |
US20120154429A1 (en) | Apparatus and method for smoothed aliasing on a two-dimensional plane | |
JP2018019212A (en) | Information processing apparatus, drawing processing method, and computer program | |
JP2012133765A (en) | Image processing device and image processing method | |
JP2001266138A (en) | Picture conversion processor, picture conversion processing method and information recording medium | |
JP5207989B2 (en) | Graphic drawing apparatus and graphic drawing program | |
JP6478888B2 (en) | Graphic drawing apparatus and graphic drawing program | |
KR101666131B1 (en) | Vector Font Rendering with considering sub-pixel pattern | |
JPH0822548A (en) | Method and device for graphic processing | |
JP2016196290A (en) | Avionics display system |