Subdivision curve data processing method, system, medium and vector graphics processing device

By constructing the data structure of the intersection content table and information table in memory, only the fill information of the effective intersection generated by the subdivided curve is saved, the problems of large memory resource requirements and low rendering performance in the prior art are solved, and more efficient vector graphics rendering is achieved.

CN113947519BActive Publication Date: 2025-04-25VERISILICON MICROELECTRONICS (SHANGHAI) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010693897.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2025-04-25
Estimated Expiration
2040-07-17

AI Technical Summary

Technical Problem

When storing and processing vector graphics, the existing Tessellation data structure needs to save the fill information of all pixels of the entire vector graphics, resulting in a large memory resource requirement, and large bandwidth and long time consumption when reading back data for filling judgment, affecting the rendering performance.

Method used

By constructing the data structures of the X node content table and the X node information table or the Y node content table and the Y node information table in memory, only the fill information of the effective intersection generated by the subdivided curve is saved, and the X coordinate or Y coordinate of the intersection is sorted and stored, and the vector graphics are filled directly according to the intersection information.

Benefits of technology

It effectively reduces the demand for memory resources, reduces system bandwidth, avoids the search time of intersection points, and improves the performance of vector graphics rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947519B_ABST
    Figure CN113947519B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, medium and vector graphics processing device for processing subdivided curve data, comprising: constructing a data structure including a content table and an information table in a memory; when a vector line generated by a subdivided curve intersects with an X / Y row to obtain a new intersection, reading the address of the corresponding information table and the number of X / Y nodes in the content table according to the horizontal / vertical row corresponding to the Y / X coordinate of the intersection; reading the corresponding X / Y node information in the memory according to the address of the read information table and the number of X / Y nodes; comparing the intersection information with the read X / Y node information, and updating or adding the X / Y node on the information table of the horizontal / vertical row corresponding to the Y / X coordinate. The method, system, medium and vector graphics processing device for processing subdivided curve data of the present invention effectively reduces the demand for memory resources and improves the performance of vector graphics rendering by only saving the filling information of the valid intersection generated by the subdivided curve instead of saving the filling information of all pixels of the entire vector graphics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for processing a data structure, and in particular to a method, system, medium and vector graphics processing device for processing a tessellation curve data structure. Background Art

[0002] Tessellation technology is also known as subdivision curve technology. In the application of vector graphics, the lines generated by tessellation generate intersection points with a certain Y line, and these intersection points need to be stored in the memory. After Tessellation completes the current vector graphics, the intersection data stored in the memory is read back; and the coverage value of each pixel in the vector graphics is calculated based on the filling and position information of the intersection, and the entire vector graphics is drawn according to the filling rules.

[0003] In the prior art, the information stored in the memory in the data structure of Tessellation is the filling and statistical information of all pixels of the entire vector graphics. This implementation method causes Tessellation to have a great demand on memory resources.

[0004] In addition, after Tessellation processes the entire vector graphic, the data structure in the prior art needs to read back all the data in the memory according to the position of the vector graphic from top to bottom and from left to right, find the intersection, and make a filling judgment. The above memory data reading back method has the following defects:

[0005] (1) The bandwidth of the system is very large;

[0006] (2) It takes a long time to find the intersection point, which is equivalent to adding a lot of bubble time to the vector graphics filling, seriously affecting the rendering performance. Summary of the invention

[0007] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide a subdivision curve data processing method, system, medium and vector graphics processing device in a vector graphics processing device, which effectively reduces the demand for memory resources and improves the performance of vector graphics rendering by only saving the fill information of the valid intersections generated by the subdivision curves instead of saving the fill information of all pixels of the entire vector graphics.

