WO2009107168A1 - Character plotting device - Google Patents

Character plotting device Download PDF

Info

Publication number
WO2009107168A1
WO2009107168A1 PCT/JP2008/000385 JP2008000385W WO2009107168A1 WO 2009107168 A1 WO2009107168 A1 WO 2009107168A1 JP 2008000385 W JP2008000385 W JP 2008000385W WO 2009107168 A1 WO2009107168 A1 WO 2009107168A1
Authority
WO
WIPO (PCT)
Prior art keywords
contour
buffer
pixel
character
information
Prior art date
Application number
PCT/JP2008/000385
Other languages
French (fr)
Japanese (ja)
Inventor
鳥居晃
加藤義幸
根岸博康
石田良平
濱田雅樹
木皿大介
Original Assignee
三菱電機株式会社
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 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2008/000385 priority Critical patent/WO2009107168A1/en
Publication of WO2009107168A1 publication Critical patent/WO2009107168A1/en

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/22Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of characters or indicia using display control signals derived from coded signals representing the characters or indicia, e.g. with a character-code memory
    • G09G5/24Generation of individual character patterns
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/22Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of characters or indicia using display control signals derived from coded signals representing the characters or indicia, e.g. with a character-code memory
    • G09G5/24Generation of individual character patterns
    • G09G5/28Generation of individual character patterns for enhancement of character form, e.g. smoothing
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/02Improving the quality of display appearance
    • G09G2320/0252Improving the response speed

Definitions

  • the present invention relates to a character drawing apparatus for drawing an outline font.
  • the outline font has a feature in which the outline of the character is defined by a mathematical expression and can be easily deformed such as enlarging, reducing, and rotating.
  • a display device such as an LCD
  • the outline is drawn according to the formula of the outline. Processing to fill the contour is required.
  • processing is normally performed by software processing by the CPU. However, when the performance of the CPU is low in an embedded device or the like, a long processing time may be required.
  • the present invention has been made to solve the above-described problems, and an object thereof is to obtain a character drawing apparatus capable of realizing high-speed drawing with a small hardware scale.
  • the control unit divides the character into a plurality of regions.
  • an instruction for generating contour information for each divided region is output to the contour information generating means.
  • FIG. 10 is an explanatory diagram illustrating processing contents in a region (1) of the contour drawing unit 3; It is explanatory drawing which shows an example of the outline buffer 4, the flag buffer 5, and the auxiliary
  • FIG. It is explanatory drawing which shows an example of the outline buffer 4, the flag buffer 5, and the auxiliary
  • FIG. 1 is a block diagram showing a character drawing apparatus according to Embodiment 1 of the present invention.
  • the coordinate conversion unit 1 constitutes coordinate conversion means.
  • the input buffer 2 is a memory that stores vector data whose coordinates are converted by the coordinate conversion unit 1.
  • the contour drawing unit 3 reads out the straight lines and the vertices of the curve from the vector data after the coordinate conversion stored in the input buffer 2 and divides the curve into minute straight lines and configures the contour. Rasterization processing is performed on the straight lines and the minute straight lines, and processing for generating contour information indicating coordinates corresponding to the contour of the character is performed.
  • the contour drawing unit 3 constitutes contour information generating means.
  • the contour buffer 4 is composed of a double buffer, and stores the contour information generated by the contour drawing unit 3.
  • the flag buffer 5 is composed of a double buffer, and holds a flag indicating whether or not the contour information stored in the contour buffer 4 is valid contour information.
  • the auxiliary buffer 6 is a memory that holds contour information for one vertical column.
  • the pixel generation unit 7 refers to the flag held in the flag buffer 5, reads only valid contour information from the contour buffer 4, generates a pixel to be drawn according to the contour information, and stores the pixel in the frame buffer 9. Execute the process of writing to.
  • the pixel generation unit 7 constitutes a pixel generation unit.
  • the control unit 8 When the vector data for one character is stored in the input buffer 2, the control unit 8 outputs a processing start command to the contour drawing unit 3, and the contour information generated by the contour drawing unit 3 is large in character size. If the data size exceeds the memory size of the contour buffer 4, the character is divided into a plurality of regions, and an instruction to generate contour information for each divided region is output to the contour drawing unit 3.
  • the control unit 8 constitutes a control means.
  • the frame buffer 9 is a memory that holds an image of a drawing result.
  • the input buffer 2 is empty, and the contour buffer 4, the flag buffer 5, and the auxiliary buffer 16 are initialized with the initial value “0”.
  • the character drawing device When the character drawing device draws a character, an attribute indicating the color of the character is designated, and vector data constituting the outline of the character is input.
  • the character drawing device may read the vector data stored in the external memory.
  • the vector data is data that defines a contour by the vertices and control points of straight lines and curves as shown in FIG. In the following description, it is assumed that the origin of the XY coordinates exists at the upper left.
  • the coordinate conversion unit 1 uses a preset conversion matrix (conversion matrix for performing character enlargement / reduction, rotation, translation, etc.), and The coordinates are converted into coordinates on the frame buffer 9.
  • the coordinate conversion unit 1 converts the coordinates of the vector data into the coordinates on the frame buffer 9
  • the coordinate conversion unit 1 stores the vector data after the coordinate conversion in the input buffer 2.
  • the coordinate conversion unit 1 notifies the control unit 8 to that effect.
  • FIG. 4 is an explanatory diagram showing processing contents in the region (1) of the contour drawing unit 3.
  • the contour drawing unit 3 determines whether or not a straight line or a curve constituting the contour of the character is completely outside the contour buffer 4.
  • the contour drawing unit 3 discards the straight lines and curves located outside the contour buffer 4 as shown in FIG. That is, the straight lines and curves located in the areas (2) to (4) other than the area (1) are discarded. However, the vertices of the straight lines / curves in the regions (2) to (4) connected to the vertices of the straight lines / curves in the region (1) are left without being discarded.
  • the contour drawing unit 3 performs a process of dividing the curve constituting the contour of the character into minute straight lines. Since the process of dividing a curve into minute lines is a known technique, a detailed description thereof will be omitted, but a method of dividing a curve into a plurality of minute lines by dividing the curve by the number of divisions according to the curvature of the curve. Can be considered.
  • the contour drawing unit 3 determines whether or not a plurality of minute straight lines divided from the curve are completely outside the contour buffer 4.
  • the contour drawing unit 3 discards a minute straight line located outside the contour buffer 4 as shown in FIG. That is, the minute straight lines located in the areas (2) to (4) other than the area (1) are discarded. However, the vertices of the minute lines in the regions (2) to (4) connected to the vertices of the minute lines in the region (1) are left without being discarded.
  • the contour drawing unit 3 performs rasterization processing on the straight lines and minute straight lines constituting the contour, and generates contour information indicating coordinates corresponding to the contour of the character. That is, the contour drawing unit 3 performs rasterization processing on the straight lines and minute lines constituting the contour, obtains the intersection of the scan line, the straight line, and the minute line, and writes the value in the portion of the contour buffer 4 corresponding to the intersection. Process.
  • FIG. 5A shows an example of the auxiliary buffer 6 at the time when the contour information generation process for the region (1) is completed
  • FIG. 5B shows the contour information generation processing for the region (1)
  • An example of the contour buffer 4 at the time is shown
  • FIG. 5C shows an example of the flag buffer 5 at the time when the generation processing of the contour information of the region (1) is completed.
  • the contour buffer 4 has a capacity of 16 ⁇ 16 pixels.
  • the flag buffer 5 is assumed to be composed of 1 bit per 2 pixels in the horizontal direction.
  • FIG. 6 is a flowchart showing the processing contents of the pixel generation unit 7 (one pixel generation process in the scan line direction).
  • the pixel generation unit 7 reads all the flags held in one line of the flag buffer 5 corresponding to the current Y coordinate (step ST2).
  • one line of the flag buffer 5 is 8 bits, and each flag is 1 bit. Accordingly, since the flag held in one line is 8 bits and the number of bits is small, it is easy to read all the flags held in one line at a time.
  • the pixel generation unit 7 detects a flag whose value is “1” (a flag indicating that it is valid contour information) from the read flags for one line, and corresponds to the flag.
  • a process of sequentially reading values (valid contour information) in the contour buffer 4 from the left side is performed (step ST3).
  • the leftmost flag of the flag buffer 5 is “1”, and the coordinates of the contour buffer 4 corresponding to the flag are (0, 0) and (1, 0).
  • the values of coordinates (0, 0) and (1, 0) are read out.
  • the pixel generation unit 7 determines whether or not the process of reading valid contour information from the contour buffer 4 is finished (step ST8). Here, since the reading is not completed, the coordinates (1, 0) which is the next position of the contour buffer 4 is read (step ST3).
  • step ST9 the pixel generation unit 7 again determines whether or not the number of intersections W with the current contour is other than “0” (step ST9).
  • W 0, it is determined that the number of intersections W with the current contour is not “0”, and the process proceeds to the process of step ST11 without proceeding to the process of step ST10 for generating a pixel.
  • step ST11 the pixel generation unit 7 writes the value W of “0” in the position corresponding to the current Y coordinate of the auxiliary buffer 6, and ends the pixel generation processing for each scan line (step ST11).
  • the contour drawing unit 3 and the pixel generation unit 7 perform the above-described processing by pipeline processing, and finish the operation when all the pixels that need to be drawn are drawn in the frame buffer 9.
  • FIG. 7A shows an example of the pixel generation result of the region (1)
  • FIG. 7B shows an example of the auxiliary buffer 6 at the time when the pixel generation processing of the region (1) is completed.
  • FIG. 8 is an explanatory diagram showing the processing contents in the region (2) of the contour drawing unit 3.
  • the contour drawing unit 3 When the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (2) from the control unit 8, the contour drawing unit 3 reads the vector data after coordinate conversion stored in the input buffer 2 and reads the region (1). In order to associate the coordinates (Xmin + 16, Ymin) on the right with the origin (0, 0) of the contour buffer 4, as shown in FIG. A process of subtracting the value Xmin + 16 of the right adjacent coordinate is performed, and a process of subtracting the minimum value Ymin of the Y coordinate from the Y coordinate value of the vector data is performed.
  • FIG. 9A shows an example of the auxiliary buffer 6 at the time when the contour information generation processing for the region (2) is completed
  • FIG. 9B shows the contour information generation processing for the region (2) completed.
  • An example of the contour buffer 4 at the time is shown
  • FIG. 9C shows an example of the flag buffer 5 at the time when the processing for generating the contour information of the region (2) is completed.
  • the processing content in the area (2) of the pixel generation unit 7 is to add the value of Xmin + 16 to the value of the X coordinate of the pixel in order to make the origin of the contour buffer 4 correspond to the coordinates (Xmin + 16, Ymin) on the frame buffer, Except for adding the value of Ymin to the value of the Y coordinate, it is the same as the processing content in the area (1), and therefore detailed description thereof is omitted.
  • the auxiliary buffer 6 when the pixel generation unit 7 starts processing stores the value of the number of times of intersection with the contour of the rightmost pixel in the region (1). Therefore, by using this value as an initial value, it is possible to accurately generate a pixel without causing pixel omission between the regions (1) and (2).
  • control is performed so that a pixel having an X coordinate of “ ⁇ 1” is not generated.
  • FIG. 10A shows an example of the pixel generation result of the region (2)
  • FIG. 10B shows an example of the auxiliary buffer 6 at the time when the pixel generation processing of the region (2) is completed. Since there are no pixels to be drawn on the right side of the area (2), the values of the auxiliary buffer 6 are all “0”.
  • the control unit 8 instructs the contour drawing unit 3 to start processing for generating the contour information of the region (3).
  • the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (3) from the control unit 8, the contour drawing unit 3 reads the characters in the region (3) from the vector data after coordinate conversion stored in the input buffer 2. The contour information indicating the coordinates corresponding to the contour is generated.
  • the processing content in the region (3) of the contour drawing unit 3 is that the X coordinate / Y coordinate (Xmin, Ymin + 16) of the vector data is associated with the origin (0, 0) of the contour buffer 4 so as to correspond to the X coordinate of the vector data. Except for subtracting the value of Xmin from the value of Y and subtracting the value of Ymin + 16 from the value of the Y coordinate of the vector data, the description is omitted because it is the same as the processing content in the region (1).
  • the control unit 8 instructs the pixel generation unit 7 to start processing for generating pixels according to the contour information of the region (3).
  • the pixel generation unit 7 refers to the flag held in the flag buffer 5 and reads only valid contour information from the contour buffer 4. Then, a pixel to be rendered is generated and a process of writing the pixel to the frame buffer 9 is performed.
  • the processing content in the region (3) of the pixel generation unit 7 is to add the value of Xmin to the X coordinate value of the pixel in order to make the origin of the contour buffer 4 correspond to the coordinates (Xmin, Ymin + 16) on the frame buffer, Except for adding the value of Ymin + 16 to the value of the Y coordinate, it is the same as the processing content in the area (1), and therefore detailed description thereof is omitted.
  • the control unit 8 instructs the contour drawing unit 3 to start processing for generating the contour information of the region (4).
  • the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (4) from the control unit 8, the contour drawing unit 3 reads the characters in the region (4) from the vector data after coordinate conversion stored in the input buffer 2. The contour information indicating the coordinates corresponding to the contour is generated.
  • the processing content in the region (4) of the pixel generation unit 7 is to add the value of Xmin + 16 to the X coordinate value of the pixel in order to make the origin of the contour buffer 4 correspond to the coordinates (Xmin + 16, Ymin + 16) on the frame buffer, Except for adding the value of Ymin + 16 to the value of the Y coordinate, it is the same as the processing content in the area (1), and therefore detailed description thereof is omitted.
  • control unit 8 determines that all the drawing in the character bounding box has been completed, and that the drawing of the character has been completed.
  • the stored vector data is discarded and the operation is terminated.
  • the contour drawing unit 3 and the pixel generation unit 7 are alternately operated.
  • the control unit 8 operates the contour drawing unit 3 and the pixel generation unit 7 in parallel so that the contour drawing unit 3 performs the processing of the region (2). You may do it.
  • the control unit 8 Since the character is divided into a plurality of regions and an instruction to generate contour information for each divided region is output to the contour drawing unit 3, the effect of realizing high-speed drawing with a small hardware scale is achieved. Play.
  • the contour buffer 4 since the contour buffer 4 is built in, the number of accesses to the external memory can be reduced and the operation can be performed faster than when the contour buffer 4 is placed in the external memory. can do. Further, since the built-in contour buffer 4 requires only a small memory, the hardware scale can be reduced, and even when drawing a large character, the contour buffer 4 is shifted several times while shifting the coordinates in units of the size of the contour buffer 4. This can be done by drawing.
  • the contour buffer 4 is configured as a double buffer, and the control unit 8 performs the contour information generation processing by the contour drawing unit 3 and the pixel generation processing by the pixel generation unit 7 in parallel. Since it is configured to execute, there is an effect that high-speed drawing can be realized.
  • the auxiliary buffer 6 that holds the vertical-line outline information is provided, and when the outline drawing unit 3 generates the outline information for each divided region, the pixel generation unit 7 holds the auxiliary information in the auxiliary buffer 6. Since the pixel to be drawn is generated with reference to the vertical outline information that is displayed, the pixel is accurately generated without causing the occurrence of missing pixels between adjacent regions. There is an effect that can be.
  • the flag buffer 5 that holds a flag indicating whether or not the contour information stored in the contour buffer 4 is valid contour information is provided, and the pixel generation unit 7 generates a pixel.
  • the flag stored in the flag buffer 5 is referred to so that only valid contour information is read from the contour buffer 4, so that it is not necessary to read invalid contour information that does not need to be read. There is an effect that the operation can be speeded up.
  • the configuration is such that the contour buffer 4 and the flag buffer 5 are initialized immediately after reading from the contour buffer 4 and the flag buffer 5, so that the initialization time is concealed, There is an effect that the operation can be speeded up.
  • FIG. 11 is a block diagram showing a character drawing apparatus according to Embodiment 2 of the present invention.
  • the contour drawing unit 11 performs the same processing as that of the contour drawing unit 3 in FIG. 1, and when generating contour information, obtains the pixel density from the distance between the pixel and the contour of the pixels near the contour, and the density of the pixel Is stored in the density buffer 12.
  • the contour drawing unit 11 constitutes contour information generating means.
  • the density buffer 12 is a memory that stores the density of pixels.
  • the pixel generation unit 13 performs the same processing as that of the pixel generation unit 7 of FIG. 1, and also calculates a density value for each pixel from the contour information stored in the contour buffer 4 and the pixel density stored in the density buffer 12. The process which asks for is implemented.
  • the pixel generation unit 13 constitutes a pixel generation unit.
  • the pixel calculation unit 14 performs blend processing with the frame buffer 9 based on the density value for each pixel obtained by the pixel generation unit 13.
  • the pixel calculation unit 14 constitutes a pixel calculation means.
  • FIG. 12 is an explanatory diagram showing the contents of the contour buffer 4, the density buffer 12, and the flag buffer 5 when the character area (2) is processed.
  • the contour drawing unit 11 generates contour information in the same manner as the contour drawing unit 3 in FIG. 1, and stores the contour information in the contour buffer 4. Further, as shown in FIG. 12B, the contour drawing unit 11 calculates the density of the pixel near the contour from the distance between the pixel and the contour, and calculates the density of the pixel. Stored in the density buffer 12. For example, if the distance between the pixel and the outline is “0”, the density of the pixel is set to “0.5”. The longer the distance between the pixel and the outline, the lower the density of the pixel is less than “0.5”. Set to value. If the distance between the pixel and the contour is longer than “0.5”, the density of the pixel is set to “0”. At this time, in the flag buffer 5, as shown in FIG. 12C, a flag corresponding to writing valid data in at least one of the contour buffer 4 and the density buffer 12 is set to “1”. .
  • the pixel generation unit 13 generates a pixel to be rendered in the same manner as the pixel generation unit 7 in FIG. 1, and also uses the contour information stored in the contour buffer 4 and the pixel density stored in the density buffer 12.
  • the density value for each pixel is calculated. For example, if the contour information stored in the contour buffer 4 is valid contour information, the density value of the pixel is obtained by subtracting the pixel density stored in the density buffer 12 from “1.0”. Set. On the other hand, if the contour information stored in the contour buffer 4 is invalid contour information, the density value of the pixel is set to the value stored in the density buffer 12.
  • the pixel calculation unit 14 performs a known blend process with the frame buffer 9 from the density value for each pixel calculated by the pixel generation unit 13, so that the frame buffer 9 Write pixel to.
  • the pixel calculation unit 14 is configured to perform blend processing with the frame buffer 9 from the density value for each pixel obtained by the pixel generation unit 13. As a result, it is possible to draw an anti-aliased outline font at high speed.
  • the character drawing device is suitable for a device that needs to draw an outline font at high speed.

