A method, apparatus, device, and storage medium for processing text outline effects.
By comparing the distance field values of pixels with the same position coordinates as the directional distance field image of the target text with those of the already drawn image on the canvas, the pixels with smaller distance field values are identified and drawn, generating the outline effect image of the target text. This solves the text outline fusion problem and improves the text display effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-28
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, there is a problem with outline blending when drawing text outlines, resulting in poor text display.
By detecting pixels whose position coordinates are the same as those of the directed distance field image of the target text and the already drawn image on the canvas, comparing their distance field values, and determining which pixel has the smaller distance field value to draw on the canvas, an outline effect image of the target text is generated.
It improves the display effect of text, prevents the inner outline of text from being covered by the outer outline of other text, and enhances the display quality of text.
Smart Images

Figure CN114820876B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing, and in particular to a method, apparatus, device, and storage medium for processing the outline effect of text. Background Technology
[0002] Currently, text effects are being used in more and more fields, such as scene rendering in online games, subtitle display in variety shows, and text display in videos.
[0003] The outline effect of text is a commonly used text effect, and how to draw the outline effect of text is a problem that has received much attention.
[0004] Current text outline drawing effects suffer from outline blending issues, such as... Figure 1 The image shows a schematic diagram of a text outline effect. In this diagram, the outlines of characters drawn sequentially on the canvas overlap, affecting the display quality. Therefore, there is an urgent need for a text outline effect processing method to improve the text display. Summary of the Invention
[0005] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a method, apparatus, device and storage medium for processing the outline effect of text, which can avoid the problem of the outlines of text overlapping each other and improve the display effect of text.
[0006] Firstly, this disclosure provides a method for processing the outline effect of text, the method comprising:
[0007] When a pixel with the same position coordinates is detected in the directed distance field image of the target text and the image already drawn on the canvas, the distance field values of the pixel with the same position coordinates are compared.
[0008] If it is determined that the distance field value of the pixel in the directed distance field image is smaller among the pixels with the same position coordinates, then the pixel in the directed distance field image is drawn on the canvas;
[0009] Based on the pixels drawn on the canvas in the directed distance field image, an outline effect image corresponding to the target text is generated.
[0010] In one optional implementation, before drawing the pixels on the directed distance field image on the canvas, the method further includes:
[0011] Based on the correspondence between color values and the range of distance field values, the color value corresponding to the distance field value of the pixel on the directed distance field image is determined and used as the color value of the pixel.
[0012] Accordingly, drawing the pixels on the directed distance field image on the canvas specifically involves:
[0013] Based on the color value of the pixel, the pixel on the directed distance field image is drawn on the canvas.
[0014] In an optional implementation, before generating the outline effect image corresponding to the target text based on the pixels drawn on the canvas in the directed distance field image, the method further includes:
[0015] The gradient value of the pixel is determined based on the dot product between the offset coordinates of the pixels with a distance field value greater than 0 in the directed distance field image and the gradient direction vector; wherein, the offset coordinates are the difference between the position coordinates of the pixel and the gradient origin.
[0016] The color value of the pixel is determined based on the gradient value and the target gradient color.
[0017] In an optional implementation, before generating the outline effect image corresponding to the target text based on the pixels drawn on the canvas in the directed distance field image, the method further includes:
[0018] Based on the distance field values of pixels with distance field values less than 0 in the directed distance field image, the color transparency value of the pixel is determined; wherein, the distance field value of the pixel is inversely proportional to the color transparency value of the pixel.
[0019] In one optional implementation, the method further includes:
[0020] If it is determined that among the pixels with the same position coordinates, the pixel with the larger distance field value in the directed distance field image, then the pixel is marked; the mark is used to indicate that the pixel is not drawn on the canvas.
[0021] Secondly, this disclosure provides a text outline effect processing device, the device comprising:
[0022] The comparison module is used to compare the distance field values of the pixels with the same position coordinates when the directed distance field image of the target text and the drawn image on the canvas are detected to have the same pixel coordinates.
[0023] The first drawing module is used to draw the pixel on the directed distance field image on the canvas when the distance field value of the pixel on the directed distance field image is smaller among the pixels with the same position coordinates.
[0024] The generation module is used to generate an outline effect image corresponding to the target text based on the pixels drawn on the canvas in the directed distance field image.
[0025] In one optional embodiment, the apparatus further includes:
[0026] The first determining module is used to determine the color value corresponding to the distance field value of the pixel in the directed distance field image based on the correspondence between the color value and the range of distance field values, and use it as the color value of the pixel.
[0027] Accordingly, the first drawing module is specifically used for:
[0028] Based on the color value of the pixel, the pixel on the directed distance field image is drawn on the canvas.
[0029] Thirdly, this disclosure provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the above-described method.
[0030] Fourthly, this disclosure provides an apparatus comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method described above.
[0031] Fifthly, this disclosure provides a computer program product comprising a computer program / instruction that, when executed by a processor, implements the method described above.
[0032] The technical solution provided in this disclosure has at least the following advantages compared with the prior art:
[0033] This disclosure provides a method for processing the outline effect of text. When a pixel with the same position coordinates is detected in the directed distance field image of the target text and the image already drawn on the canvas, the distance field values of the pixels with the same position are compared. If it is determined that the distance field value of the pixel in the directed distance field image is smaller, then the pixel is drawn on the canvas. Finally, based on the pixels drawn on the canvas in the directed distance field image, an outline effect image corresponding to the target text is generated. This disclosure is based on the characteristic that the distance field values of pixels in the inner region of the text are negative, while the distance field values of pixels in the outer region of the text are positive, and the distance field values of pixels in the inner region of the text are necessarily smaller than those in the outer region of the text. By comparing the distance field values of pixels with the same position, it is determined whether to draw the pixel on the canvas, and finally, an outline effect image of the target text is generated in which the inner outline of the target text is not covered by the outer outline of other text, thus improving the display effect of the target text. Attached Figure Description
[0034] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0035] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of a text outline effect;
[0037] Figure 2 A flowchart illustrating a method for processing the outline effect of text, provided in an embodiment of this disclosure;
[0038] Figure 3 This is a schematic diagram of the outline effect image corresponding to a target text provided in an embodiment of this disclosure;
[0039] Figure 4 A schematic diagram of the structure of a text outline effect processing device provided in an embodiment of this disclosure;
[0040] Figure 5 This is a schematic diagram of the structure of a text outline effect processing device provided in an embodiment of the present disclosure. Detailed Implementation
[0041] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0042] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0043] Currently, text outlines are typically rendered using bitmap text. Directed distance field images, however, record the shortest distances from each pixel inside and around the text to the text outline (also known as the boundary), and are called distance field values. Pixels inside the text area have negative distance field values, while pixels outside the text area have positive distance field values. The inventors discovered that text-based directed distance field images make it easier to render text outlines.
[0044] To address this, this disclosure provides a method for processing the outline effect of text. When a pixel with the same position coordinates is detected between the directed distance field image of the target text and the image already drawn on the canvas, the distance field values of the pixels with the same position are compared. If it is determined that the distance field value of the pixel in the directed distance field image is smaller, then the pixel is drawn on the canvas. Finally, based on the pixels drawn on the canvas from the directed distance field image, an outline effect image corresponding to the target text is generated.
[0045] This embodiment of the disclosure is based on the characteristic that the distance field value of the pixels in the inner region of the text is negative, while the distance field value of the pixels in the outer region of the text is positive, and the distance field value of the pixels in the inner region of the text is necessarily smaller than that of the pixels in the outer region of the text. By comparing the distance field values of pixels in the same position, the pixels drawn on the canvas are determined to be pixels with smaller distance field values. Finally, an outline effect image of the inner contour of the target text is generated so that it is not covered by the outer contour of other text, thus improving the display effect of the target text.
[0046] Based on this, the present disclosure provides a method for processing the outline effect of text, referring to... Figure 2 The flowchart below illustrates a method for processing the outline effect of text, as provided in this embodiment of the present disclosure. The method includes:
[0047] S201: When a pixel with the same position coordinates as the directed distance field image of the target text is detected as being drawn on the canvas, the distance field values of the pixel with the same position coordinates are compared.
[0048] In this embodiment of the disclosure, before drawing the outline effect of the target text, the directed distance field image of the target text is first obtained, and then it is detected whether there are pixels with the same position coordinates as the directed distance field image of the target text and the image already drawn on the canvas.
[0049] In practical applications, if the directed distance field image of the target text and the already drawn image on the canvas contain pixels with the same position coordinates, then the distance field values of these pixels with the same position coordinates are compared. Assuming the pixels with the same position coordinates are the first pixel and the second pixel, and the first pixel belongs to the directed distance field image of the target text while the second pixel belongs to the already drawn image on the canvas, then the magnitudes of the distance field values of the first pixel and the second pixel are compared.
[0050] In one optional implementation, the distance field value of a first pixel is determined based on the directed distance field image of the target text, and the distance field value of a second pixel is determined based on the directed distance field image corresponding to the image drawn on the canvas. Then, the magnitude relationship between the two distance field values is compared.
[0051] In practical applications, if no pixels with the same position coordinates as the directed distance field image of the target text are detected, the text can be drawn directly on the canvas based on the directed distance field image, and the inner contour of the target text will not be obscured.
[0052] S202: If it is determined that the distance field value of the pixel on the directed distance field image is smaller among the pixels with the same position coordinates, then the pixel on the directed distance field image is drawn on the canvas.
[0053] Since the distance field value of pixels located inside the text area is negative, and the distance field value of pixels located outside the text area is positive, the distance field value of pixels located inside the text area must be greater than that of pixels located outside the text area. However, in order to ensure the display effect of the text, this embodiment prioritizes displaying the inner contour of the text body over its outer contour. Therefore, this embodiment compares the distance field values of pixels with the same position coordinates to ensure that pixels with smaller distance field values are drawn on the canvas, thereby guaranteeing the display effect of the text body.
[0054] In practical applications, when the distance field value of a pixel on the directed distance field image of the target text is smaller among pixels with the same position coordinates, it indicates that the pixel on the directed distance field image is more likely to be a pixel in the internal region of the text. Therefore, in this embodiment of the present disclosure, drawing the pixel on the canvas can ensure the display effect of the text itself.
[0055] In one alternative implementation, when the distance field value of a pixel on the directed distance field image of the target text is small, the color value of the pixel is determined based on the distance field value of the pixel, and then the pixel is drawn on the canvas based on the color value.
[0056] In one optional implementation, a correspondence between color values and distance field value ranges is pre-established. For example, the color value corresponding to the distance field value range [-m, n] (where m and n are arbitrary values, e.g., m is 0.8 and n is 0) is white, and the color value corresponding to the distance field value range [j, k] (where j and k are arbitrary values, e.g., j is 0 and k is 1) is yellow. Then, when it is determined that the distance field value of a pixel on the directed distance field image of the target text is small, the color value corresponding to the distance field value of that pixel is determined based on this correspondence and used as the color value of that pixel.
[0057] In one optional implementation, if a pixel in the directed distance field image of the target text has a larger distance field value among pixels with the same location coordinates, then that pixel in the directed distance field image is marked; wherein, the mark is used to indicate that the pixel will not be drawn on the canvas. When drawing the target text, the marked pixel is not drawn.
[0058] S203: Based on the pixels drawn on the canvas in the directed distance field image, generate the outline effect image corresponding to the target text.
[0059] In this embodiment of the disclosure, the color value of each pixel is determined before drawing each pixel on the canvas.
[0060] In one optional implementation, the color value corresponding to the distance field value of a pixel can be determined based on the correspondence between color values and distance field value ranges, and used as the color value of that pixel. Specifically, a correspondence between color values and distance field value ranges is established in advance. Then, the distance field value range corresponding to the distance field value of each pixel in the directed distance field image is determined, and the color value corresponding to the distance field value range is determined as the color value of that pixel.
[0061] In this embodiment of the disclosure, after drawing pixels on the canvas based on the directed distance field image of the target text, a contour effect image corresponding to the target text can be obtained. The inner contour of the target text in the contour effect image is not obscured. For example... Figure 3 The image shown is a schematic diagram of the outline effect image corresponding to a target character provided in an embodiment of this disclosure. Figure 1 Compared to the images in the middle, Figure 3 The inner outline of the text in the outline effect image is not covered, resulting in a better display effect.
[0062] In the text contour effect processing method provided in this disclosure, when a pixel with the same position coordinates is detected in the directed distance field image of the target text and the image already drawn on the canvas, the distance field values of the pixels with the same position are compared. If it is determined that the distance field value of the pixel in the directed distance field image is smaller, then the pixel is drawn on the canvas. Finally, based on the pixels drawn on the canvas in the directed distance field image, a contour effect image corresponding to the target text is generated. This disclosure is based on the characteristic that the distance field values of pixels in the inner region of the text are negative, while the distance field values of pixels in the outer region of the text are positive, and the distance field values of pixels in the inner region of the text are necessarily smaller than those in the outer region of the text. By comparing the distance field values of pixels with the same position, the pixel drawn on the canvas is determined to be the pixel with the smaller distance field value, and a contour effect image of the target text whose inner contour is not covered by the outer contour of other text is finally generated, thus improving the display effect of the target text.
[0063] In one optional implementation, the outline of the target text can be processed into a gradient effect. Specifically, since pixels with a distance field value greater than 0 are located outside the text area, this embodiment can determine the gradient value of the pixel based on the dot product of the offset coordinates of pixels with a distance field value greater than 0 in the directed distance field image and the gradient direction vector. The offset coordinates are the difference between the pixel's position coordinates and the gradient origin. Then, the color value of the pixel is determined based on the gradient value and the target gradient color.
[0064] The target gradient colors are usually two colors, such as white and black. The gradient effect is a transition from black to white, or vice versa. The gradient origin is usually the center point of the text itself, specifically used to determine the point where one color in the target gradient transitions to the other.
[0065] In another optional implementation, the text itself in the outline effect image corresponding to the target text can be drawn with a glowing effect. Specifically, before generating the outline effect image corresponding to the target text based on the pixels drawn on the canvas in the directed distance field image, the pixels inside the text region in the directed distance field image are first identified, i.e., pixels with a distance field value less than 0. Then, based on the distance field value of the pixels with a distance field value less than 0, the color transparency value of the pixel is determined. The absolute value of the distance field value of the pixel is inversely proportional to the color transparency value of the pixel; that is, the larger the distance field value, the smaller the color transparency value of the corresponding pixel. Then, based on the pixels with determined color transparency values, the text itself is drawn on the canvas, thereby achieving the effect of the text itself glowing.
[0066] Furthermore, in practical applications, the text outline effect processing method provided in this disclosure can be implemented using the depth testing function in the image processor GPU. Specifically, when the GPU detects that the directed distance field image of the target text has pixels with the same position coordinates as the drawn image on the canvas, the distance field value of the pixel with the same position coordinates is written as a depth value into the GPU's depth buffer. After enabling the depth testing function, the distance field values of the pixels with the same position coordinates are compared using the depth testing function.
[0067] Upon receiving the comparison results of the distance field values obtained using the depth test function, the pixel with the smaller distance field value among the pixels with the same position coordinates is drawn on the canvas. This ensures that the color value of the pixel with the smaller distance field value is drawn at the same position coordinate, and that the inner contour of the target text is not obscured by the outer contour of other text.
[0068] Based on the same inventive concept as the above-described method embodiments, this disclosure also provides a text outline effect processing device, see reference. Figure 4 This is a schematic diagram of a text outline effect processing device provided in an embodiment of the present disclosure. The device includes:
[0069] The comparison module 401 is used to compare the distance field values of the pixels with the same position coordinates when the directed distance field image of the target text and the drawn image on the canvas are detected to have the same position coordinates.
[0070] The first drawing module 402 is used to draw the pixel on the canvas when the distance field value of the pixel on the directed distance field image is smaller among the pixels with the same position coordinates.
[0071] The generation module 403 is used to generate an outline effect image corresponding to the target text based on the pixels drawn on the canvas in the directed distance field image.
[0072] In one optional embodiment, the apparatus further includes:
[0073] The first determining module is used to determine the color value corresponding to the distance field value of the pixel in the directed distance field image based on the correspondence between the color value and the range of distance field values, and use it as the color value of the pixel.
[0074] Accordingly, the first drawing module is specifically used for:
[0075] Based on the color value of the pixel, the pixel on the directed distance field image is drawn on the canvas.
[0076] In one optional embodiment, the apparatus further includes:
[0077] The second determining module is used to determine the gradient value of the pixel based on the dot product operation result between the offset coordinates of the pixels with a distance field value greater than 0 in the directed distance field image and the gradient direction vector; wherein, the offset coordinates are the difference between the position coordinates of the pixel and the gradient origin;
[0078] The third determining module is used to determine the color value of the pixel based on the gradient value and the target gradient color.
[0079] In one optional embodiment, the apparatus further includes:
[0080] The fourth determining module is used to determine the color transparency value of a pixel based on the distance field value of the pixel whose distance field value is less than 0 in the directed distance field image; wherein the absolute value of the distance field value of the pixel is inversely proportional to the color transparency value of the pixel.
[0081] In one optional embodiment, the apparatus further includes:
[0082] A marking module is used to mark a pixel when the distance field value of a pixel on the directed distance field image is larger among pixels with the same position coordinates; the mark is used to indicate that the pixel is not drawn on the canvas.
[0083] In the text contour effect processing apparatus provided in this embodiment, when a pixel with the same position coordinates as a pixel in the directed distance field image of the target text and a pixel already drawn on the canvas are detected, the distance field values of the pixels with the same position are compared. If it is determined that the distance field value of the pixel in the directed distance field image is smaller, the pixel is drawn on the canvas. Finally, based on the pixel drawn on the canvas in the directed distance field image, a contour effect image corresponding to the target text is generated. This embodiment of the present disclosure is based on the characteristic that the distance field values of pixels in the inner region of the text are negative, while the distance field values of pixels in the outer region of the text are positive, and the distance field values of pixels in the inner region of the text are necessarily smaller than the distance field values of pixels in the outer region of the text. By comparing the distance field values of pixels with the same position, it determines whether to draw the pixel on the canvas, and finally generates a contour effect image in which the inner contour of the target text is not covered by the outer contour of other text, thus improving the display effect of the target text.
[0084] In addition to the methods and apparatus described above, this disclosure also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the text outline effect processing method described in this disclosure.
[0085] This disclosure also provides a computer program product, including a computer program / instruction, characterized in that, when the computer program / instruction is executed by a processor, it implements the text outline effect processing method described in this disclosure.
[0086] In addition, this disclosure also provides a device for processing the outline effect of text, see [link to relevant documentation]. Figure 5 As shown, it may include:
[0087] The device includes a processor 501, a memory 502, an input device 503, and an output device 504. The number of processors 501 in the text outline effect processing device can be one or more. Figure 5 Taking a processor as an example. In some embodiments of this disclosure, the processor 501, memory 502, input device 503, and output device 504 can be connected via a bus or other means, wherein, Figure 5 Taking the example of a connection between China and Israel via a bus.
[0088] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing of the text outline effect processing device by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The input device 503 can be used to receive input digital or character information, and generate signal inputs related to user settings and function control of the text outline effect processing device.
[0089] Specifically in this embodiment, the processor 501 will load the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 will run the applications stored in the memory 502 to realize the various functions of the text outline effect processing device.
[0090] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0091] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing the outline effect of text, characterized in that, The method includes: When a pixel with the same position coordinates is detected in the directed distance field image of the target text and the image already drawn on the canvas, the distance field values of the pixel with the same position coordinates are compared. If it is determined that the distance field value of the pixel in the directed distance field image is smaller among the pixels with the same position coordinates, then the pixel in the directed distance field image is drawn on the canvas; Based on the distance field values of pixels with distance field values less than 0 in the directed distance field image, the color transparency value of the pixel is determined; wherein, the absolute value of the distance field value of the pixel is inversely proportional to the color transparency value of the pixel; Based on the pixels drawn on the canvas in the directed distance field image, a contour effect image corresponding to the target text is generated, wherein the contour effect image is the contour effect image of the inner contour of the target text that is not covered.
2. The method according to claim 1, characterized in that, Before drawing the pixels on the directed distance field image on the canvas, the method further includes: Based on the correspondence between color values and the range of distance field values, the color value corresponding to the distance field value of the pixel on the directed distance field image is determined and used as the color value of the pixel. Accordingly, drawing the pixels on the directed distance field image on the canvas specifically involves: Based on the color value of the pixel, the pixel on the directed distance field image is drawn on the canvas.
3. The method according to claim 1, characterized in that, Before generating the outline effect image corresponding to the target text based on the pixels drawn on the canvas in the directed distance field image, the method further includes: The gradient value of the pixel is determined based on the dot product between the offset coordinates of the pixels with a distance field value greater than 0 in the directed distance field image and the gradient direction vector; wherein, the offset coordinates are the difference between the position coordinates of the pixel and the gradient origin. The color value of the pixel is determined based on the gradient value and the target gradient color.
4. The method according to claim 1, characterized in that, The method further includes: If it is determined that among the pixels with the same position coordinates, the pixel with the larger distance field value in the directed distance field image, then the pixel is marked; the mark is used to indicate that the pixel is not drawn on the canvas.
5. A device for processing the outline effect of text, characterized in that, The device includes: The comparison module is used to compare the distance field values of the pixels with the same position coordinates when the directed distance field image of the target text and the drawn image on the canvas are detected to have the same pixel coordinates. The first drawing module is used to draw the pixel on the directed distance field image on the canvas when the distance field value of the pixel on the directed distance field image is smaller among the pixels with the same position coordinates. The fourth determining module is used to determine the color transparency value of a pixel based on the distance field value of the pixel whose distance field value is less than 0 in the directed distance field image; wherein the absolute value of the distance field value of the pixel is inversely proportional to the color transparency value of the pixel; The generation module is used to generate a contour effect image corresponding to the target text based on the pixels drawn on the canvas in the directed distance field image. The contour effect image is a contour effect image in which the inner contour of the target text is not covered.
6. The apparatus according to claim 5, characterized in that, The device further includes: The first determining module is used to determine the color value corresponding to the distance field value of the pixel in the directed distance field image based on the correspondence between the color value and the range of distance field values, and use it as the color value of the pixel. Accordingly, the first drawing module is specifically used for: Based on the color value of the pixel, the pixel on the directed distance field image is drawn on the canvas.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the method as described in any one of claims 1-4.
8. A device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1-4.
9. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-4.
Citation Information
Patent Citations
3D character color gradient method, medium, equipment and device
CN110782534A
Efficiently Computed Distance Fields
US20200279415A1