[0008] To achieve the above-mentioned object and other related objects, the present invention provides a method for processing subdivided curve data in a vector graphics processing device, comprising the following steps: constructing a data structure in a memory, the data structure comprising an X-node content table and an X-node information table or comprising a Y-node content table and a Y-node information table; the X-node content table is used to store the address of the information table corresponding to each horizontal line in the memory and the number of X nodes in the information table, and the X-node information table is used to store the X-node information contained in the information table corresponding to the horizontal line; the Y-node content table is used to store the address of the information table corresponding to each vertical line in the memory and the number of Y nodes in the information table, and the Y-node content table is used to store the Y-node information contained in the information table corresponding to the vertical line; when the data structure comprises the X-node content table and the X-node information table, the vector line generated by the subdivided curve intersects with the X line to obtain a new intersection. When a cross point is obtained, the address and number of X nodes of the corresponding information table are read in the content table according to the horizontal row corresponding to the Y coordinate of the cross point; the corresponding X node information is read in the memory according to the address and number of X nodes of the read information table; the cross point information is compared with the read X node information, and the X node is updated or added in the information table of the horizontal row corresponding to the Y coordinate; when the data structure includes the Y node content table and the Y node information table, and the vector line generated by the subdivided curve intersects with the Y row to obtain a new cross point, the address and number of Y nodes of the corresponding information table are read in the content table according to the vertical row corresponding to the X coordinate of the cross point; the corresponding Y node information is read in the memory according to the address and number of Y nodes of the read information table; the cross point information is compared with the read Y node information, and the Y node is updated or added in the information table of the vertical row corresponding to the X coordinate.

[0009] In one embodiment of the present invention, the X node information includes the X coordinate of the intersection, the filling information, the number of sub-positions and the sub-position information; the Y node information includes the Y coordinate of the intersection, the filling information, the number of sub-positions and the sub-position information; the intersection information includes the X coordinate, the Y coordinate, the sub-position information and the filling information.

[0010] In an embodiment of the present invention, the number of the sub-positions can be customized; the number of the sub-positions is not a fixed value, and all sub-position information of the X node can be stored.

[0011] In one embodiment of the present invention, when the data structure includes an X-node content table and an X-node information table, when the X-coordinate of the intersection information and the X-coordinate in the read X-node information are not equal, an X-node is added to the corresponding position of the X-node information table, and the number of X-nodes in the X-node content table is updated;

[0012] When the data structure includes a Y node content table and a Y node information table, and the Y coordinate of the intersection information is not equal to the Y coordinate in the read Y node information, a Y node is added to the corresponding position of the Y node information table, and the number of Y nodes in the Y node content table is updated.

[0013] In one embodiment of the present invention, when the data structure includes an X-node content table and an X-node information table, when the X-coordinate of the intersection information is the same as a certain X-coordinate in the read X-node information, the X-node information corresponding to the X-coordinate is updated;

[0014] When the data structure includes a Y node content table and a Y node information table, when the Y coordinate of the intersection information is the same as a certain Y coordinate in the read Y node information, the X node information corresponding to the Y coordinate is updated.

[0015] In one embodiment of the present invention, each X node in the X node information table is sorted in sequence according to the corresponding X coordinate; each Y node in the Y node information table is sorted in sequence according to the corresponding Y coordinate.

[0016] In one embodiment of the present invention, the bit width of the X node in the data structure can be customized, and is a fixed value when the maximum number of sub-positions in the X node information is determined; the bit width of the Y node in the data structure can be customized, and is a fixed value when the maximum number of sub-positions in the Y node information is determined.

[0017] Correspondingly, the present invention provides a subdivision curve data processing system in a vector graphics processing device, comprising: a construction module, an X-node processing module and a Y-node processing module;

[0018] The construction module is used to construct a data structure in the memory, the data structure including an X-node content table and an X-node information table or including a Y-node content table and a Y-node information table; the X-node content table is used to store the address of the information table corresponding to each horizontal row in the memory and the number of X nodes in the information table, and the X-node information table is used to store the X-node information contained in the information table corresponding to the horizontal row; the Y-node content table is used to store the address of the information table corresponding to each vertical row in the memory and the number of Y nodes in the information table, and the Y-node content table is used to store the Y-node information contained in the information table corresponding to the vertical row;

[0019] The X-node processing module is used for, when the data structure includes an X-node content table and an X-node information table, and a vector line generated by the subdivided curve intersects with an X-row to obtain a new intersection point, reading the address of the corresponding information table and the number of X-nodes in the content table according to the horizontal row corresponding to the Y coordinate of the intersection point; reading the corresponding X-node information in the memory according to the address of the read information table and the number of X-nodes; comparing the intersection point information with the read X-node information, and updating or adding an X-node in the information table of the horizontal row corresponding to the Y coordinate;

[0020] The Y-node processing module is used for, when the data structure includes a Y-node content table and a Y-node information table, and a vector line generated by the subdivided curve intersects with the Y row to obtain a new intersection point, reading the address of the corresponding information table and the number of Y nodes in the content table according to the vertical row corresponding to the X-coordinate of the intersection point; reading the corresponding Y-node information in the memory according to the address of the read information table and the number of Y nodes; comparing the intersection point information with the read Y-node information, and updating or adding the Y node in the information table of the vertical row corresponding to the X-coordinate.