Abstract

When a character size is large and a contour information data size generated by a contour plotting unit (3) exceeds a memory size of a contour buffer (4), a control unit (8) outputs to the contour plotting unit (3), an instruction to divide the character into a plurality of regions and generate contour information for each of the divided regions. Thus, it is possible to realize a high-speed plotting with a small hardware size.

Description

文字描画装置Character drawing device
 この発明は、アウトラインフォントの描画を行う文字描画装置に関するものである。 The present invention relates to a character drawing apparatus for drawing an outline font.
 アウトラインフォントは文字の輪郭が数式で定義されており、拡大・縮小・回転等の変形を容易に行うことができる特徴がある。
 アウトラインフォントをLCD等の表示デバイスに表示する場合には、ラスタデータに変換する必要があり、座標変換を実施して所望の大きさに変換した後、輪郭の数式にしたがって輪郭を描画し、その輪郭の中を塗り潰す処理が必要となる。
 このような処理は、通常CPUによるソフトウェア処理で行われるが、組み込み機器等でCPUの性能が低い場合には、多くの処理時間を要することがある。
The outline font has a feature in which the outline of the character is defined by a mathematical expression and can be easily deformed such as enlarging, reducing, and rotating.
When the outline font is displayed on a display device such as an LCD, it is necessary to convert it to raster data. After performing coordinate conversion and converting to a desired size, the outline is drawn according to the formula of the outline. Processing to fill the contour is required.
Such processing is normally performed by software processing by the CPU. However, when the performance of the CPU is low in an embedded device or the like, a long processing time may be required.
 そこで、ハードウェアによって文字描画を高速化させる文字描画装置が提案されている(例えば、特許文献1を参照)。
 ただし、この文字描画装置では、文字の全ての輪郭情報を輪郭描画メモリに書き込んだ後に塗り潰し処理を行うため、文字の大きさに相当する輪郭描画メモリが必要となる。そのため、大きな文字に対応する場合には、大容量の輪郭描画メモリが必要になる。
 なお、輪郭描画メモリを外付けにすれば、大きな文字にも対応することができるが、外部メモリへのアクセスが頻繁に発生するため、描画速度が遅くなることが考えられる。
Therefore, a character drawing apparatus that speeds up character drawing by hardware has been proposed (see, for example, Patent Document 1).
However, in this character drawing apparatus, since all the outline information of the character is written in the outline drawing memory and then the filling process is performed, an outline drawing memory corresponding to the size of the character is required. Therefore, when dealing with large characters, a large-capacity contour drawing memory is required.
If the contour drawing memory is externally attached, it is possible to deal with large characters, but since the external memory is frequently accessed, the drawing speed may be reduced.
特開平4-199094号公報(第2図)Japanese Patent Laid-Open No. 4-199094 (FIG. 2)
 従来の文字描画装置は以上のように構成されているので、文字の大きさに相当する輪郭描画メモリが必要となり、大きな文字に対応する場合には、大容量の輪郭描画メモリが必要になる課題があった。
 輪郭描画メモリを外付けにすれば、大きな文字にも対応することができるが、外部メモリへのアクセスが頻繁に発生するため、描画速度が遅くなる課題があった。
Since the conventional character drawing apparatus is configured as described above, a contour drawing memory corresponding to the size of the character is required, and a large-capacity contour drawing memory is required when dealing with large characters. was there.
If the contour drawing memory is externally attached, it is possible to deal with large characters, but since the external memory is frequently accessed, there is a problem that the drawing speed becomes slow.
 この発明は上記のような課題を解決するためになされたもので、小さいハードウェア規模で高速描画を実現することができる文字描画装置を得ることを目的とする。 The present invention has been made to solve the above-described problems, and an object thereof is to obtain a character drawing apparatus capable of realizing high-speed drawing with a small hardware scale.
 この発明に係る文字描画装置は、文字のサイズが大きく、輪郭情報生成手段により生成される輪郭情報のデータサイズが輪郭バッファのメモリサイズを上回る場合、制御手段が、文字を複数の領域に分割して、分割領域毎に輪郭情報を生成する指示を輪郭情報生成手段に出力するようにしたものである。 In the character drawing device according to the present invention, when the size of the character is large and the data size of the contour information generated by the contour information generating unit exceeds the memory size of the contour buffer, the control unit divides the character into a plurality of regions. Thus, an instruction for generating contour information for each divided region is output to the contour information generating means.
 このことによって、小さいハードウェア規模で高速描画を実現することができる効果がある。 This has the effect of realizing high-speed drawing with a small hardware scale.
