CN113052943A - Vector graph drawing method and device, computer equipment and storage medium - Google Patents

Vector graph drawing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113052943A
CN113052943A CN202110384281.5A CN202110384281A CN113052943A CN 113052943 A CN113052943 A CN 113052943A CN 202110384281 A CN202110384281 A CN 202110384281A CN 113052943 A CN113052943 A CN 113052943A
Authority
CN
China
Prior art keywords
connection
edge
current
vector
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110384281.5A
Other languages
Chinese (zh)
Inventor
岳泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Pixso Technology Co ltd
Original Assignee
Shenzhen Yitu Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yitu Software Co ltd filed Critical Shenzhen Yitu Software Co ltd
Priority to CN202110384281.5A priority Critical patent/CN113052943A/en
Publication of CN113052943A publication Critical patent/CN113052943A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The embodiment of the invention discloses a vector graph drawing method, a vector graph drawing device, computer equipment and a storage medium. Initializing the access state of all connection points and connection edges of the vector grid structure; constructing a connecting edge index of each connecting point; traversing all the connection edges in the connection edge indexes and obtaining drawing link indexes; and drawing the path according to the drawing link index to obtain a vector graph. The embodiment of the invention realizes reasonable output of the drawing path by constructing the drawing path of the vector grid structure, and has the advantage of improving the display effect of the vector graphics.

Description