[0021] The present invention provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the subdivision curve data processing method in the above-mentioned vector graphics processing device is implemented.

[0022] Finally, the present invention provides a vector graphics processing device, comprising: a processor and a memory;

[0023] The memory is used to store computer programs;

[0024] The processor is used to execute the computer program stored in the memory, so that the vector graphics processing device executes the above-mentioned subdivision curve data processing method in the vector graphics processing device.

[0025] As described above, the subdivision curve data processing method, system, medium and vector graphics processing device in the vector graphics processing device of the present invention have the following beneficial effects:

[0026] (1) By using a sorting algorithm based on the horizontal or vertical coordinate, only the filling information of the valid intersections generated by the subdivision curve is saved instead of saving the filling information of all pixels of the entire vector graphics, which effectively reduces the demand for memory resources;

[0027] (2) The vector graphics can be filled directly in sequence according to the saved intersection information, thereby avoiding the search time of the intersections, effectively reducing the system bandwidth, and improving the performance of vector graphics rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1It is a flow chart showing a method for processing subdivision curve data in a vector graphics processing device of the present invention in one embodiment;

[0029] Figure 2 It is a schematic diagram showing a data structure of a subdivided curve in a vector graphics processing device of the present invention in one embodiment;

[0030] Figure 3 It is a schematic structural diagram of a subdivision curve data processing system in a vector graphics processing device of the present invention in one embodiment;

[0031] Figure 4 FIG. 4 is a schematic diagram showing the structure of a vector graphics processing device in one embodiment of the present invention.

[0032] Component number description

[0033] 31 Building Blocks

[0034] 32 X-node processing modules

[0035] 33 Y node processing module

[0036] 41 Processor

[0037] 42 Memory DETAILED DESCRIPTION

[0038] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0039] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0040] The subdivision curve data processing method, system, medium and vector graphics processing device of the present invention only save the filling and position information of the valid intersection points after the subdivision curve when processing the subdivision curve of the vector graphics, and there is no need to save the direction information of all pixels of the entire vector graphics, thereby effectively reducing the demand for memory resources; at the same time, because the intersection points are sorted and stored according to the X coordinates or Y coordinates in the Cartesian coordinate system, there is no need for the intersection search step, which effectively improves the performance of vector graphics rendering.

[0041] like Figure 1 As shown, in one embodiment, the subdivision curve data processing method in the vector graphics processing device of the present invention comprises the following steps:

[0042] Step S1: construct a data structure in a memory, the data structure comprising an X-node content table and an X-node information table or comprising a Y-node content table and a Y-node information table; the X-node content table is used to store the address of the information table corresponding to each horizontal row in the memory and the number of X nodes in the information table, and the X-node information table is used to store the X-node information contained in the information table corresponding to the horizontal row; the Y-node content table is used to store the address of the information table corresponding to each vertical row in the memory and the number of Y nodes in the information table, and the Y-node content table is used to store the Y-node information contained in the information table corresponding to the vertical row.

[0043] In one embodiment of the present invention, a data structure is constructed in a memory, the data structure comprising an X-node content table and an X-node information table; the X-node content table is used to store the address of the information table corresponding to each horizontal row in the memory and the number of X nodes in the X-node information table; the X-node information table is used to store the X-node information corresponding to the horizontal row. The X-node refers to the intersection of the same horizontal row, with different X coordinates and the same Y coordinate.

[0044] In another embodiment of the present invention, a data structure is constructed in a memory, the data structure comprising a Y node content table and a Y node information table; the Y node content table is used to store the address of the information table corresponding to each vertical row in the memory and the number of Y nodes in the Y node information table; the Y node information table is used to store the Y node information corresponding to the vertical row. The Y nodes refer to the intersections located in the same vertical row, with different Y coordinates and the same X coordinates.