この発明の実施の形態1による文字描画装置を示す構成図である。It is a block diagram which shows the character drawing apparatus by Embodiment 1 of this invention. 文字の輪郭を構成するベクターデータのデータ構成を示す説明図である。It is explanatory drawing which shows the data structure of the vector data which comprises the outline of a character. 文字と輪郭バッファ4の関係を示す説明図である。It is explanatory drawing which shows the relationship between a character and the outline buffer. 輪郭描画部3の領域(1)における処理内容を示す説明図である。FIG. 10 is an explanatory diagram illustrating processing contents in a region (1) of the contour drawing unit 3; 領域(1)の輪郭情報の生成処理が終了した時点の輪郭バッファ4、フラグバッファ5及び補助バッファ6の一例を示す説明図である。It is explanatory drawing which shows an example of the outline buffer 4, the flag buffer 5, and the auxiliary | assistant buffer 6 at the time of finishing the production | generation process of the outline information of area | region (1). ピクセル生成部7の処理内容(1回のスキャンライン方向へのピクセル生成処理)を示すフローチャートである。It is a flowchart which shows the processing content (Pixel generation process in one scan line direction) of the pixel generation part. 領域(1)のピクセル生成結果と、領域(1)のピクセルの生成処理が終了した時点の補助バッファ6の一例を示す説明図である。It is explanatory drawing which shows an example of the auxiliary | assistant buffer 6 at the time of the pixel production | generation result of an area | region (1), and the production | generation process of the pixel of an area | region (1) having been complete | finished. 輪郭描画部3の領域(2)における処理内容を示す説明図である。It is explanatory drawing which shows the processing content in the area | region (2) of the outline drawing part 3. FIG. 領域(2)の輪郭情報の生成処理が終了した時点の輪郭バッファ4、フラグバッファ5及び補助バッファ6の一例を示す説明図である。It is explanatory drawing which shows an example of the outline buffer 4, the flag buffer 5, and the auxiliary | assistant buffer 6 at the time of complete | finishing the production | generation process of the outline information of area | region (2). 領域(2)のピクセル生成結果と、領域(2)のピクセルの生成処理が終了した時点の補助バッファ6の一例を示す説明図である。It is explanatory drawing which shows an example of the auxiliary | assistant buffer 6 at the time of the pixel production | generation result of an area | region (2), and the production | generation process of the pixel of an area | region (2) having been complete | finished. この発明の実施の形態2による文字描画装置を示す構成図である。It is a block diagram which shows the character drawing apparatus by Embodiment 2 of this invention. 文字の領域(2)の処理を行う際の輪郭バッファ4、濃度バッファ12及びフラグバッファ5の内容を示す説明図である。It is explanatory drawing which shows the content of the outline buffer 4, the density | concentration buffer 12, and the flag buffer 5 at the time of processing of the area | region (2) of a character.
 以下、この発明をより詳細に説明するために、この発明を実施するための最良の形態について、添付の図面に従って説明する。
実施の形態1.
 図1はこの発明の実施の形態1による文字描画装置を示す構成図であり、図において、座標変換部1は文字の輪郭を構成するベクターデータを入力し、そのベクターデータの座標をフレームバッファ9上の座標に変換する処理を実施する。なお、座標変換部1は座標変換手段を構成している。
Hereinafter, in order to describe the present invention in more detail, the best mode for carrying out the present invention will be described with reference to the accompanying drawings.
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a character drawing apparatus according to Embodiment 1 of the present invention. In FIG. Perform the process of converting to the upper coordinates. The coordinate conversion unit 1 constitutes coordinate conversion means.
 入力バッファ2は座標変換部1により座標が変換されたベクターデータを格納するメモリである。
 輪郭描画部3は入力バッファ2に格納されている座標変換後のベクターデータから文字の輪郭を構成する直線及び曲線の頂点を読み出して、その曲線を微小直線に分割するとともに、その輪郭を構成する直線及び上記微小直線に対するラスタライズ処理を実施して、文字の輪郭に対応する座標を示す輪郭情報を生成する処理を実施する。なお、輪郭描画部3は輪郭情報生成手段を構成している。
The input buffer 2 is a memory that stores vector data whose coordinates are converted by the coordinate conversion unit 1.
The contour drawing unit 3 reads out the straight lines and the vertices of the curve from the vector data after the coordinate conversion stored in the input buffer 2 and divides the curve into minute straight lines and configures the contour. Rasterization processing is performed on the straight lines and the minute straight lines, and processing for generating contour information indicating coordinates corresponding to the contour of the character is performed. The contour drawing unit 3 constitutes contour information generating means.
 輪郭バッファ4はダブルバッファで構成されており、輪郭描画部3により生成された輪郭情報を格納する。
 フラグバッファ5はダブルバッファで構成されており、輪郭バッファ4に格納されている輪郭情報が、有効な輪郭情報であるか否かを示すフラグを保持する。
 補助バッファ6は縦一列分の輪郭情報を保持するメモリである。
The contour buffer 4 is composed of a double buffer, and stores the contour information generated by the contour drawing unit 3.
The flag buffer 5 is composed of a double buffer, and holds a flag indicating whether or not the contour information stored in the contour buffer 4 is valid contour information.
The auxiliary buffer 6 is a memory that holds contour information for one vertical column.
 ピクセル生成部7はフラグバッファ5に保持されているフラグを参照して、輪郭バッファ4から有効な輪郭情報のみを読み出し、その輪郭情報にしたがって描画対象のピクセルを生成し、そのピクセルをフレームバッファ9に書き込む処理を実施する。なお、ピクセル生成部7はピクセル生成手段を構成している。 The pixel generation unit 7 refers to the flag held in the flag buffer 5, reads only valid contour information from the contour buffer 4, generates a pixel to be drawn according to the contour information, and stores the pixel in the frame buffer 9. Execute the process of writing to. The pixel generation unit 7 constitutes a pixel generation unit.
 制御部8は一文字分のベクターデータが入力バッファ2に格納されると、処理の開始指令を輪郭描画部3に出力し、また、文字のサイズが大きく、輪郭描画部3により生成される輪郭情報のデータサイズが輪郭バッファ4のメモリサイズを上回る場合、上記文字を複数の領域に分割して、分割領域毎に輪郭情報を生成する指示を輪郭描画部3に出力する処理を実施する。なお、制御部8は制御手段を構成している。
 フレームバッファ9は描画結果のイメージを保持するメモリである。
When the vector data for one character is stored in the input buffer 2, the control unit 8 outputs a processing start command to the contour drawing unit 3, and the contour information generated by the contour drawing unit 3 is large in character size. If the data size exceeds the memory size of the contour buffer 4, the character is divided into a plurality of regions, and an instruction to generate contour information for each divided region is output to the contour drawing unit 3. The control unit 8 constitutes a control means.
The frame buffer 9 is a memory that holds an image of a drawing result.
 次に動作について説明する。
 初期状態では、入力バッファ2は空の状態であり、輪郭バッファ4、フラグバッファ5及び補助バッファ16は初期値“0”で初期化されているものとする。
Next, the operation will be described.
In the initial state, the input buffer 2 is empty, and the contour buffer 4, the flag buffer 5, and the auxiliary buffer 16 are initialized with the initial value “0”.
 文字描画装置が文字の描画を行うに際して、文字の色などを示す属性が指定され、文字の輪郭を構成するベクターデータが入力される。
 あるいは、文字描画装置が外部メモリに格納されているベクターデータを読み出すようにしてもよい。
 ここで、ベクターデータは、図2に示すように、直線及び曲線の頂点や制御点によって輪郭を定義するデータである。以後の説明では、XY座標の原点は左上に存在するものとする。
When the character drawing device draws a character, an attribute indicating the color of the character is designated, and vector data constituting the outline of the character is input.
Alternatively, the character drawing device may read the vector data stored in the external memory.
Here, the vector data is data that defines a contour by the vertices and control points of straight lines and curves as shown in FIG. In the following description, it is assumed that the origin of the XY coordinates exists at the upper left.
 座標変換部1は、文字の輪郭を構成するベクターデータを入力すると、予め設定された変換行列(文字の拡大縮小、回転、平行移動等を行うための変換行列)を用いて、そのベクターデータの座標をフレームバッファ9上の座標に変換する。
 座標変換部1は、ベクターデータの座標をフレームバッファ9上の座標に変換すると、座標変換後のベクターデータを入力バッファ2に格納する。
 座標変換部1は、一文字分のベクターデータの座標変換が終了して、一文字分のベクターデータの全てを入力バッファ2に格納すると、その旨を制御部8に通知する。
When the vector data constituting the outline of the character is input, the coordinate conversion unit 1 uses a preset conversion matrix (conversion matrix for performing character enlargement / reduction, rotation, translation, etc.), and The coordinates are converted into coordinates on the frame buffer 9.
When the coordinate conversion unit 1 converts the coordinates of the vector data into the coordinates on the frame buffer 9, the coordinate conversion unit 1 stores the vector data after the coordinate conversion in the input buffer 2.
When the coordinate conversion of the vector data for one character is completed and all the vector data for one character is stored in the input buffer 2, the coordinate conversion unit 1 notifies the control unit 8 to that effect.
 なお、座標変換部1は、図3に示すように、文字の輪郭を構成するベクターデータのX座標・Y座標の最小値(Xmin,Ymin)を記憶するとともに、X座標・Y座標の最大値(Xmax,Ymax)を記憶する。
 この実施の形態1では、説明の便宜上、文字のサイズが大きいため、後述する輪郭描画部3により生成される輪郭情報のデータサイズが輪郭バッファ4のメモリサイズを上回るものとする。
 具体的には、輪郭描画部3により生成される輪郭情報のデータサイズが、図3に示すように、輪郭バッファ4の4個分のメモリサイズに収まる程度であるものとする。
As shown in FIG. 3, the coordinate conversion unit 1 stores the minimum value (Xmin, Ymin) of the X coordinate / Y coordinate of the vector data constituting the outline of the character and the maximum value of the X coordinate / Y coordinate. (Xmax, Ymax) is stored.
In the first embodiment, for convenience of explanation, since the size of characters is large, it is assumed that the data size of contour information generated by the contour drawing unit 3 described later exceeds the memory size of the contour buffer 4.
Specifically, the data size of the contour information generated by the contour drawing unit 3 is assumed to be within the memory size for four contour buffers 4 as shown in FIG.
 制御部8は、座標変換部1から一文字分のベクターデータの全てを入力バッファ2に格納した旨の通知を受けると、輪郭情報を生成する処理の開始を輪郭描画部3に指示する。
 ただし、この実施の形態1では、文字のサイズが大きく、輪郭情報のデータサイズが輪郭バッファ4のメモリサイズを上回るので、文字を複数の領域に分割して、分割領域毎に輪郭情報を生成するように輪郭描画部3に指示する。
 即ち、制御部8は、図3に示すように、文字を4つの領域(1)~(4)に分割し、最初に、領域(1)の輪郭情報を生成する処理の開始を輪郭描画部3に指示する。
When the control unit 8 receives notification from the coordinate conversion unit 1 that all vector data for one character has been stored in the input buffer 2, the control unit 8 instructs the contour drawing unit 3 to start processing for generating contour information.
However, in the first embodiment, since the character size is large and the data size of the contour information exceeds the memory size of the contour buffer 4, the character is divided into a plurality of regions and contour information is generated for each divided region. The contour drawing unit 3 is instructed as follows.
That is, as shown in FIG. 3, the control unit 8 divides the character into four regions (1) to (4), and first starts the processing for generating the contour information of the region (1). 3 is instructed.
 輪郭描画部3は、制御部8から領域(1)の輪郭情報を生成する処理の開始指示を受けると、入力バッファ2に格納されている座標変換後のベクターデータから、領域(1)における文字の輪郭に対応する座標を示す輪郭情報を生成する。
 以下、輪郭描画部3の処理内容を具体的に説明する。
 図4は輪郭描画部3の領域(1)における処理内容を示す説明図である。