Vector graph drawing method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the field of computer drawing, in particular to a vector graph drawing method, a vector graph drawing device, computer equipment and a storage medium.
Background
Currently, in the field of computer graphics, the following patterning methods are mainly available: the vector graph is drawn by a mathematical method, and for the composition method, whether a graph path is closed or not is depended on during composition, particularly when the vector graph of a mesh structure is drawn, attributes at connecting points can be lost for non-closed paths, and for closed paths, when one connecting point corresponds to a plurality of connecting edges, correct drawing effect cannot be guaranteed.
Disclosure of Invention
The embodiment of the invention aims to provide a vector graph drawing method, a vector graph drawing device, computer equipment and a storage medium, and aims to solve the problem that connection attributes are lost or effect errors are generated at connection points of vector graphs when vector graphs of a mesh structure are drawn in the prior art.
In a first aspect, an embodiment of the present invention provides a vector graphics rendering method based on a grid structure, including:
initializing the access states of all connection points and connection edges of the vector grid structure;
constructing a connecting edge index of each connecting point;
traversing all the connecting edges in the connecting edge index and obtaining a drawing link index;
and drawing a path according to the drawing link index to obtain a vector graph.
In a second aspect, an embodiment of the present invention provides a vector shape drawing apparatus based on a mesh structure, including:
the initialization unit is used for initializing the access states of all the connection points and connection edges of the vector grid structure;
the construction unit is used for constructing a connection edge index of each connection point;
the acquisition unit is used for traversing all the connecting edges in the connecting edge index and obtaining a drawing link index;
and the drawing unit is used for drawing the path according to the drawing link index to obtain a vector graph.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for drawing a vector shape based on a mesh structure according to the first aspect when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the method for rendering a vector shape based on a mesh structure according to the first aspect.
The embodiment of the invention discloses a vector graph drawing method, a vector graph drawing device, computer equipment and a storage medium. Initializing the access state of all connection points and connection edges of the vector grid structure; constructing a connecting edge index of each connecting point; traversing all the connecting edges in the connecting edge index and obtaining a drawing link index; and drawing a path according to the drawing link index to obtain a vector graph. The embodiment of the invention realizes reasonable output of the drawing path by constructing the drawing path of the vector grid structure, and has the advantage of improving the display effect of the vector graphics.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a vector graphics rendering method based on a grid structure according to an embodiment of the present invention;
fig. 2 is a schematic sub-flow diagram of a vector graphics rendering method based on a grid structure according to an embodiment of the present invention;
fig. 3 is a schematic view of another sub-flow of a vector graphics rendering method based on a grid structure according to an embodiment of the present invention;
fig. 4 is a schematic view of another sub-flow of a vector graphics rendering method based on a grid structure according to an embodiment of the present invention;
fig. 5 is a schematic view of another sub-flow of a vector graphics rendering method based on a grid structure according to an embodiment of the present invention;
FIG. 6 is an exemplary diagram of line drawing at a connection point provided by an embodiment of the invention;
FIG. 7 is another exemplary diagram of line drawing at a connection point provided by an embodiment of the invention;
FIG. 8 is an exemplary diagram of line drawing at a connection point as provided by the prior art;
FIG. 9 is a comparison graph of line drawings at the connection point of FIG. 8 for improvement provided by embodiments of the present invention;
fig. 10 is a schematic block diagram of a vector shape drawing apparatus based on a mesh structure according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative effort belong to the protection scope of the embodiments of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention. As used in the description of embodiments of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the description of embodiments of the present invention and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flowchart of a vector shape rendering method based on a mesh structure according to an embodiment of the present invention.
As shown in fig. 1, the method includes steps S101 to S104.
S101, initializing the access states of all connection points and connection edges of the vector grid structure.
In this embodiment, the vector grid structure is a data structure of vector drawing, and is composed of connection points, connection edges, and regions, where the connection points describe position coordinates and some other attributes of the points, the connection edge structure describes which two connection points the connection edge connects, and which connection edges are mathematically used as two access control points of a bezier curve, and the regions specify which connection edges connect to form a closed link; each connection point may be connected to other points by any number of connecting edges to form a unidirectional network.
Initializing access states of all connection points and connection edges in the vector grid structure, wherein the access states comprise an accessed state and an inaccessible state, and initializing all the connection points and the connection edges to be in the inaccessible state so as to conveniently mark drawn positions in the process of drawing a link.
S102, constructing a connection edge index of each connection point; so as to arrange all the connecting edges, and facilitate subsequent selection and drawing.
Specifically, step S102 includes:
and aiming at each connection point, acquiring a connection edge connected with each connection point, collecting all connection edges connected with all connection points, and constructing a connection edge index.
In this embodiment, the number of the connection edges connected to each connection point may be one or more, and the two connection points may connect the same connection edge, so that after all the connection edges connected to all the connection points are collected, the repeated connection edges are screened out, only one connection edge is retained, and then a connection edge index is constructed for all the screened connection edges.
S103, traversing all the connection edges in the connection edge indexes and obtaining drawing link indexes; so as to draw according to the drawing link.
Specifically, as shown in fig. 2, step S103 includes:
s201, selecting a current connecting edge, and accessing a connecting point and the connecting edge along the directions of two ends of the current connecting edge until the construction of a drawing link in the directions of two ends of the current connecting edge is completed;
s202, combining the drawing links in the directions of the two ends of the current connecting edge, and finishing the drawing link of the current connecting edge;
s203, continuously selecting the next connecting edge, constructing the drawing link of the next connecting edge until the drawing links of all the connecting edges are completed, and obtaining the drawing link index according to the drawing links of all the connecting edges.
In the process of drawing a graph, firstly, in the index of the connecting edge, a connecting edge is randomly selected as the current connecting edge, then drawing is started along the directions of two ends of the current connecting edge, and the process of drawing continuously advances to other connecting points and connecting edges until the construction of drawing links in the directions of two ends of the current connecting edge is completed; then combining the drawing links in the directions of the two ends to form a complete and coherent drawing link; and then, randomly selecting a connecting edge with an access state being an unaccessed state from the connecting edge index as a next connecting edge, and starting to draw along the directions of two ends of the next connecting edge according to the same drawing mode until a next complete and coherent drawing link is obtained. And continuously selecting and drawing the remaining drawing links of all the connecting sides in the same mode until the drawing links of all the connecting sides in the connecting side index are finished, and finally obtaining the drawing link index according to the drawing links of all the connecting sides.
In one embodiment, as shown in fig. 3, step S201 includes:
s301, selecting a current connecting edge, and constructing a drawing link based on the current connecting edge;
s302, accessing the connection points at the two ends along the directions of the two ends of the current connection edge, and if the connection point at any end is in an accessed state or the number of the connection edges connected with the connection point at any end is 1, ending the drawing link in the current direction.
In this embodiment, a connecting edge is randomly selected from the connecting edge index as a current connecting edge, a drawing link is constructed based on the current connecting edge, and then the drawing link is continuously drawn.
Specifically, drawing is performed from two end directions of a current connection edge, for any one end direction, a connection point is visited first during drawing, the visiting state of the connection point and the number of connection edges connected with the connection point need to be judged, if the connection point is in the visited state, it is indicated that the connection point has been drawn by other drawing links, and then drawing is performed to generate an overlapping effect; if the number of the connecting sides connected by the connecting point is 1, it indicates that the connecting point is only connected with one side of the current connecting side, which is the end of the drawing, and the drawing in the current direction can be finished when any one of the two conditions is met.
In an embodiment, as shown in fig. 4, step S201 further includes:
s401, accessing connection points at two ends along the directions of the two ends of the current connection edge, and if the connection point at any end is in an unaccessed state and the number of the connection edges connected with the connection point at any end is 2, marking the connection point as an accessed state and advancing to a non-current connection edge connected with the connection point;
s402, judging the access state of the non-current connecting edge, if the non-current connecting edge is in the accessed state, ending the drawing link in the current direction, if the non-current connecting edge is in the unaccessed state, marking the non-current connecting edge as the accessed state, adding the non-current connecting edge into the drawing link, and continuing to move forward to the next connecting point until the drawing link in the current direction is ended.
In this embodiment, a connecting edge is randomly selected from the connecting edge index as a current connecting edge, a drawing link is constructed based on the current connecting edge, and then the drawing link is continuously drawn.
Specifically, drawing is performed from two end directions of a current connection side respectively, for any one end direction, a connection point is visited first during drawing, the visiting state of the connection point and the number of connection sides connected with the connection point need to be judged, if the connection point is in a non-visiting state, it is indicated that the connection point is not drawn, the connection point can be moved forward, and the connection point is marked as a visited state to prevent repetition during subsequent drawing; secondly, if the number of the connecting edges connected by the connecting point is 2 (that is, one edge is the current connecting edge, and the other edge is the non-current connecting edge), the process can be continued to the non-current connecting edge.
Then judging the access state of the non-current connection edge, if the access state is the accessed state, indicating that the drawing link is drawn by other drawing links, and finishing the construction of the drawing link in the current direction; if the current drawing link is in the non-access state, the non-current connection edge is marked as the access state, the non-current connection edge is added into the currently drawn drawing link, and the process of proceeding to the next connection point is continued until the construction of the drawing link in the current direction is finished.
In one embodiment, as shown in fig. 5, step S201 further includes:
s501, accessing connection points at two ends along the directions of the two ends of the current connection edge, and if the connection point at any end is in an unaccessed state and the number of the connection edges connected with the connection points is more than 2, acquiring two connection edges with the largest included angle among the connection edges connected with the connection points;
s502, judging whether one of the two connecting edges is the current connecting edge, and if not, ending the drawing link in the current direction; if so, advancing to the non-current connecting side of the two connecting sides;
s503, judging the access state of the non-current connecting edge, if the non-current connecting edge is in the accessed state, ending the drawing link in the current direction, if the non-current connecting edge is in the unaccessed state, marking the non-current connecting edge as the accessed state, adding the non-current connecting edge into the drawing link, and continuing to move forward to the next connecting point until the drawing link in the current direction is ended.
In this embodiment, a connecting edge is randomly selected from the connecting edge index as a current connecting edge, a drawing link is constructed based on the current connecting edge, and then the drawing link is continuously drawn.
Specifically, drawing is performed from two end directions of a current connection side respectively, for any one end direction, a connection point is visited first during drawing, the visiting state of the connection point and the number of connection sides connected with the connection point need to be judged, if the connection point is in an unaccessed state, it is indicated that the connection point is not drawn, the connection point can be moved forward, and the connection point is marked as an accessed state to prevent repetition during subsequent drawing; secondly, if the number of the connecting edges connected with the connecting point is more than 2, two connecting edges with the largest included angle (less than or equal to 180 degrees) among the connecting edges connected with the connecting point can be obtained; then comparing the indexes of the two connecting edges with the index of the current connecting edge, if the indexes of the two connecting edges are not the same as the index of the current connecting edge, the two connecting edges do not have the current connecting edge, and the construction of the drawing link in the current direction can be finished; if the index of one of the two connected edges is the same as the index of the current connected edge, one of the two connected edges is the current connected edge, and the connected point may be marked as visited and may proceed to a non-current connected edge of the two connected edges.
Judging the access state of the non-current connection edge, if the access state is the accessed state, indicating that the drawing link is drawn by other drawing links, and finishing the construction of the drawing link in the current direction; if the current drawing link is in the non-access state, the non-current connection edge is marked as the access state, the non-current connection edge is added into the currently drawn drawing link, and the process of proceeding to the next connection point is continued until the construction of the drawing link in the current direction is finished.
Further, as shown in fig. 6 and 7, the key point of this embodiment lies in ensuring the line drawing effect at the connection point, and for a single connection point, a path drawing sequence passing through the connection point needs to be found, for example, if there are three connection edges a, b, and c passing through the same line width of the single connection point, two connection edges with the largest included angle among the connection edges connected to the connection point need to be obtained, and then it is continuously determined whether one of the connection edges is the current connection edge, and if one of the connection edges is the current connection edge, the connection edge is advanced to a non-current connection edge, so the line drawing effect at the connection point is better, and the principle is as follows:
the maximum included angle between a and b is only set as follows:
in the first case: a. the included angle between b is an acute angle, the line width is the same, the circle in the figure shows that the line c rotates around the connecting point, the track circle formed by the outline vertex is tangent to the outline of a and b, and the line outline vertex of c at the connecting position cannot exceed the outline range of a and b because the included angle between a and b is the maximum.
In the first case: a. the included angle between b is obtuse angle, the line width is the same, the circle in the figure shows that the line c rotates around the connecting point, the track circle formed by the outline vertex is tangent with the outline of a and b, the line outline vertex of c at the connecting position does not exceed the outline range of a and b because the included angle between a and b is the maximum, and the intersection point of the outline of a and b is always in the outline range of c.
By selecting two connecting edges with the largest included angle to form a continuous drawing sequence, the drawing effect at the connecting point can be ensured.
Further, referring to the comparison between the effects of fig. 8 and fig. 9, the drawing order of fig. 8 is { a- > c }, { b }; the drawing order of fig. 9 is { a- > c }, { b }; therefore, two connecting edges with the largest included angle are selected to form a continuous drawing sequence, and the line drawing effect at the connecting point can be guaranteed.
And S104, performing path drawing according to the drawing link index to obtain a vector graph.
Specifically, step S104 includes:
and performing path drawing on each drawing link in the drawing link index to form a plurality of vector lines, and constructing a vector graph according to all the vector lines.
In this embodiment, after traversing all the connecting edges and obtaining the drawing link indexes, path drawing is performed on each drawing link to obtain a corresponding vector line, and a vector graph can be constructed by combining all the vector lines of all the drawing links.
The embodiment of the invention also provides a vector shape drawing device based on the grid structure, which is used for executing any embodiment of the vector graphic drawing method based on the grid structure. Specifically, referring to fig. 10, fig. 10 is a schematic block diagram of a vector shape drawing apparatus based on a mesh structure according to an embodiment of the present invention.
As shown in fig. 10, the vector shape drawing apparatus 1000 based on a mesh structure includes: an initialization unit 1001, a construction unit 1002, an acquisition unit 1003, and a rendering unit 1004.
An initialization unit 1001 configured to initialize access states of all connection points and connection edges of the vector mesh structure;
a constructing unit 1002, configured to construct a connection edge index of each connection point;
an obtaining unit 1003, configured to traverse all connection edges in the connection edge index and obtain a drawing link index;
and a drawing unit 1004 for performing path drawing according to the drawing link index to obtain a vector graph.
In an embodiment, the building unit 1002 includes:
and the connection edge index construction unit is used for acquiring the connection edge connected with each connection point aiming at each connection point, gathering all the connection edges connected with all the connection points and constructing a connection edge index.
In an embodiment, the obtaining unit 1003 includes:
the first selection unit is used for selecting the current connection edge, accessing the connection point and the connection edge along the directions of the two ends of the current connection edge until the construction of the drawing link in the directions of the two ends of the current connection edge is completed;
a merging unit, configured to merge drawing links in directions of two ends of a current connection edge, and end the drawing link of the current connection edge;
and the second selection unit is used for continuously selecting the next connecting edge and constructing the drawing link of the next connecting edge until the drawing links of all the connecting edges are completed, and obtaining the drawing link index according to the drawing links of all the connecting edges.
In one embodiment, the first selecting unit includes:
the current construction unit is used for selecting a current connecting edge and constructing a drawing link based on the current connecting edge;
and the current drawing unit is used for accessing the connection points at the two ends along the directions of the two ends of the current connection edge, and ending the drawing link in the current direction if the connection point at any end is in an accessed state or the number of the connection edges connected with the connection point at any end is 1.
In an embodiment, the first selecting unit further includes:
a first forwarding unit, configured to access connection points at two ends along directions of two ends of a current connection edge, and if a connection point at any one end is in an unaccessed state and the number of connection edges connected to the connection point at any one end is 2, mark the connection point as an accessed state and forward the connection point to a non-current connection edge connected to the connection point;
and the first judgment unit is used for judging the access state of the non-current connecting edge, ending the drawing link in the current direction if the non-current connecting edge is in the accessed state, marking the non-current connecting edge as the accessed state and adding the non-current connecting edge into the drawing link if the non-current connecting edge is in the unaccessed state, and continuing to move forward to the next connecting point until the drawing link in the current direction is ended.
In an embodiment, the first selecting unit further includes:
a second judging unit, configured to access connection points at two ends along directions of two ends of a current connection edge, and if a connection point at any one end is in an unaccessed state and the number of connection edges connected to the connection point is greater than 2, obtain two connection edges with the largest included angle among the connection edges connected to the connection point;
a third judging unit, configured to judge whether one of the two connecting edges is a current connecting edge, and if not, end the drawing link in the current direction; if so, advancing to the non-current connecting side of the two connecting sides;
and the fourth judging unit is used for judging the access state of the non-current connecting edge, ending the drawing link in the current direction if the non-current connecting edge is in the accessed state, marking the non-current connecting edge as the accessed state and adding the non-current connecting edge into the drawing link if the non-current connecting edge is in the unaccessed state, and continuing to move forward to the next connecting point until the drawing link in the current direction is ended.
In an embodiment, the rendering unit 1004 further includes:
and the path drawing unit is used for drawing paths of each drawing link in the drawing link index to form a plurality of vector lines and constructing a vector graph according to all the vector lines.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the vector graphics drawing method based on the grid structure is realized when the processor executes the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the vector graphics drawing method based on the grid structure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
While the embodiments of the present invention have been described with reference to the accompanying drawings, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A vector graphics drawing method based on a grid structure is characterized by comprising the following steps:
initializing the access states of all connection points and connection edges of the vector grid structure;
constructing a connecting edge index of each connecting point;
traversing all the connecting edges in the connecting edge index and obtaining a drawing link index;
and drawing a path according to the drawing link index to obtain a vector graph.
2. The vector graphics rendering method based on mesh structure as claimed in claim 1, wherein said constructing the connection edge index of each of said connection points comprises:
and aiming at each connection point, acquiring a connection edge connected with each connection point, collecting all connection edges connected with all connection points, and constructing a connection edge index.
3. The vector graphics rendering method based on mesh structure of claim 1, wherein said traversing all the connected edges in the connected edge index and obtaining the rendering link index comprises:
selecting a current connecting edge, and accessing the connecting point and the connecting edge along the directions of two ends of the current connecting edge until the construction of drawing links in the directions of two ends of the current connecting edge is completed;
combining the drawing links in the directions of the two ends of the current connecting edge, and finishing the drawing link of the current connecting edge;
and continuously selecting the next connecting edge, constructing the drawing link of the next connecting edge until the drawing links of all the connecting edges are completed, and obtaining a drawing link index according to the drawing links of all the connecting edges.
4. The method for drawing vector graphics based on a mesh structure according to claim 3, wherein the selecting a current connection edge, and accessing the connection point and the connection edge along directions of both ends of the current connection edge until completing construction of a drawing link in the directions of both ends comprises:
selecting the current connecting edge, and constructing a drawing link based on the current connecting edge;
and accessing the connection points at the two ends along the directions of the two ends of the current connection edge, and if the connection point at any end is in an accessed state or the number of the connection edges connected with the connection point at any end is 1, ending the drawing link in the current direction.
5. The method for drawing vector graphics based on a mesh structure according to claim 3, wherein the selecting a current connection edge, accessing the connection point and the connection edge along directions of both ends of the current connection edge until the construction of the drawing links in the directions of both ends is completed, further comprises:
accessing the connection points at two ends along the directions of two ends of the current connection edge, if the connection point at any end is in an unaccessed state and the number of the connection edges connected with the connection point at any end is 2, marking the connection point as an accessed state and advancing to the non-current connection edge connected with the connection point;
and judging the access state of the non-current connecting edge, if the non-current connecting edge is in the accessed state, ending the drawing link in the current direction, if the non-current connecting edge is in the non-accessed state, marking the non-current connecting edge as the accessed state, adding the non-current connecting edge into the drawing link, and continuing to move to the next connecting point until the drawing link in the current direction is ended.
6. The method for drawing vector graphics based on a mesh structure according to claim 3, wherein the selecting a current connection edge, accessing the connection point and the connection edge along directions of both ends of the current connection edge until the construction of the drawing links in the directions of both ends is completed, further comprises:
accessing connection points at two ends along the directions of the two ends of the current connection edge, and if the connection point at any end is in an unaccessed state and the number of the connection edges connected with the connection points is more than 2, acquiring two connection edges with the largest included angle in the connection edges connected with the connection points;
judging whether one of the two connecting edges is the current connecting edge, if not, finishing the drawing link in the current direction; if so, advancing to a non-current connecting side of the two connecting sides;
and judging the access state of the non-current connecting edge, if the non-current connecting edge is in the accessed state, ending the drawing link in the current direction, if the non-current connecting edge is in the non-accessed state, marking the non-current connecting edge as the accessed state, adding the non-current connecting edge into the drawing link, and continuing to move to the next connecting point until the drawing link in the current direction is ended.
7. The vector graphics rendering method based on mesh structure as claimed in claim 1, wherein said performing path rendering according to said rendering link index to obtain vector graphics comprises:
and performing path drawing on each drawing link in the drawing link index to form a plurality of vector lines, and constructing a vector graph according to all the vector lines.
8. A vector shape drawing apparatus based on a mesh structure, comprising:
the initialization unit is used for initializing the access states of all the connection points and connection edges of the vector grid structure;
the construction unit is used for constructing a connection edge index of each connection point;
the acquisition unit is used for traversing all the connecting edges in the connecting edge index and obtaining a drawing link index;
and the drawing unit is used for drawing the path according to the drawing link index to obtain a vector graph.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the grid structure based vector graphics rendering method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the method of rendering vector graphics based on a mesh structure according to any one of claims 1 to 7.
CN202110384281.5A 2021-04-09 2021-04-09 Vector graph drawing method and device, computer equipment and storage medium Pending CN113052943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110384281.5A CN113052943A (en) 2021-04-09 2021-04-09 Vector graph drawing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110384281.5A CN113052943A (en) 2021-04-09 2021-04-09 Vector graph drawing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113052943A true CN113052943A (en) 2021-06-29