[0045] Specifically, a new data structure is constructed in the memory of the vector graphics processing device to store the data generated by the subdivision curve processing. Figure 2As shown, the data structure adopts a two-level structure, the first level is the content table (Contenttable), and the second level is the information table (Xblock). The content table stores the address (Addr) of the X-node information table corresponding to each horizontal line in the memory and the number of X nodes (Xnode) in the X-node information table (Count) in units of horizontal lines. That is, each horizontal line corresponding to a Y coordinate corresponds to an X-node information table, and the X-node content table stores the storage address of each X-node information table and the number of X nodes contained in the X-node information table in the horizontal line in sequence according to the Y coordinate. For example, the Y coordinate is Y 0 When the corresponding storage address is Addr 0 , the number of X nodes is Count 0 ; Y coordinate is Y 1 When the corresponding storage address is Addr 1 , the number of X nodes is Count 1 ; Similarly, the Y coordinate is Y n When the corresponding storage address is Addr n , the number of X nodes is Count n .

[0046] At the same time, an X node corresponding to a horizontal row corresponds to an element in the X node information table. For each horizontal row, the X node information table stores the X node information. In one embodiment of the present invention, the X node information includes the X coordinate of the intersection, fill information, the number of sub locations, and sub location information. Correspondingly, the Y node information includes the Y coordinate of the intersection, fill information, the number of sub locations, and sub location information. Figure 2 In the embodiment shown, four sub-locations are included, and the sub-location information is SubLoc 0 、SubLoc1、SubLoc 2 and SubLoc 4. In one embodiment of the present invention, the bit width of the X node / Y node in the data structure is a fixed value. Therefore, when reading the data in the data structure, the X node content table / Y node content table is first read, and the data length of the current X node information table / Y node information table can be determined according to the number of X nodes / Y nodes read and the bit width of the X node / Y node; then all valid data of the current X node information table / Y node information table is directly read in the memory through the address information stored in the X node content table / Y node content table. In one embodiment of the present invention, the number of sub-positions can be customized; the number of sub-positions is not a fixed value, and all sub-position information of the X node can be saved. In another example of the present invention, when the maximum number of sub-positions is not predetermined, the data saved in the content table is also increased by the data length of the information table.

[0047] In order to improve image quality, vector graphics processing applications usually use anti-aliasing algorithms to further divide the intersection positions into 4x, 8x, 16x, etc. sub-positions. Therefore, in order to fix the bit width of the X node / Y node, the number of sub-positions stored in an X node / Y node can be set according to actual needs and the quality of the anti-aliasing algorithm, such as 4, 6, 8, etc.

[0048] In vector graphic processing applications, as the drawing progresses, the intersection may be crossed by the vector line multiple times, and the direction each time may be different. Each time the intersection is crossed by the drawn vector line, the sub-positions and fill information passed by it need to be saved. Since the intersection may be crossed multiple times, the information of the sub-positions may be the same. The fill information of all sub-positions saved by an X node is the same, corresponding to FillInformation; at the same time, the sub-positions with the same direction are saved together and recorded as Direction. Therefore, if the directions of the vector lines crossing an intersection are different or the number of sub-positions exceeds the preset value, its information will be saved in two or more X nodes / Y nodes, and the X coordinates / Y coordinates of these X nodes / Y nodes are the same.

[0049] In one embodiment of the present invention, each X node in the X node information table is sorted in sequence according to the corresponding X coordinate. Each Y node in the Y node information table is sorted in sequence according to the corresponding Y coordinate. When the X node / Y node is read back for vector graphics rendering after the subdivision curve is completed, the vector graphics can be directly rendered according to the arranged intersection information stored in the X node information table / Y node information table, thereby eliminating the need to search for intersections, thereby improving the performance of vector graphics rendering.

[0050] Since only intersection information is stored in the X-node information table and the Y-node information table, there is no need to store direction information of all pixels of the entire vector graphic, so the demand for memory is significantly reduced, alleviating system pressure.

[0051] Step S2: when the data structure includes an X-node content table and an X-node information table, and a vector line generated by the subdivided curve intersects with an X-row to obtain a new intersection point, an address of a corresponding information table and the number of X-nodes are read from the content table according to a horizontal row corresponding to a Y-coordinate of the intersection point; corresponding X-node information is read from the memory according to the address of the read information table and the number of X-nodes; the intersection point information is compared with the read X-node information, and an X-node is updated or added to the information table of the horizontal row corresponding to the Y-coordinate.

[0052] Specifically, when the data structure includes an X-node content table and an X-node information table, when a new intersection is obtained in the process of subdividing the curve, the data structure needs to be updated according to the information of the intersection. First, the storage address and the number of X-nodes of the X-node information table of the corresponding horizontal row are obtained in the data structure according to the Y coordinate of the intersection.