When the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (1) from the control unit 8, the contour drawing unit 3 reads the characters in the region (1) from the vector data after coordinate conversion stored in the input buffer 2. The contour information indicating the coordinates corresponding to the contour is generated.
Hereinafter, the processing content of the outline drawing part 3 is demonstrated concretely.
FIG. 4 is an explanatory diagram showing processing contents in the region (1) of the contour drawing unit 3.
 輪郭描画部3は、制御部8から領域(1)の輪郭情報を生成する処理の開始指示を受けると、入力バッファ2に格納されている座標変換後のベクターデータを読み出し、そのベクターデータのX座標・Y座標の最小値(Xmin,Ymin)を輪郭バッファ4の原点(0,0)と対応させるために、図4(a)に示すように、そのベクターデータのX座標の値からX座標の最小値Xminを引く処理を実施し、また、そのベクターデータのY座標の値からY座標の最小値Yminを引く処理を実施する。 When the contour drawing unit 3 receives an instruction to start the processing for generating the contour information of the region (1) from the control unit 8, the contour drawing unit 3 reads the vector data after coordinate conversion stored in the input buffer 2, and reads the X of the vector data. In order to make the minimum value (Xmin, Ymin) of the coordinates and Y coordinates correspond to the origin (0, 0) of the contour buffer 4, as shown in FIG. The process of subtracting the minimum value Xmin of the Y coordinate is performed, and the process of subtracting the minimum value Ymin of the Y coordinate from the value of the Y coordinate of the vector data is performed.
 次に、輪郭描画部3は、文字の輪郭を構成する直線又は曲線が、完全に輪郭バッファ4の外側に位置するか否かを判定する。
 輪郭描画部3は、図4(b)に示すように、輪郭バッファ4の外側に位置する直線及び曲線を破棄する。
 即ち、領域(1)以外の領域(2)~(4)に位置している直線及び曲線を破棄する。ただし、領域(1)内の直線・曲線の頂点と繋がっている領域(2)~(4)の直線・曲線の頂点は破棄せずに残している。
Next, the contour drawing unit 3 determines whether or not a straight line or a curve constituting the contour of the character is completely outside the contour buffer 4.
The contour drawing unit 3 discards the straight lines and curves located outside the contour buffer 4 as shown in FIG.
That is, the straight lines and curves located in the areas (2) to (4) other than the area (1) are discarded. However, the vertices of the straight lines / curves in the regions (2) to (4) connected to the vertices of the straight lines / curves in the region (1) are left without being discarded.
 次に、輪郭描画部3は、図4(c)に示すように、文字の輪郭を構成する曲線を微小直線に分割する処理を実施する。
 曲線を微小直線に分割する処理自体は公知の技術であるため詳細な説明を省略するが、曲線の曲率に応じた分割数で曲線を分割することで、曲線を複数の微小直線に分割する方法が考えられる。
Next, as shown in FIG. 4C, the contour drawing unit 3 performs a process of dividing the curve constituting the contour of the character into minute straight lines.
Since the process of dividing a curve into minute lines is a known technique, a detailed description thereof will be omitted, but a method of dividing a curve into a plurality of minute lines by dividing the curve by the number of divisions according to the curvature of the curve. Can be considered.
 次に、輪郭描画部3は、曲線から分割した複数の微小直線が、完全に輪郭バッファ4の外側に位置するか否かを判定する。
 輪郭描画部3は、図4(d)に示すように、輪郭バッファ4の外側に位置する微小直線を破棄する。
 即ち、領域(1)以外の領域(2)~(4)に位置している微小直線を破棄する。ただし、領域(1)内の微小直線の頂点と繋がっている領域(2)~(4)の微小直線の頂点は破棄せずに残している。
Next, the contour drawing unit 3 determines whether or not a plurality of minute straight lines divided from the curve are completely outside the contour buffer 4.
The contour drawing unit 3 discards a minute straight line located outside the contour buffer 4 as shown in FIG.
That is, the minute straight lines located in the areas (2) to (4) other than the area (1) are discarded. However, the vertices of the minute lines in the regions (2) to (4) connected to the vertices of the minute lines in the region (1) are left without being discarded.
 次に、輪郭描画部3は、輪郭を構成する直線及び微小直線に対するラスタライズ処理を実施して、文字の輪郭に対応する座標を示す輪郭情報を生成する。
 即ち、輪郭描画部3は、輪郭を構成する直線及び微小直線に対するラスタライズ処理を実施して、スキャンラインと直線及び微小直線の交点を求め、その交点に対応する輪郭バッファ4の部分に値を書き込む処理を行う。
Next, the contour drawing unit 3 performs rasterization processing on the straight lines and minute straight lines constituting the contour, and generates contour information indicating coordinates corresponding to the contour of the character.
That is, the contour drawing unit 3 performs rasterization processing on the straight lines and minute lines constituting the contour, obtains the intersection of the scan line, the straight line, and the minute line, and writes the value in the portion of the contour buffer 4 corresponding to the intersection. Process.
 このとき、当該交点における直線及び微小直線の向きが上向きである場合(上向きの直線である場合)、図5(b)に示すように、その交点に対応する輪郭バッファ4の部分に“1”を加算し、当該交点における直線及び微小直線の向きが下向きである場合(下向きの直線である場合)、その交点に対応する輪郭バッファ4の部分から“1”を減算する。
 ただし、交点の座標が輪郭バッファ4の大きさを超える場合には、値の書き込みを行わないようにする。
 また、輪郭バッファ4に値を書き込む際、フラグバッファ5の対応ビットを“1”にセットする(図5(c)を参照)。
At this time, when the direction of the straight line and the minute straight line at the intersection is upward (when it is an upward straight line), as shown in FIG. 5B, “1” is added to the portion of the contour buffer 4 corresponding to the intersection. When the direction of the straight line and the minute line at the intersection is downward (when it is a downward straight line), “1” is subtracted from the portion of the contour buffer 4 corresponding to the intersection.
However, if the coordinates of the intersection point exceed the size of the contour buffer 4, no value is written.
Further, when a value is written to the contour buffer 4, the corresponding bit of the flag buffer 5 is set to “1” (see FIG. 5C).
 なお、図5(a)は領域(1)の輪郭情報の生成処理が終了した時点の補助バッファ6の一例を示し、図5(b)は領域(1)の輪郭情報の生成処理が終了した時点の輪郭バッファ4の一例を示し、図5(c)は領域(1)の輪郭情報の生成処理が終了した時点のフラグバッファ5の一例を示している。
 ただし、図の簡略化のため、ここでは、輪郭バッファ4が16×16ピクセル分の容量を有しているものとしている。また、フラグバッファ5は横方向の2ピクセル当たり1ビットで構成されているものとしている。
5A shows an example of the auxiliary buffer 6 at the time when the contour information generation process for the region (1) is completed, and FIG. 5B shows the contour information generation processing for the region (1). An example of the contour buffer 4 at the time is shown, and FIG. 5C shows an example of the flag buffer 5 at the time when the generation processing of the contour information of the region (1) is completed.
However, for simplification of the drawing, it is assumed here that the contour buffer 4 has a capacity of 16 × 16 pixels. The flag buffer 5 is assumed to be composed of 1 bit per 2 pixels in the horizontal direction.
 制御部8は、輪郭描画部3が領域(1)の輪郭情報を生成すると、領域(1)の輪郭情報にしたがってピクセルを生成する処理の開始をピクセル生成部7に指示する。
 ピクセル生成部7は、制御部8からピクセルの生成処理の開始指示を受けると、フラグバッファ5に保持されているフラグを参照して、輪郭バッファ4から有効な輪郭情報のみを読み出し、その輪郭情報にしたがって描画対象のピクセルを生成し、そのピクセルをフレームバッファ9に書き込む処理を実施する。
 以下、ピクセル生成部7の処理内容を具体的に説明する。図6はピクセル生成部7の処理内容(1回のスキャンライン方向へのピクセル生成処理)を示すフローチャートである。
When the contour drawing unit 3 generates the contour information of the region (1), the control unit 8 instructs the pixel generation unit 7 to start processing for generating pixels according to the contour information of the region (1).
When receiving a pixel generation processing start instruction from the control unit 8, the pixel generation unit 7 refers to the flag held in the flag buffer 5 and reads only valid contour information from the contour buffer 4. Then, a pixel to be rendered is generated and a process of writing the pixel to the frame buffer 9 is performed.
Hereinafter, the processing content of the pixel generation part 7 is demonstrated concretely. FIG. 6 is a flowchart showing the processing contents of the pixel generation unit 7 (one pixel generation process in the scan line direction).
 ピクセル生成部7は、制御部8からピクセルの生成処理の開始指示を受けると、スキャンライン方向へのピクセル生成を、輪郭バッファ4の縦解像度分だけ繰り返すことによりピクセルを生成する。
 即ち、ピクセル生成部7は、Y=0のスキャンライン(図5の一番上のスキャンライン)の処理では、まず、現在のX座標を“-1”とし、現在のY座標に対応する補助バッファ6の値を読み出して、補助バッファ6の値を現在の輪郭との交差回数Wとする(ステップST1)。
 図5の例では、補助バッファ6の値が“0”に初期化されているため、この時点では、輪郭との交差回数Wは“0”となる。
Upon receiving an instruction to start pixel generation processing from the control unit 8, the pixel generation unit 7 generates pixels by repeating pixel generation in the scan line direction by the vertical resolution of the contour buffer 4.
That is, in the process of the scan line with Y = 0 (the top scan line in FIG. 5), the pixel generation unit 7 first sets the current X coordinate to “−1” and supports the current Y coordinate. The value in the buffer 6 is read, and the value in the auxiliary buffer 6 is set as the number of intersections W with the current contour (step ST1).
In the example of FIG. 5, since the value of the auxiliary buffer 6 is initialized to “0”, the number of intersections W with the contour is “0” at this time.
 次に、ピクセル生成部7は、現在のY座標に対応するフラグバッファ5の1ラインに保持されている全てのフラグの読み出しを行う(ステップST2)。
 図5(c)の例では、フラグバッファ5の1ラインは8ビットであり、各フラグは1ビットである。したがって、1ラインに保持されているフラグは8ビットであり、ビット数が少ないため、1ラインに保持されている全てのフラグを一度に読み出すことは容易である。
Next, the pixel generation unit 7 reads all the flags held in one line of the flag buffer 5 corresponding to the current Y coordinate (step ST2).
In the example of FIG. 5C, one line of the flag buffer 5 is 8 bits, and each flag is 1 bit. Accordingly, since the flag held in one line is 8 bits and the number of bits is small, it is easy to read all the flags held in one line at a time.
 次に、ピクセル生成部7は、読み出した1ライン分のフラグのうち、値が“1”になっているフラグ(有効な輪郭情報であることを示すフラグ)を検出し、そのフラグに対応する輪郭バッファ4の値(有効な輪郭情報)を左側から順番に読み出す処理を行う(ステップST3)。
 Y=0のスキャンラインでは、フラグバッファ5の一番左のフラグが“1”であり、そのフラグに対応する輪郭バッファ4の座標は(0,0)と(1,0)であるため、座標(0,0)と(1,0)の値を読み出すようにする。
Next, the pixel generation unit 7 detects a flag whose value is “1” (a flag indicating that it is valid contour information) from the read flags for one line, and corresponds to the flag. A process of sequentially reading values (valid contour information) in the contour buffer 4 from the left side is performed (step ST3).
In the scan line of Y = 0, the leftmost flag of the flag buffer 5 is “1”, and the coordinates of the contour buffer 4 corresponding to the flag are (0, 0) and (1, 0). The values of coordinates (0, 0) and (1, 0) are read out.
 ピクセル生成部7は、輪郭バッファ14の座標(0,0)の値“+1”を読み出すと、その座標(0,0)のX座標の値をXnewとする。
 また、座標(0,0)の値“+1”を現在の輪郭との交差回数Wに加算し、その加算結果をWnewとする(ステップST4)。
 即ち、ピクセル生成部7は、Xnew=0、Wnew=1とする。