Family

ID=76518940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110384281.5A Pending CN113052943A (en) 2021-04-09 2021-04-09 Vector graph drawing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113052943A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113421316A (en) * 2021-06-30 2021-09-21 亿图软件(湖南)有限公司 Connection line path construction method and device, computer equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6459431B1 (en) * 1998-08-28 2002-10-01 Canon Kabushiki Kaisha Method and apparatus for orientating a set of finite n-dimensional space curves
US20100271374A1 (en) * 2009-04-27 2010-10-28 Research In Motion Limited Conversion of swf shape definitions for vector graphics rendering
CN107562779A (en) * 2017-07-21 2018-01-09 浙江科澜信息技术有限公司 A kind of space topological processing method of two-dimensional vector polygon self intersection
CN109559369A (en) * 2018-12-04 2019-04-02 中国科学院地理科学与资源研究所 It is a kind of towards the ocean current vector field visualization method based on angleonly tracking for flowing to feature

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6459431B1 (en) * 1998-08-28 2002-10-01 Canon Kabushiki Kaisha Method and apparatus for orientating a set of finite n-dimensional space curves
US20100271374A1 (en) * 2009-04-27 2010-10-28 Research In Motion Limited Conversion of swf shape definitions for vector graphics rendering
CN107562779A (en) * 2017-07-21 2018-01-09 浙江科澜信息技术有限公司 A kind of space topological processing method of two-dimensional vector polygon self intersection
CN109559369A (en) * 2018-12-04 2019-04-02 中国科学院地理科学与资源研究所 It is a kind of towards the ocean current vector field visualization method based on angleonly tracking for flowing to feature

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113421316A (en) * 2021-06-30 2021-09-21 亿图软件(湖南)有限公司 Connection line path construction method and device, computer equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN106964156B (en) Path finding method and device
US10824166B2 (en) Methods and systems of distributing task regions for a plurality of cleaning devices
JP2008186440A (en) Topology evolution optimization computing method for structural design
US10345482B2 (en) Global grid building unfaulting sequence for complex fault-network topologies
CN110544255B (en) Method and system for segmenting triangular mesh holes for 3D printing
CN113052943A (en) Vector graph drawing method and device, computer equipment and storage medium
CN111736745B (en) Stroke erasing method, device, equipment and readable storage medium
CN113190719A (en) Node grouping method and device and electronic equipment
CN116772846A (en) Unmanned aerial vehicle track planning method, unmanned aerial vehicle track planning device, unmanned aerial vehicle track planning equipment and unmanned aerial vehicle track planning medium
CN112001987B (en) Polygonal clipping method and device, electronic equipment and storage medium
CN115779424A (en) Navigation grid path finding method, device, equipment and medium
CN114089770B (en) Inspection point position generation method and related device for substation inspection robot
CN110399679B (en) Foundation position optimization design method
KR20180117499A (en) Apparatus and method for simplification of 3D mesh data
US10424096B1 (en) Technique for orthogonal edge routing of directed layered graphs with edge crossings reduction
Nagamochi et al. Augmenting Edge-Connectivity over the Entire Range inÕ (nm) Time
CN103646412B (en) Wide line describing method and device
CN113066148B (en) Map data processing method, device, equipment and storage medium
CN110727755B (en) Terrain shape regularization method, electronic device and storage medium
CN114070744B (en) Node coordinate generation method, device, equipment and medium of network topology
JPH07200664A (en) Drawing paint-out method
CN112116680B (en) Non-self-intersecting polygon drawing method, device and storage medium
CN113256759B (en) Unmanned distribution vehicle driving map updating method and device, distribution vehicle and storage medium
CN114820954B (en) Three-dimensional reconstruction method and device, electronic equipment and storage medium
CN113538627B (en) Map description file generation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240131

Address after: 518000, Building 3-2-9B, Yongjingwan, No. 48 Airong Road, Shekou, Wenzhuyuan Community, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Pixso Technology Co.,Ltd.

Country or region after: China

Address before: 518000 a1204, building 11, Shenzhen Bay science and technology ecological park, No.16, Keji South Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Yitu Software Co.,Ltd.

Country or region before: China