[0053] Specifically, all the X-node information in the X-node information table is read in the X-node information table according to the address and the number of X-nodes in the read X-node information table. Among them, the X-node information can be read according to the bit width of the X-node, or according to the preset X-node cutoff mark. The reading method is not specifically limited, and all methods that can accurately read the X-node information are within the protection scope of the present invention. In one embodiment of the present invention, the bit width of the X-node in the data structure can be customized, and when the maximum number of sub-positions in the X-node information is determined, it is a fixed value.

[0054] In one embodiment of the present invention, the intersection information includes an X coordinate, a Y coordinate, sub-position information and fill information. The intersection information is compared with the read X node information one by one, and the X node on the X node information table of the horizontal row corresponding to the Y coordinate is updated or added according to the comparison result. When the X coordinate of the intersection information is not equal to the X coordinate in the read X node information, it indicates that the current intersection is a newly generated X node, then according to the X coordinate of the intersection and the coordinates of the existing X nodes in the X node information table, an X node is added to the corresponding position of the X node information table, the corresponding X node information is stored according to the intersection information, and the number of X nodes in the X node content table is updated, that is, the number of X nodes is increased by 1. When the X coordinate of the intersection information is the same as a certain X coordinate in the read X node information, it indicates that the position of the new intersection obtained has been crossed by a vector line before, and the X node information corresponding to the X coordinate is updated according to the intersection information.

[0055] Step S3: when the data structure includes a Y-node content table and a Y-node information table, and a vector line generated by the subdivided curve intersects with the Y row to obtain a new intersection, an address of a corresponding information table and the number of Y nodes are read from the content table according to a vertical row corresponding to the X-coordinate of the intersection; corresponding Y-node information is read from the memory according to the address of the read information table and the number of Y nodes; the intersection information is compared with the read Y-node information, and a Y node is updated or added to the information table of the vertical row corresponding to the X-coordinate.

[0056] Specifically, when the data structure includes a Y node content table and a Y node information table, when a new intersection is obtained in the process of subdividing the curve, the data structure needs to be updated according to the information of the intersection. First, the storage address and the number of Y nodes of the Y node information table of the corresponding vertical row are obtained in the data structure according to the X coordinate of the intersection.

[0057] Specifically, all Y node information in the Y node information table is read in the Y node information table according to the address of the read Y node information table and the number of Y nodes. Among them, the Y node information can be read according to the bit width of the Y node, and the X node information can also be read according to the preset Y node cutoff mark. The reading method is not specifically limited. All methods that can accurately read the Y node information are within the protection scope of the present invention. In one embodiment of the present invention, the bit width of the Y node in the data structure can be customized, and when the maximum number of sub-positions in the Y node information is determined, it is a fixed value.

[0058] Specifically, the intersection information includes an X coordinate, a Y coordinate, sub-position information and filling information. The intersection information and the read Y node information are compared one by one, and the Y node on the Y node information table of the horizontal row corresponding to the X coordinate is updated or added according to the comparison result. When the data structure includes a Y node content table and a Y node information table, when the Y coordinate of the intersection information and the Y coordinate in the read Y node information are not equal, a Y node is added to the corresponding position of the Y node information table, and the number of Y nodes in the Y node content table is updated at the same time, then according to the Y coordinate of the intersection and the coordinate sorting of the existing Y nodes in the Y node information table, a Y node is added to the corresponding position of the Y node information table, the corresponding Y node information is stored according to the intersection information, and the number of Y nodes in the Y node content table is updated at the same time, that is, the number of Y nodes is increased by 1. When the Y coordinate of the intersection information is the same as a certain Y coordinate in the read Y node information, it indicates that the position of the new intersection obtained has been crossed by a vector line before, and the Y node information corresponding to the Y coordinate is updated according to the intersection information.

[0059] like Figure 3 As shown, in one embodiment, the subdivision curve data processing system in the vector graphics processing device of the present invention includes a construction module 31, an X-node processing module 32 and a Y-node processing module 33.

[0060] The construction module 31 is used to construct a data structure in the memory, the data structure including an X-node content table and an X-node information table or including a Y-node content table and a Y-node information table; the X-node content table is used to store the address of the information table corresponding to each horizontal row in the memory and the number of X nodes in the information table, and the X-node information table is used to store the X-node information contained in the information table corresponding to the horizontal row; the Y-node content table is used to store the address of the information table corresponding to each vertical row in the memory and the number of Y nodes in the information table, and the Y-node content table is used to store the Y-node information contained in the information table corresponding to the vertical row.