When the pixel generation unit 7 reads the value “+1” of the coordinate (0, 0) in the contour buffer 14, the value of the X coordinate of the coordinate (0, 0) is set to Xnew.
Further, the value “+1” of the coordinate (0, 0) is added to the number of intersections W with the current contour, and the addition result is set as Wnew (step ST4).
That is, the pixel generation unit 7 sets Xnew = 0 and Wnew = 1.
 次に、ピクセル生成部7は、現在の輪郭との交差回数Wが“0”以外であるか否かを判定する(ステップST5)。
 この段階では、W=0であるため、現在の輪郭との交差回数Wが“0”以外でないと判定し、ピクセルを生成するステップST6の処理には移行せずに、ステップST7の処理に移行する。
 ピクセル生成部7は、ステップST7において、現在のX座標及び輪郭との交差回数Wの値を更新する。即ち、X=Xnew=0、W=Wnew=1とする。
Next, the pixel generation unit 7 determines whether or not the number of intersections W with the current contour is other than “0” (step ST5).
At this stage, since W = 0, it is determined that the number of intersections W with the current contour is not “0”, and the process proceeds to the process of step ST7 without proceeding to the process of step ST6 for generating a pixel. To do.
In step ST7, the pixel generation unit 7 updates the current X coordinate and the value of the number of intersections W with the contour. That is, X = Xnew = 0 and W = Wnew = 1.
 次に、ピクセル生成部7は、輪郭バッファ4から有効な輪郭情報を読み出す処理が終了したか否かを判定する(ステップST8)。
 ここでは、読み出しが終了していないため、輪郭バッファ4の次の位置である座標(1,0)の読み出しを行う(ステップST3)。
Next, the pixel generation unit 7 determines whether or not the process of reading valid contour information from the contour buffer 4 is finished (step ST8).
Here, since the reading is not completed, the coordinates (1, 0) which is the next position of the contour buffer 4 is read (step ST3).
 ピクセル生成部7は、輪郭バッファ14の座標(1,0)の値“0”を読み出すと、その座標(1,0)のX座標の値をXnewとする。
 また、座標(1,0)の値“0”を現在の輪郭との交差回数Wに加算し、その加算結果をWnewとする(ステップST4)。
 即ち、ピクセル生成部7は、Xnew=1、Wnew=1とする。
When the pixel generation unit 7 reads the value “0” of the coordinate (1, 0) of the contour buffer 14, the value of the X coordinate of the coordinate (1, 0) is set to Xnew.
Further, the value “0” of the coordinate (1, 0) is added to the number of intersections W with the current contour, and the addition result is set as Wnew (step ST4).
That is, the pixel generation unit 7 sets Xnew = 1 and Wnew = 1.
 次に、ピクセル生成部7は、現在の輪郭との交差回数Wが“0”以外であるか否かを判定する(ステップST5)。
 この段階では、W=1であるため、現在の輪郭との交差回数Wが“0”以外であると判定し、ピクセルを生成するステップST6の処理に移行する。
 ピクセル生成部7は、ステップST6において、XからXnew-1までのスキャンライン方向のピクセルを生成する。
 この段階では、X=0、Xnew=1であるため、X=0のピクセルのみが生成される。
 ピクセル生成部7は、スキャンライン方向のピクセルを生成すると、現在のX座標及び輪郭との交差回数Wの値を更新する(ステップST7)。即ち、X=Xnew=1、W=Wnew=1とする。
Next, the pixel generation unit 7 determines whether or not the number of intersections W with the current contour is other than “0” (step ST5).
At this stage, since W = 1, it is determined that the number of intersections W with the current contour is other than “0”, and the process proceeds to the process of step ST6 for generating pixels.
In step ST6, the pixel generation unit 7 generates pixels in the scan line direction from X to Xnew-1.
At this stage, since X = 0 and Xnew = 1, only the pixel with X = 0 is generated.
When the pixel generation unit 7 generates a pixel in the scan line direction, the pixel generation unit 7 updates the current X coordinate and the value of the number of intersections W with the contour (step ST7). That is, X = Xnew = 1 and W = Wnew = 1.
 ここまでの処理で、フラグバッファ5の一番左のフラグに対応する処理が終了するが、フラグバッファ5の左から7番目のフラグも“1”であるため、このフラグに対応する輪郭バッファ4の座標(12,0)及び(13,0)についても同様の処理(ステップST3~ST7)を行う。
 即ち、輪郭バッファ4の座標(12,0)の値“0”が読み出されて、Xnew=12、Wnew=1となるため、X座標が“1”から“11”までのピクセルが生成されて、X=12、W=1となる。
 次に、輪郭バッファ4の座標(13,0)の値“-1”が読み出されて、Xnew=13、Wnew=0となるため、X座標が“12”のピクセルが生成されて、X=13、W=0となる。
The processing corresponding to the leftmost flag in the flag buffer 5 is completed by the processing so far. However, since the seventh flag from the left in the flag buffer 5 is also “1”, the contour buffer 4 corresponding to this flag. Similar processing (steps ST3 to ST7) is performed for the coordinates (12,0) and (13,0).
That is, since the value “0” of the coordinate (12, 0) in the contour buffer 4 is read out and Xnew = 12, Wnew = 1, pixels with the X coordinate from “1” to “11” are generated. Thus, X = 12, W = 1.
Next, the value “−1” of the coordinate (13, 0) of the contour buffer 4 is read out, and Xnew = 13 and Wnew = 0. Therefore, a pixel having an X coordinate of “12” is generated, and X = 13, W = 0.
 以上の処理により、Y=0のスキャンラインにおいて、フラグバッファ5における“1”のフラグに対応する全ての有効な輪郭情報を輪郭バッファ4から読み出す処理が終了する。
 ピクセル生成部7は、有効な輪郭情報の読み出しが終了すると、再度、現在の輪郭との交差回数Wが“0”以外であるか否かを判定する(ステップST9)。
 この段階では、W=0であるため、現在の輪郭との交差回数Wが“0”以外でないと判定し、ピクセルを生成するステップST10の処理には移行せずに、ステップST11の処理に移行する。
 ピクセル生成部7は、ステップST11において、補助バッファ6の現在のY座標に対応する位置にWの値“0”を書き込んで、スキャンライン単位のピクセル生成処理を終了する(ステップST11)。
With the above processing, the processing for reading all effective contour information corresponding to the flag “1” in the flag buffer 5 from the contour buffer 4 in the scan line of Y = 0 is completed.
When the reading of valid contour information is completed, the pixel generation unit 7 again determines whether or not the number of intersections W with the current contour is other than “0” (step ST9).
At this stage, since W = 0, it is determined that the number of intersections W with the current contour is not “0”, and the process proceeds to the process of step ST11 without proceeding to the process of step ST10 for generating a pixel. To do.
In step ST11, the pixel generation unit 7 writes the value W of “0” in the position corresponding to the current Y coordinate of the auxiliary buffer 6, and ends the pixel generation processing for each scan line (step ST11).
 ピクセル生成部7は、Y=0のスキャンラインにおけるピクセル生成処理が終了すると、Y=1のスキャンラインにおけるピクセル生成処理を開始する。
 Y=1のスキャンラインにおけるフラグバッファ5は一番左のフラグのみが“1”であるため、このフラグに対応する輪郭バッファ4の座標(0,1)及び(1,1)について、ステップST3~ST7の処理を行う。
When the pixel generation process in the Y = 0 scan line ends, the pixel generation unit 7 starts the pixel generation process in the Y = 1 scan line.
In the flag buffer 5 in the scan line of Y = 1, only the leftmost flag is “1”, so the coordinates (0, 1) and (1, 1) of the contour buffer 4 corresponding to this flag are step ST3. Processes ST7 to ST7 are performed.
 即ち、初期状態は、X=-1、W=0となり、輪郭バッファ4の座標(0,1)の値“1”が読み出されて、Xnew=0、Wnew=1となる。
 次に、輪郭バッファ4の座標(1,1)の値“0”が読み出されて、Xnew=1、Wnew=1となるため、X座標が“0”のピクセルが生成されて、X=1、W=1となる。
That is, the initial state is X = −1, W = 0, the value “1” of the coordinate (0, 1) of the contour buffer 4 is read, and Xnew = 0 and Wnew = 1.
Next, since the value “0” of the coordinate (1, 1) in the contour buffer 4 is read out and Xnew = 1 and Wnew = 1, a pixel having an X coordinate of “0” is generated, and X = 1, W = 1.
 以上の処理により、Y=1のスキャンラインにおいて、フラグバッファ5における“1”のフラグに対応する全ての有効な輪郭情報を輪郭バッファ4から読み出す処理が終了する。
 この段階では、W=1であるため、輪郭バッファ4の領域の右端まで(X座標が“1”から“15”まで)のピクセルを生成する(ステップST10)。
 そして、補助バッファ6の現在のY座標に対応する位置にWの値“1”を書き込んで、スキャンライン単位のピクセル生成処理を終了する。
With the above processing, the processing for reading all effective contour information corresponding to the flag “1” in the flag buffer 5 from the contour buffer 4 in the scan line of Y = 1 is completed.
At this stage, since W = 1, pixels up to the right end of the region of the contour buffer 4 (X coordinates from “1” to “15”) are generated (step ST10).
Then, W value “1” is written at the position corresponding to the current Y coordinate of the auxiliary buffer 6, and the pixel generation processing for each scan line is completed.
 ピクセル生成部7は、Y=1のスキャンラインにおけるピクセル生成処理が終了すると、同様に、Y=2のスキャンラインにおけるピクセル生成処理を開始する。
 Y=2のスキャンラインにおいては、X座標が“5”から“10”までのピクセルと、X座標が“14”から“15”までのピクセルが生成されて、補助バッファ6の対応する位置にはWの値“1”が書き込まれる。
When the pixel generation process in the Y = 1 scan line ends, the pixel generation unit 7 similarly starts the pixel generation process in the Y = 2 scan line.
In the scan line of Y = 2, the pixels with the X coordinate from “5” to “10” and the pixels with the X coordinate from “14” to “15” are generated at the corresponding positions in the auxiliary buffer 6. Is written with the value “1” of W.
 上記の処理をY=15のスキャンラインまで繰り返すことにより、輪郭バッファ4の領域内で、描画する必要がある全てのピクセルが生成される。
 ピクセル生成部7は、描画する必要がある全てのピクセルを生成すると、そのピクセルのX座標の値にXminの値を加算し、Y座標の値にYminの値を加算することにより、フレームバッファ9上の座標に変換し、予め設定された描画色で、フレームバッファ9に描画する。
By repeating the above processing up to the scan line of Y = 15, all the pixels that need to be drawn are generated in the region of the contour buffer 4.
When all the pixels that need to be drawn are generated, the pixel generation unit 7 adds the Xmin value to the X coordinate value of the pixel, and adds the Ymin value to the Y coordinate value, whereby the frame buffer 9 The coordinates are converted into the upper coordinates and drawn in the frame buffer 9 with a preset drawing color.
 輪郭描画部3及びピクセル生成部7は、上述した処理をパイプライン処理で実施し、描画する必要がある全てのピクセルをフレームバッファ9に描画し終わると動作を終了する。
 図7(a)は領域(1)のピクセル生成結果の一例を示し、図7(b)は領域(1)のピクセルの生成処理が終了した時点の補助バッファ6の一例を示している。
The contour drawing unit 3 and the pixel generation unit 7 perform the above-described processing by pipeline processing, and finish the operation when all the pixels that need to be drawn are drawn in the frame buffer 9.
FIG. 7A shows an example of the pixel generation result of the region (1), and FIG. 7B shows an example of the auxiliary buffer 6 at the time when the pixel generation processing of the region (1) is completed.
 上記のピクセル生成部7の説明では、輪郭バッファ4からの輪郭情報の読み出しを1ピクセルずつ行うものについて示したが、1度に複数のピクセルを読み出して、ピクセルの生成処理を行うようにしてもよい。
 また、図5の例では、フラグバッファ5が横方向の2ピクセル当たり1ビットで構成されているものについて示しているが、この場合は、輪郭バッファ4も横方向の2ピクセルを同時に読み出して、ピクセル生成処理を行うように構成するのが好ましい。
In the description of the pixel generation unit 7 described above, the contour information is read from the contour buffer 4 one pixel at a time. However, a plurality of pixels may be read at a time to perform pixel generation processing. Good.
In the example of FIG. 5, the flag buffer 5 is configured with one bit per two horizontal pixels. In this case, the contour buffer 4 also reads two horizontal pixels simultaneously, It is preferable to perform the pixel generation process.
 ピクセル生成部7は、輪郭バッファ4及びフラグバッファ5からの読み出しを行うと、その読み出しの直後に、読み出しアドレスに対して“0”値を書き込む初期化処理を実施する。
 輪郭バッファ4及びフラグバッファ5を2ポートのメモリで構成すれば、初期化と次のデータの読み出しを同時に行うことができるため、初期化の時間を完全に隠匿することができるが、1ポートメモリで読み出しと初期化を交互に行ってもよい。
 これにより、ピクセル生成部7の動作が終了した時点では、輪郭バッファ4及びフラグバッファ5が全て初期化されている状態になるため、次の描画を行う際に、輪郭バッファ4及びフラグバッファ5の全領域の初期化を行うなど処理が不要になり、高速に動作することが可能になる。
When reading from the contour buffer 4 and the flag buffer 5 is performed, the pixel generation unit 7 performs an initialization process of writing a “0” value to the read address immediately after the reading.
If the contour buffer 4 and the flag buffer 5 are constituted by a two-port memory, the initialization and the next data can be read simultaneously, so that the initialization time can be completely hidden. Reading and initialization may be performed alternately.
As a result, since the contour buffer 4 and the flag buffer 5 are all initialized when the operation of the pixel generation unit 7 is finished, when the next drawing is performed, the contour buffer 4 and the flag buffer 5 Processing such as initialization of the entire area becomes unnecessary, and high-speed operation becomes possible.
 制御部8は、以上の処理によって、文字の領域(1)の描画が完了すると、領域(2)の輪郭情報を生成する処理の開始を輪郭描画部3に指示する。
 輪郭描画部3は、制御部8から領域(2)の輪郭情報を生成する処理の開始指示を受けると、入力バッファ2に格納されている座標変換後のベクターデータから、領域(2)における文字の輪郭に対応する座標を示す輪郭情報を生成する。
 以下、輪郭描画部3の処理内容を具体的に説明する。
 図8は輪郭描画部3の領域(2)における処理内容を示す説明図である。
When the drawing of the character region (1) is completed by the above processing, the control unit 8 instructs the contour drawing unit 3 to start processing for generating the contour information of the region (2).
When the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (2) from the control unit 8, the contour drawing unit 3 reads the characters in the region (2) from the vector data after coordinate conversion stored in the input buffer 2. The contour information indicating the coordinates corresponding to the contour is generated.
Hereinafter, the processing content of the outline drawing part 3 is demonstrated concretely.
FIG. 8 is an explanatory diagram showing the processing contents in the region (2) of the contour drawing unit 3.
 輪郭描画部3は、制御部8から領域(2)の輪郭情報を生成する処理の開始指示を受けると、入力バッファ2に格納されている座標変換後のベクターデータを読み出し、領域(1)の右隣の座標(Xmin+16,Ymin)を輪郭バッファ4の原点(0,0)と対応させるために、図8(a)に示すように、そのベクターデータのX座標の値から領域(1)の右隣の座標の値Xmin+16を引く処理を実施し、また、そのベクターデータのY座標の値からY座標の最小値Yminを引く処理を実施する。 When the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (2) from the control unit 8, the contour drawing unit 3 reads the vector data after coordinate conversion stored in the input buffer 2 and reads the region (1). In order to associate the coordinates (Xmin + 16, Ymin) on the right with the origin (0, 0) of the contour buffer 4, as shown in FIG. A process of subtracting the value Xmin + 16 of the right adjacent coordinate is performed, and a process of subtracting the minimum value Ymin of the Y coordinate from the Y coordinate value of the vector data is performed.
 輪郭描画部3におけるその他の処理内容は、領域(1)の輪郭情報を生成する場合と同様であるため説明を省略する。
 なお、図9(a)は領域(2)の輪郭情報の生成処理が終了した時点の補助バッファ6の一例を示し、図9(b)は領域(2)の輪郭情報の生成処理が終了した時点の輪郭バッファ4の一例を示し、図9(c)は領域(2)の輪郭情報の生成処理が終了した時点のフラグバッファ5の一例を示している。
The other processing contents in the contour drawing unit 3 are the same as in the case of generating the contour information of the area (1), and thus the description thereof is omitted.
FIG. 9A shows an example of the auxiliary buffer 6 at the time when the contour information generation processing for the region (2) is completed, and FIG. 9B shows the contour information generation processing for the region (2) completed. An example of the contour buffer 4 at the time is shown, and FIG. 9C shows an example of the flag buffer 5 at the time when the processing for generating the contour information of the region (2) is completed.
 制御部8は、輪郭描画部3が領域(2)の輪郭情報を生成すると、領域(2)の輪郭情報にしたがってピクセルを生成する処理の開始をピクセル生成部7に指示する。
 ピクセル生成部7は、制御部8からピクセルの生成処理の開始指示を受けると、フラグバッファ5に保持されているフラグを参照して、輪郭バッファ4から有効な輪郭情報のみを読み出し、その輪郭情報にしたがって描画対象のピクセルを生成し、そのピクセルをフレームバッファ9に書き込む処理を実施する。
When the contour drawing unit 3 generates the contour information of the region (2), the control unit 8 instructs the pixel generation unit 7 to start processing for generating pixels according to the contour information of the region (2).
When receiving a pixel generation processing start instruction from the control unit 8, the pixel generation unit 7 refers to the flag held in the flag buffer 5 and reads only valid contour information from the contour buffer 4. Then, a pixel to be rendered is generated and a process of writing the pixel to the frame buffer 9 is performed.
 ピクセル生成部7の領域(2)における処理内容は、輪郭バッファ4の原点をフレームバッファ上の座標(Xmin+16,Ymin)と対応させるために、ピクセルのX座標の値にXmin+16の値を加算し、Y座標の値にYminの値を加算すること以外は、領域(1)における処理内容と同様であるため詳細な説明を省略する。 The processing content in the area (2) of the pixel generation unit 7 is to add the value of Xmin + 16 to the value of the X coordinate of the pixel in order to make the origin of the contour buffer 4 correspond to the coordinates (Xmin + 16, Ymin) on the frame buffer, Except for adding the value of Ymin to the value of the Y coordinate, it is the same as the processing content in the area (1), and therefore detailed description thereof is omitted.
 なお、ピクセル生成部7が処理を開始する際の補助バッファ6には、図9(a)に示すように、領域(1)の右端のピクセルにおける輪郭との交差回数の値が格納されているため、この値を初期値として利用することにより、領域(1)(2)間でのピクセルの抜けの発生を招くことなく、正確にピクセルの生成を行うことができる。
 ただし、図6のステップST6,ST10でピクセルを生成するときにX座標が“-1”のピクセルは生成しないように制御する。
In addition, as shown in FIG. 9A, the auxiliary buffer 6 when the pixel generation unit 7 starts processing stores the value of the number of times of intersection with the contour of the rightmost pixel in the region (1). Therefore, by using this value as an initial value, it is possible to accurately generate a pixel without causing pixel omission between the regions (1) and (2).
However, when generating a pixel in steps ST6 and ST10 in FIG. 6, control is performed so that a pixel having an X coordinate of “−1” is not generated.
 図10(a)は領域(2)のピクセル生成結果の一例を示し、図10(b)は領域(2)のピクセルの生成処理が終了した時点の補助バッファ6の一例を示している。
 領域(2)よりも右側には、描画すべきピクセルが存在しないため、補助バッファ6の値は全て“0”となる。
FIG. 10A shows an example of the pixel generation result of the region (2), and FIG. 10B shows an example of the auxiliary buffer 6 at the time when the pixel generation processing of the region (2) is completed.
Since there are no pixels to be drawn on the right side of the area (2), the values of the auxiliary buffer 6 are all “0”.
 制御部8は、以上の処理によって、文字の領域(2)の描画が完了すると、領域(3)の輪郭情報を生成する処理の開始を輪郭描画部3に指示する。
 輪郭描画部3は、制御部8から領域(3)の輪郭情報を生成する処理の開始指示を受けると、入力バッファ2に格納されている座標変換後のベクターデータから、領域(3)における文字の輪郭に対応する座標を示す輪郭情報を生成する。
When the drawing of the character region (2) is completed by the above processing, the control unit 8 instructs the contour drawing unit 3 to start processing for generating the contour information of the region (3).
When the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (3) from the control unit 8, the contour drawing unit 3 reads the characters in the region (3) from the vector data after coordinate conversion stored in the input buffer 2. The contour information indicating the coordinates corresponding to the contour is generated.
 輪郭描画部3の領域(3)における処理内容は、ベクターデータのX座標・Y座標(Xmin,Ymin+16)を輪郭バッファ4の原点(0,0)と対応させるために、そのベクターデータのX座標の値からXminの値を引き、そのベクターデータのY座標の値からYmin+16の値を引くこと以外は、領域(1)における処理内容と同様であるため説明を省略する。 The processing content in the region (3) of the contour drawing unit 3 is that the X coordinate / Y coordinate (Xmin, Ymin + 16) of the vector data is associated with the origin (0, 0) of the contour buffer 4 so as to correspond to the X coordinate of the vector data. Except for subtracting the value of Xmin from the value of Y and subtracting the value of Ymin + 16 from the value of the Y coordinate of the vector data, the description is omitted because it is the same as the processing content in the region (1).
 制御部8は、輪郭描画部3が領域(3)の輪郭情報を生成すると、領域(3)の輪郭情報にしたがってピクセルを生成する処理の開始をピクセル生成部7に指示する。
 ピクセル生成部7は、制御部8からピクセルの生成処理の開始指示を受けると、フラグバッファ5に保持されているフラグを参照して、輪郭バッファ4から有効な輪郭情報のみを読み出し、その輪郭情報にしたがって描画対象のピクセルを生成し、そのピクセルをフレームバッファ9に書き込む処理を実施する。
When the contour drawing unit 3 generates the contour information of the region (3), the control unit 8 instructs the pixel generation unit 7 to start processing for generating pixels according to the contour information of the region (3).
When receiving a pixel generation processing start instruction from the control unit 8, the pixel generation unit 7 refers to the flag held in the flag buffer 5 and reads only valid contour information from the contour buffer 4. Then, a pixel to be rendered is generated and a process of writing the pixel to the frame buffer 9 is performed.
 ピクセル生成部7の領域(3)における処理内容は、輪郭バッファ4の原点をフレームバッファ上の座標(Xmin,Ymin+16)と対応させるために、ピクセルのX座標の値にXminの値を加算し、Y座標の値にYmin+16の値を加算すること以外は、領域(1)における処理内容と同様であるため詳細な説明を省略する。 The processing content in the region (3) of the pixel generation unit 7 is to add the value of Xmin to the X coordinate value of the pixel in order to make the origin of the contour buffer 4 correspond to the coordinates (Xmin, Ymin + 16) on the frame buffer, Except for adding the value of Ymin + 16 to the value of the Y coordinate, it is the same as the processing content in the area (1), and therefore detailed description thereof is omitted.
 制御部8は、以上の処理によって、文字の領域(3)の描画が完了すると、領域(4)の輪郭情報を生成する処理の開始を輪郭描画部3に指示する。
 輪郭描画部3は、制御部8から領域(4)の輪郭情報を生成する処理の開始指示を受けると、入力バッファ2に格納されている座標変換後のベクターデータから、領域(4)における文字の輪郭に対応する座標を示す輪郭情報を生成する。