[0061] The X-node processing module 32 is connected to the construction module 31, and is used for, when the data structure includes an X-node content table and an X-node information table, and a new intersection is generated by subdividing the curve, reading the address of the corresponding information table and the number of X-nodes in the content table according to the horizontal row corresponding to the Y coordinate of the intersection; reading the corresponding X-node information in the memory according to the address of the read information table and the number of X-nodes; comparing the intersection information with the read X-node information, and updating or adding an X-node in the information table of the horizontal row corresponding to the Y coordinate.

[0062] The Y-node processing module 33 is connected to the construction module 31, and is used for, when the data structure includes a Y-node content table and a Y-node information table, and a new intersection is generated by subdividing the curve, reading the address of the corresponding information table and the number of Y nodes in the content table according to the vertical row corresponding to the X-coordinate of the intersection; reading the corresponding Y-node information in the memory according to the address of the read information table and the number of Y nodes; comparing the intersection information with the read Y-node information, and updating or adding the Y node on the information table of the vertical row corresponding to the X-coordinate.

[0063] The structures and principles of the construction module 31, the X-node processing module 32 and the Y-node processing module 33 correspond to the steps in the subdivision curve data processing method in the above-mentioned vector graphics processing device, and thus will not be described in detail here.

[0064] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the x module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0065] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0066] The storage medium of the present invention stores a computer program, and when the computer program is executed by the processor, the subdivision curve data processing method in the above-mentioned vector graphics processing device is implemented. Preferably, the storage medium includes: ROM, RAM, disk, U disk, memory card or CD and other media that can store program codes.

[0067] like Figure 4 As shown, in one embodiment, the vector graphics processing device of the present invention includes: a processor 41 and a memory 42 .

[0068] The memory 42 is used to store computer programs.

[0069] The memory 42 includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.

[0070] The processor 41 is connected to the memory 42 and is used to execute the computer program stored in the memory 42 so that the vector graphics processing device executes the above-mentioned subdivision curve data processing method in the vector graphics processing device.

[0071] Preferably, the processor 41 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0072] In summary, the subdivision curve data processing method, system, medium and vector graphics processing device of the present invention save only the filling and position information of the valid intersection points generated by the subdivision curve instead of saving the filling and position information of all pixels of the entire vector graphics through the sorting algorithm based on the horizontal coordinate / vertical coordinate, which effectively reduces the demand for memory resources; it can directly fill the vector graphics in sequence according to the saved intersection information, thereby avoiding the search time of the intersection, effectively reducing the system bandwidth, and improving the performance of vector graphics rendering. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.

[0073] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for processing subdivision curve data in a vector graphics processing device, characterized in that: The following steps are involved: Constructing a data structure in a memory, the data structure comprising an X-node content table and an X-node information table or comprising a Y-node content table and a Y-node information table; the X-node content table is used to store the address of the information table corresponding to each horizontal row in the memory and the number of X nodes in the information table, and the X-node information table is used to store the X-node information contained in the information table corresponding to the horizontal row; the Y-node content table is used to store the address of the information table corresponding to each vertical row in the memory and the number of Y nodes in the information table, and the Y-node content table is used to store the Y-node information contained in the information table corresponding to the vertical row; When the data structure includes an X-node content table and an X-node information table, when a vector line generated by the subdivided curve intersects with an X-row to obtain a new intersection point, an address of a corresponding information table and the number of X-nodes are read from the content table according to a horizontal row corresponding to a Y coordinate of the intersection point; and corresponding X-node information is read from the memory according to the address of the read information table and the number of X-nodes; Compare the intersection information with the read X node information, and update or add the X node in the information table of the horizontal row corresponding to the Y coordinate; When the data structure includes a Y-node content table and a Y-node information table, when a vector line generated by the subdivided curve intersects with a Y row to obtain a new intersection point, an address of a corresponding information table and the number of Y nodes are read from the content table according to a vertical row corresponding to an X-coordinate of the intersection point; and corresponding Y-node information is read from the memory according to the address of the read information table and the number of Y nodes; The intersection information is compared with the read Y node information, and the Y node is updated or added to the information table of the vertical row corresponding to the X coordinate.

2. The method for processing subdivision curve data in a vector graphics processing device according to claim 1, characterized in that: The X node information includes the X coordinate of the intersection, filling information, the number of sub-positions and sub-position information; the Y node information includes the Y coordinate of the intersection, filling information, the number of sub-positions and sub-position information; the intersection information includes the X coordinate, the Y coordinate, the sub-position information and the filling information.

3. The method for processing subdivision curve data in a vector graphics processing device according to claim 2, characterized in that: The number of the sub-positions can be customized; the number of the sub-positions is not a fixed value, and all sub-position information of the X node can be stored.

4. The method for processing subdivision curve data in a vector graphics processing device according to claim 1, characterized in that: When the data structure includes an X-node content table and an X-node information table, and the X-coordinate of the intersection information is not equal to the X-coordinate in the read X-node information, an X-node is added to the corresponding position of the X-node information table, and the number of X-nodes in the X-node content table is updated; When the data structure includes a Y node content table and a Y node information table, and the Y coordinate of the intersection information is not equal to the Y coordinate in the read Y node information, a Y node is added to the corresponding position of the Y node information table, and the number of Y nodes in the Y node content table is updated.

5. The method for processing subdivision curve data in a vector graphics processing device according to claim 1, characterized in that: When the data structure includes an X-node content table and an X-node information table, and the X-coordinate of the intersection information is the same as a certain X-coordinate in the read X-node information, updating the X-node information corresponding to the X-coordinate; When the data structure includes a Y node content table and a Y node information table, when the Y coordinate of the intersection information is the same as a certain Y coordinate in the read Y node information, the X node information corresponding to the Y coordinate is updated.

6. The method for processing subdivision curve data in a vector graphics processing device according to claim 1, characterized in that: In the X-node information table, each X-node is sequentially sorted according to the corresponding X-coordinate; in the Y-node information table, each Y-node is sequentially sorted according to the corresponding Y-coordinate.

7. The method for processing subdivision curve data in a vector graphics processing device according to claim 1, characterized in that: The bit width of the X node in the data structure can be customized, and is a fixed value when the maximum number of sub-positions in the X node information is determined; the bit width of the Y node in the data structure can be customized, and is a fixed value when the maximum number of sub-positions in the Y node information is determined.

8. A subdivision curve data processing system in a vector graphics processing device, characterized in that: It includes a construction module, an X-node processing module and a Y-node processing module; The construction module is used to construct a data structure in the memory, the data structure including an X-node content table and an X-node information table or including a Y-node content table and a Y-node information table; the X-node content table is used to store the address of the information table corresponding to each horizontal row in the memory and the number of X nodes in the information table, and the X-node information table is used to store the X-node information contained in the information table corresponding to the horizontal row; the Y-node content table is used to store the address of the information table corresponding to each vertical row in the memory and the number of Y nodes in the information table, and the Y-node content table is used to store the Y-node information contained in the information table corresponding to the vertical row; The X-node processing module is used for, when the data structure includes an X-node content table and an X-node information table, and a vector line generated by the subdivided curve intersects with an X-row to obtain a new intersection point, reading the address of the corresponding information table and the number of X-nodes in the content table according to the horizontal row corresponding to the Y coordinate of the intersection point; and reading the corresponding X-node information in the memory according to the address of the read information table and the number of X-nodes; Compare the intersection information with the read X node information, and update or add the X node in the information table of the horizontal row corresponding to the Y coordinate; The Y node processing module is used for, when the data structure includes a Y node content table and a Y node information table, and a vector line generated by the subdivided curve intersects with a Y row to obtain a new intersection point, reading the address of the corresponding information table and the number of Y nodes in the content table according to the vertical row corresponding to the X coordinate of the intersection point; and reading the corresponding Y node information in the memory according to the address of the read information table and the number of Y nodes; The intersection information is compared with the read Y node information, and the Y node is updated or added to the information table of the vertical row corresponding to the X coordinate.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the subdivision curve data processing method in the vector graphics processing device according to any one of claims 1 to 7 is implemented.

10. A vector graphics processing device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory, so that the vector graphics processing device executes the subdivision curve data processing method in the vector graphics processing device according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • OpenFL drawing vector graph processing method and device and electronic equipment

    CN111260750A

  • A rasterizer for 2d vector graphics and method

    KR1020100052850A