When the drawing of the character region (3) is completed by the above processing, the control unit 8 instructs the contour drawing unit 3 to start processing for generating the contour information of the region (4).
When the contour drawing unit 3 receives an instruction to start processing for generating the contour information of the region (4) from the control unit 8, the contour drawing unit 3 reads the characters in the region (4) from the vector data after coordinate conversion stored in the input buffer 2. The contour information indicating the coordinates corresponding to the contour is generated.
 輪郭描画部3の領域(4)における処理内容は、ベクターデータのX座標・Y座標(Xmin+16,Ymin+16)を輪郭バッファ4の原点(0,0)と対応させるために、そのベクターデータのX座標の値からXmin+16の値を引き、そのベクターデータのY座標の値からYmin+16の値を引くこと以外は、領域(1)における処理内容と同様であるため説明を省略する。 The processing content in the region (4) of the contour drawing unit 3 is that the X coordinate / Y coordinate (Xmin + 16, Ymin + 16) of the vector data is made to correspond to the origin (0, 0) of the contour buffer 4 and the vector data Except for subtracting the value of Xmin + 16 from the value of Y and subtracting the value of Ymin + 16 from the value of the Y coordinate of the vector data, the description is omitted because it is the same as the processing content in the region (1).
 制御部8は、輪郭描画部3が領域(4)の輪郭情報を生成すると、領域(4)の輪郭情報にしたがってピクセルを生成する処理の開始をピクセル生成部7に指示する。
 ピクセル生成部7は、制御部8からピクセルの生成処理の開始指示を受けると、フラグバッファ5に保持されているフラグを参照して、輪郭バッファ4から有効な輪郭情報のみを読み出し、その輪郭情報にしたがって描画対象のピクセルを生成し、そのピクセルをフレームバッファ9に書き込む処理を実施する。
When the contour drawing unit 3 generates the contour information of the region (4), the control unit 8 instructs the pixel generation unit 7 to start processing for generating pixels according to the contour information of the region (4).
When receiving a pixel generation processing start instruction from the control unit 8, the pixel generation unit 7 refers to the flag held in the flag buffer 5 and reads only valid contour information from the contour buffer 4. Then, a pixel to be rendered is generated and a process of writing the pixel to the frame buffer 9 is performed.
 ピクセル生成部7の領域(4)における処理内容は、輪郭バッファ4の原点をフレームバッファ上の座標(Xmin+16,Ymin+16)と対応させるために、ピクセルのX座標の値にXmin+16の値を加算し、Y座標の値にYmin+16の値を加算すること以外は、領域(1)における処理内容と同様であるため詳細な説明を省略する。 The processing content in the region (4) of the pixel generation unit 7 is to add the value of Xmin + 16 to the X coordinate value of the pixel in order to make the origin of the contour buffer 4 correspond to the coordinates (Xmin + 16, Ymin + 16) on the frame buffer, Except for adding the value of Ymin + 16 to the value of the Y coordinate, it is the same as the processing content in the area (1), and therefore detailed description thereof is omitted.
 制御部8は、以上の処理によって、文字の領域(4)の描画が完了すると、文字のバウンディングボックス内の全ての描画が終了して、文字の描画が完了したと判断し、入力バッファ2に保持されているベクターデータを破棄して、動作を終了する。 When the drawing of the character area (4) is completed by the above processing, the control unit 8 determines that all the drawing in the character bounding box has been completed, and that the drawing of the character has been completed. The stored vector data is discarded and the operation is terminated.
 この実施の形態1では、輪郭描画部3とピクセル生成部7が交互に動作するものについて示したが、輪郭バッファ4及びフラグバッファ5をダブルバッファで構成にすることにより、例えば、ピクセル生成部7が領域(1)の処理を実施している間に、輪郭描画部3が領域(2)の処理を実施するように、制御部8が輪郭描画部3とピクセル生成部7を並列に動作させるようにしてもよい。 In the first embodiment, the contour drawing unit 3 and the pixel generation unit 7 are alternately operated. However, by configuring the contour buffer 4 and the flag buffer 5 with double buffers, for example, the pixel generation unit 7 While performing the processing of the region (1), the control unit 8 operates the contour drawing unit 3 and the pixel generation unit 7 in parallel so that the contour drawing unit 3 performs the processing of the region (2). You may do it.
 以上で明らかなように、この実施の形態1によれば、文字のサイズが大きく、輪郭描画部3により生成される輪郭情報のデータサイズが輪郭バッファ4のメモリサイズを上回る場合、制御部8が、文字を複数の領域に分割して、分割領域毎に輪郭情報を生成する指示を輪郭描画部3に出力するように構成したので、小さいハードウェア規模で高速描画を実現することができる効果を奏する。 As apparent from the above, according to the first embodiment, when the character size is large and the data size of the contour information generated by the contour drawing unit 3 exceeds the memory size of the contour buffer 4, the control unit 8 Since the character is divided into a plurality of regions and an instruction to generate contour information for each divided region is output to the contour drawing unit 3, the effect of realizing high-speed drawing with a small hardware scale is achieved. Play.
 即ち、この実施の形態1によれば、輪郭バッファ4を内蔵するようにしているので、輪郭バッファ4を外部メモリに置く場合よりも、外部メモリに対するアクセスの回数を減らすことができ、高速に動作することができる。
 また、内蔵する輪郭バッファ4は小容量のメモリで済むため、ハードウェア規模を小さく抑えることができ、大きな文字を描画する際にも、輪郭バッファ4の大きさの単位で座標をずらしながら複数回描画することで対応することができる。
That is, according to the first embodiment, since the contour buffer 4 is built in, the number of accesses to the external memory can be reduced and the operation can be performed faster than when the contour buffer 4 is placed in the external memory. can do.
Further, since the built-in contour buffer 4 requires only a small memory, the hardware scale can be reduced, and even when drawing a large character, the contour buffer 4 is shifted several times while shifting the coordinates in units of the size of the contour buffer 4. This can be done by drawing.
 この実施の形態1によれば、輪郭バッファ4をダブルバッファで構成して、制御部8が、輪郭描画部3による輪郭情報の生成処理と、ピクセル生成部7によるピクセルの生成処理とを並列に実行させるように構成したので、高速描画を実現することができる効果を奏する。 According to the first embodiment, the contour buffer 4 is configured as a double buffer, and the control unit 8 performs the contour information generation processing by the contour drawing unit 3 and the pixel generation processing by the pixel generation unit 7 in parallel. Since it is configured to execute, there is an effect that high-speed drawing can be realized.
 この実施の形態1によれば、縦一列分の輪郭情報を保持する補助バッファ6を設け、輪郭描画部3が分割領域毎に輪郭情報を生成する場合、ピクセル生成部7が補助バッファ6に保持されている縦一列分の輪郭情報を参照して、描画対象のピクセルを生成するように構成したので、隣り合う領域間でのピクセルの抜けの発生を招くことなく、正確にピクセルの生成を行うことができる効果を奏する。 According to the first embodiment, the auxiliary buffer 6 that holds the vertical-line outline information is provided, and when the outline drawing unit 3 generates the outline information for each divided region, the pixel generation unit 7 holds the auxiliary information in the auxiliary buffer 6. Since the pixel to be drawn is generated with reference to the vertical outline information that is displayed, the pixel is accurately generated without causing the occurrence of missing pixels between adjacent regions. There is an effect that can be.
 この実施の形態1によれば、輪郭バッファ4に格納されている輪郭情報が、有効な輪郭情報であるか否かを示すフラグを保持するフラグバッファ5を設け、ピクセル生成部7がピクセルを生成する際、フラグバッファ5に保持されているフラグを参照して、輪郭バッファ4から有効な輪郭情報のみを読み出すように構成したので、読み出す必要がない無効な輪郭情報の読み出し処理を不要にして、動作の高速化を図ることができる効果を奏する。 According to the first embodiment, the flag buffer 5 that holds a flag indicating whether or not the contour information stored in the contour buffer 4 is valid contour information is provided, and the pixel generation unit 7 generates a pixel. In this case, the flag stored in the flag buffer 5 is referred to so that only valid contour information is read from the contour buffer 4, so that it is not necessary to read invalid contour information that does not need to be read. There is an effect that the operation can be speeded up.
 この実施の形態1によれば、輪郭バッファ4及びフラグバッファ5からの読み出しの直後に、輪郭バッファ4及びフラグバッファ5を初期化するように構成したので、初期化にかかる時間を隠匿して、動作の高速化を図ることができる効果を奏する。 According to the first embodiment, the configuration is such that the contour buffer 4 and the flag buffer 5 are initialized immediately after reading from the contour buffer 4 and the flag buffer 5, so that the initialization time is concealed, There is an effect that the operation can be speeded up.
実施の形態2.
 図11はこの発明の実施の形態2による文字描画装置を示す構成図であり、図において、図1と同一符号は同一または相当部分を示すので説明を省略する。
 輪郭描画部11は図1の輪郭描画部3と同様の処理を実施するほかに、輪郭情報を生成する際、輪郭付近の画素についてピクセルと輪郭の距離からピクセルの濃度を求め、そのピクセルの濃度を濃度バッファ12に格納する処理を実施する。なお、輪郭描画部11は輪郭情報生成手段を構成している。
 濃度バッファ12はピクセルの濃度を格納するメモリである。
Embodiment 2. FIG.
11 is a block diagram showing a character drawing apparatus according to Embodiment 2 of the present invention. In the figure, the same reference numerals as those in FIG.
The contour drawing unit 11 performs the same processing as that of the contour drawing unit 3 in FIG. 1, and when generating contour information, obtains the pixel density from the distance between the pixel and the contour of the pixels near the contour, and the density of the pixel Is stored in the density buffer 12. The contour drawing unit 11 constitutes contour information generating means.
The density buffer 12 is a memory that stores the density of pixels.
 ピクセル生成部13は図1のピクセル生成部7と同様の処理を実施するほかに、輪郭バッファ4に格納されている輪郭情報と濃度バッファ12に格納されているピクセルの濃度からピクセル毎に濃度値を求める処理を実施する。なお、ピクセル生成部13はピクセル生成手段を構成している。
 ピクセル演算部14はピクセル生成部13により求められたピクセル毎の濃度値からフレームバッファ9との間でブレンド処理を実施する。
 なお、ピクセル演算部14はピクセル演算手段を構成している。
The pixel generation unit 13 performs the same processing as that of the pixel generation unit 7 of FIG. 1, and also calculates a density value for each pixel from the contour information stored in the contour buffer 4 and the pixel density stored in the density buffer 12. The process which asks for is implemented. The pixel generation unit 13 constitutes a pixel generation unit.
The pixel calculation unit 14 performs blend processing with the frame buffer 9 based on the density value for each pixel obtained by the pixel generation unit 13.
The pixel calculation unit 14 constitutes a pixel calculation means.
 上記実施の形態1では、アンチエイリアスによる文字描画を考慮していないものについて示したが、アンチエイリアスを施した文字を描画するようにしてもよい。
 図12は文字の領域(2)の処理を行う際の輪郭バッファ4、濃度バッファ12及びフラグバッファ5の内容を示す説明図である。
In the first embodiment, the case where the drawing of characters by anti-aliasing is not considered has been described. However, the anti-aliased character may be drawn.
FIG. 12 is an explanatory diagram showing the contents of the contour buffer 4, the density buffer 12, and the flag buffer 5 when the character area (2) is processed.
 輪郭描画部11は、図12(a)に示すように、図1の輪郭描画部3と同様にして輪郭情報を生成し、その輪郭情報を輪郭バッファ4に格納する。
 また、輪郭描画部11は、図12(b)に示すように、輪郭付近の画素について、ピクセルと輪郭の距離から、そのピクセルをどれくらいの濃度で描画するかを算出し、そのピクセルの濃度を濃度バッファ12に格納する。
 例えば、ピクセルと輪郭の距離が“0”であれば、そのピクセルの濃度を“0.5”に設定し、ピクセルと輪郭の距離が長いほど、そのピクセルの濃度を“0.5”より低い値に設定する。
 なお、ピクセルと輪郭の距離が“0.5”より長ければ、そのピクセルの濃度を“0”に設定する。
 このとき、フラグバッファ5には、図12(c)に示すように、輪郭バッファ4又は濃度バッファ12のうち、少なくとも片方に有効なデータを書き込む際に対応するフラグが“1”にセットされる。
As illustrated in FIG. 12A, the contour drawing unit 11 generates contour information in the same manner as the contour drawing unit 3 in FIG. 1, and stores the contour information in the contour buffer 4.
Further, as shown in FIG. 12B, the contour drawing unit 11 calculates the density of the pixel near the contour from the distance between the pixel and the contour, and calculates the density of the pixel. Stored in the density buffer 12.
For example, if the distance between the pixel and the outline is “0”, the density of the pixel is set to “0.5”. The longer the distance between the pixel and the outline, the lower the density of the pixel is less than “0.5”. Set to value.
If the distance between the pixel and the contour is longer than “0.5”, the density of the pixel is set to “0”.
At this time, in the flag buffer 5, as shown in FIG. 12C, a flag corresponding to writing valid data in at least one of the contour buffer 4 and the density buffer 12 is set to “1”. .
 ピクセル生成部13は、図1のピクセル生成部7と同様にして、描画対象のピクセルを生成するほか、輪郭バッファ4に格納されている輪郭情報と濃度バッファ12に格納されているピクセルの濃度から、ピクセル毎の濃度値を算出する。
 例えば、輪郭バッファ4に格納されている輪郭情報が有効な輪郭情報であれば、当該ピクセルの濃度値として、“1.0”から濃度バッファ12に格納されているピクセルの濃度を減算した値に設定する。
 一方、輪郭バッファ4に格納されている輪郭情報が無効な輪郭情報であれば、当該ピクセルの濃度値を濃度バッファ12に格納されている値に設定する。
 ピクセル演算部14は、図12(d)に示すように、ピクセル生成部13により算出されたピクセル毎の濃度値からフレームバッファ9との間で、公知のブレンド処理を実施して、フレームバッファ9へのピクセルの書き込みを行う。
The pixel generation unit 13 generates a pixel to be rendered in the same manner as the pixel generation unit 7 in FIG. 1, and also uses the contour information stored in the contour buffer 4 and the pixel density stored in the density buffer 12. The density value for each pixel is calculated.
For example, if the contour information stored in the contour buffer 4 is valid contour information, the density value of the pixel is obtained by subtracting the pixel density stored in the density buffer 12 from “1.0”. Set.
On the other hand, if the contour information stored in the contour buffer 4 is invalid contour information, the density value of the pixel is set to the value stored in the density buffer 12.
As shown in FIG. 12D, the pixel calculation unit 14 performs a known blend process with the frame buffer 9 from the density value for each pixel calculated by the pixel generation unit 13, so that the frame buffer 9 Write pixel to.
 以上で明らかなように、この実施の形態2によれば、ピクセル演算部14がピクセル生成部13により求められたピクセル毎の濃度値からフレームバッファ9との間でブレンド処理を実施するように構成したので、アンチエイリアスを施したアウトラインフォントを高速に描画することができる効果を奏する。 As apparent from the above, according to the second embodiment, the pixel calculation unit 14 is configured to perform blend processing with the frame buffer 9 from the density value for each pixel obtained by the pixel generation unit 13. As a result, it is possible to draw an anti-aliased outline font at high speed.
 以上のように、この発明に係る文字描画装置は、アウトラインフォントを高速に描画する必要があるものに適している。 As described above, the character drawing device according to the present invention is suitable for a device that needs to draw an outline font at high speed.

Claims (6)

  1.  文字の輪郭を構成するベクターデータの座標をフレームバッファ上の座標に変換する座標変換手段と、上記座標変換手段により座標が変換されたベクターデータから文字の輪郭を構成する直線及び曲線の頂点を読み出して、上記曲線を微小直線に分割するとともに、上記輪郭を構成する直線及び上記微小直線に対するラスタライズ処理を実施して、文字の輪郭に対応する座標を示す輪郭情報を生成する輪郭情報生成手段と、上記輪郭情報生成手段により生成された輪郭情報を格納する輪郭バッファと、上記輪郭バッファに格納されている輪郭情報にしたがって描画対象のピクセルを生成し、上記ピクセルを上記フレームバッファに書き込むピクセル生成手段と、上記文字のサイズが大きく、上記輪郭情報生成手段により生成される輪郭情報のデータサイズが上記輪郭バッファのメモリサイズを上回る場合、上記文字を複数の領域に分割して、分割領域毎に輪郭情報を生成する指示を上記輪郭情報生成手段に出力する制御手段とを備えた文字描画装置。 Coordinate conversion means for converting the coordinates of the vector data constituting the outline of the character into coordinates on the frame buffer, and the straight lines and the vertices of the curve constituting the outline of the character are read from the vector data whose coordinates are converted by the coordinate conversion means. Contour information generating means for dividing the curve into minute straight lines and performing rasterization processing on the straight lines constituting the contour and the minute straight lines to generate contour information indicating coordinates corresponding to the contours of the characters; A contour buffer for storing the contour information generated by the contour information generating means; a pixel generating means for generating a pixel to be rendered in accordance with the contour information stored in the contour buffer and writing the pixel in the frame buffer; The outline information generated by the outline information generating means is large in size of the character A character having control means for dividing the character into a plurality of areas and outputting an instruction to generate outline information for each divided area to the outline information generating means when the data size exceeds the memory size of the outline buffer; Drawing device.
  2.  輪郭バッファをダブルバッファで構成して、制御手段が、輪郭情報生成手段による輪郭情報の生成処理と、ピクセル生成手段によるピクセルの生成処理とを並列に実行させることを特徴とする請求項1記載の文字描画装置。 The contour buffer is constituted by a double buffer, and the control means causes the contour information generation process by the contour information generation means and the pixel generation process by the pixel generation means to be executed in parallel. Character drawing device.
  3.  縦一列分の輪郭情報を保持する補助バッファを設け、輪郭情報生成手段が分割領域毎に輪郭情報を生成する場合、ピクセル生成手段が上記補助バッファに保持されている縦一列分の輪郭情報を参照して、描画対象のピクセルを生成することを特徴とする請求項1記載の文字描画装置。 When an auxiliary buffer for holding contour information for one vertical column is provided and the contour information generating unit generates the contour information for each divided region, the pixel generating unit refers to the vertical column of contour information stored in the auxiliary buffer. The character drawing apparatus according to claim 1, wherein a pixel to be drawn is generated.
  4.  輪郭バッファに格納されている輪郭情報が、有効な輪郭情報であるか否かを示すフラグを保持するフラグバッファを設け、ピクセル生成手段がピクセルを生成する際、上記フラグバッファに保持されているフラグを参照して、上記輪郭バッファから有効な輪郭情報のみを読み出すことを特徴とする請求項1記載の文字描画装置。 A flag buffer for holding a flag indicating whether or not the outline information stored in the outline buffer is valid outline information is provided, and the flag held in the flag buffer when the pixel generation means generates a pixel. The character drawing apparatus according to claim 1, wherein only valid contour information is read from the contour buffer.
  5.  ピクセル生成手段は、輪郭バッファから輪郭情報を読み出した直後に上記輪郭バッファを初期化することを特徴とする請求項1記載の文字描画装置。 2. The character drawing apparatus according to claim 1, wherein the pixel generation means initializes the contour buffer immediately after the contour information is read from the contour buffer.
  6.  輪郭情報生成手段が輪郭情報を生成する際、輪郭付近の画素についてピクセルと輪郭の距離からピクセルの濃度を求めて、上記ピクセルの濃度を濃度バッファに格納し、ピクセル生成手段が輪郭バッファに格納されている輪郭情報と上記濃度バッファに格納されているピクセルの濃度からピクセル毎に濃度値を求め、上記ピクセル生成手段により求められたピクセル毎の濃度値からフレームバッファとの間でブレンド処理を行うピクセル演算手段を設けたことを特徴とする請求項1記載の文字描画装置。 When the contour information generating means generates the contour information, the pixel density is obtained from the distance between the pixel and the contour for the pixels near the contour, and the pixel density is stored in the density buffer. The pixel generating means is stored in the contour buffer. A pixel for which a density value is obtained for each pixel from the contour information stored in the density buffer and the density of the pixel stored in the density buffer, and blend processing is performed between the density value for each pixel obtained by the pixel generation unit and the frame buffer. The character drawing apparatus according to claim 1, further comprising a calculation unit.
PCT/JP2008/000385 2008-02-28 2008-02-28 Character plotting device WO2009107168A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2008/000385 WO2009107168A1 (en) 2008-02-28 2008-02-28 Character plotting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2008/000385 WO2009107168A1 (en) 2008-02-28 2008-02-28 Character plotting device

Publications (1)

Publication Number Publication Date
WO2009107168A1 true WO2009107168A1 (en) 2009-09-03

Family

ID=41015582

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2008/000385 WO2009107168A1 (en) 2008-02-28 2008-02-28 Character plotting device

Country Status (1)

Country Link
WO (1) WO2009107168A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04175800A (en) * 1990-11-09 1992-06-23 Matsushita Electric Ind Co Ltd Vector font drawing device
JPH05241554A (en) * 1991-09-03 1993-09-21 Hitachi Ltd Character/figure generating device and information processor
JPH06161420A (en) * 1992-11-18 1994-06-07 Nec Off Syst Ltd Character signal generating device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04175800A (en) * 1990-11-09 1992-06-23 Matsushita Electric Ind Co Ltd Vector font drawing device
JPH05241554A (en) * 1991-09-03 1993-09-21 Hitachi Ltd Character/figure generating device and information processor
JPH06161420A (en) * 1992-11-18 1994-06-07 Nec Off Syst Ltd Character signal generating device

Similar Documents

Publication Publication Date Title
JP4693660B2 (en) Drawing apparatus, drawing method, and drawing program
US6587112B1 (en) Window copy-swap using multi-buffer hardware support
JP2637920B2 (en) Computer graphic system and method of using frame buffer
US7583277B1 (en) Accelerated rotation for displaying an image
JP3645024B2 (en) Drawing apparatus and drawing method
JP2006221650A (en) Method of removing index of geometric primitive, rasterization device, computer readable medium
JP5172640B2 (en) Vector drawing equipment
JP2009099098A (en) Computer graphics drawing device and drawing method
JP2009301284A (en) Drawing device and method
JP5823052B2 (en) Graphics drawing device
JP4183082B2 (en) 3D image drawing apparatus and 3D image drawing method
WO2009107168A1 (en) Character plotting device
JP5159949B2 (en) Vector drawing equipment
JP2005346605A (en) Antialias drawing method and drawing apparatus using the same
WO2014087541A1 (en) Graphics rendering device
JP3971448B2 (en) Drawing apparatus and drawing method
JP4124015B2 (en) Image display device
KR101663023B1 (en) Apparatus and method for processing graphics
JP5172523B2 (en) Image data processing method, image data processing apparatus, and compression circuit
JP4461965B2 (en) CHARACTER IMAGE GENERATION DEVICE, CHARACTER IMAGE GENERATION PROGRAM, AND CHARACTER IMAGE GENERATION METHOD
JP4914290B2 (en) Filling processing device and graphic display device
JP2005128689A (en) Image drawing device
WO2017203675A1 (en) Graphics rendering apparatus, graphics rendering method, display system, and graphics rendering program
JP2007264866A (en) Graphic system, dashed line texture image generation device and dashed line texture image generation method
JP2010113113A (en) Plotting processing method and plotting processing circuit

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08720299

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08720299

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP