Summary of the invention
The embodiment of the invention provides a kind of vertex edit method and devices, when solving the vertex of editing graph, vertex
Whether the relationship that position can only be compared between vertex and vertex when adjusting by naked eyes is appropriate, such as if desired by the transverse direction of A point
Aligned in position to A point, can only by visually judging whether to be aligned, the technical issues of the inexactness of caused editing graph,
Increase experience property.
A kind of vertex edit method provided in an embodiment of the present invention, comprising:
Judge in looping through process at a distance from the vertex traversed and the vertex chosen whether in preset pixel, if
It is that the starting point of vertex auxiliary line is then set for the apex coordinate traversed, the apex coordinate that terminal is chosen for described in;
It generates corresponding lateral or longitudinal with the apex coordinate traversed and the apex coordinate chosen
The vertex auxiliary line.
Preferably, judge the vertex traversed in looping through process at a distance from the vertex chosen whether in preset picture
In element, if so, the starting point of setting vertex auxiliary line is the apex coordinate traversed, terminal is that the vertex chosen is sat
Mark specifically includes:
Judge in looping through process the vertex abscissa that traverses at a distance from the vertex abscissa chosen whether
In preset pixel, if so, the starting point that the vertex auxiliary line is arranged is the vertex ordinate traversed, terminal is described
The vertex ordinate chosen.
Preferably, judge the vertex abscissa traversed in looping through process at a distance from the vertex abscissa chosen
Whether in preset pixel, if so, the starting point that the vertex auxiliary line is arranged is the vertex ordinate traversed, terminal
It is specifically included for the vertex ordinate chosen:
Judge be at a distance from the vertex abscissa that traverses is chosen with interface in looping through process vertex abscissa
It is no in preset pixel, if so, the starting point that the vertex auxiliary line is arranged is the vertex ordinate traversed, terminal is
The vertex ordinate chosen, and ordinate judgment step is triggered, if it is not, then triggering the ordinate judgment step;
The triggering ordinate judgment step is to judge the vertex ordinate traversed in looping through process and choose
Vertex ordinate distance whether in the preset pixel, if so, the starting point that the vertex auxiliary line is arranged is described
The vertex abscissa traversed, terminal are the vertex abscissa chosen.
Preferably, judge the vertex traversed in looping through process at a distance from the vertex chosen whether in preset picture
In element, if so, the starting point of setting vertex auxiliary line is the apex coordinate traversed, terminal is that the vertex chosen is sat
Before mark further include:
Vertex edit instruction is obtained, and enters vertex circulation process;
Judge whether the vertex being recycled to is selected state, if it is not, then carrying out next step.
Preferably, the preset pixel is 5 pixels.
A kind of vertex edit device provided in the embodiment of the present invention, comprising:
Judging unit, for judge in looping through process the vertex that traverses at a distance from the vertex chosen whether
In preset pixel, if so, the starting point of setting vertex auxiliary line is the apex coordinate traversed, terminal is described to be chosen
Apex coordinate;
Generation unit, for generating cross corresponding with the apex coordinate traversed and the apex coordinate chosen
To or the longitudinal vertex auxiliary line.
Preferably, the judging unit specifically includes:
Judgment sub-unit, the horizontal seat in vertex for judging the vertex abscissa traversed in looping through process with choosing
Whether target distance is in preset pixel, if so, the starting point that the vertex auxiliary line is arranged is that the vertex traversed is vertical
Coordinate, terminal are the vertex ordinate chosen.
Preferably, judgment sub-unit, specifically for the vertex abscissa for judging to traverse in looping through process and boundary
Whether the distance for the vertex abscissa that face is chosen is in preset pixel, if so, the starting point of the vertex auxiliary line is arranged as institute
The vertex ordinate traversed is stated, terminal is the vertex ordinate chosen, and triggers ordinate judgment step, if it is not, then
Trigger the ordinate judgment step;
The triggering ordinate judgment step is to judge the vertex ordinate traversed in looping through process and choose
Vertex ordinate distance whether in the preset pixel, if so, the starting point that the vertex auxiliary line is arranged is described
The vertex abscissa traversed, terminal are the vertex abscissa chosen.
Preferably, the vertex edit device further include:
Acquiring unit for obtaining vertex edit instruction, and enters vertex circulation process;
First judging unit, for judging whether the vertex being recycled to is selected state, if it is not, it is single then to trigger the judgement
Member.
Preferably, the preset pixel is 5 pixels.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
The embodiment of the invention provides a kind of vertex edit method and devices, wherein vertex edit method includes: to judge
In searching loop process at a distance from the vertex traversed and the vertex chosen whether in preset pixel, if so, setting vertex
The starting point of auxiliary line is the apex coordinate traversed, and terminal is the apex coordinate chosen;The apex coordinate that generates and traverse and
The corresponding lateral or longitudinal vertex auxiliary line of the apex coordinate chosen.In the present embodiment, looped through by judging
The vertex traversed in process at a distance from the vertex chosen whether in preset pixel, if so, setting vertex auxiliary line
Starting point is the apex coordinate traversed, and terminal is the apex coordinate chosen;The apex coordinate for generating and traversing and the top chosen
The corresponding lateral or longitudinal vertex auxiliary line of point coordinate, when just realizing graphics vertex editor, intelligently according to vertex
Position show auxiliary line corresponding with fixed point, when solving the vertex of editing graph, vertex position adjust when can only pass through meat
Whether the relationship between eye comparison vertex and vertex is appropriate, such as the lateral position of A point is if desired snapped to A point, Zhi Nengtong
It crosses and visually judges whether to be aligned, the technical issues of the inexactness of caused editing graph, increase experience property.
Specific embodiment
The embodiment of the invention provides a kind of vertex edit method and devices, when solving the vertex of editing graph, vertex
Whether the relationship that position can only be compared between vertex and vertex when adjusting by naked eyes is appropriate, such as if desired by the transverse direction of A point
Aligned in position to A point, can only by visually judging whether to be aligned, the technical issues of the inexactness of caused editing graph,
Increase experience property.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention
Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below
Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field
Those of ordinary skill's all other embodiment obtained without making creative work, belongs to protection of the present invention
Range.
Referring to Fig. 1, a kind of one embodiment of the vertex edit method provided in the embodiment of the present invention includes:
101, judge the vertex traversed in looping through process at a distance from the vertex chosen whether in preset pixel
It is interior, if so, thening follow the steps 102;
In the present embodiment, when need opposite vertexes carry out accurate edits, and need automatically generate it is corresponding with vertex position auxiliary
When index contour, need to judge the vertex traversed in looping through process at a distance from the vertex chosen whether in preset pixel
It is interior, if so, thening follow the steps 102.
102, the starting point of vertex auxiliary line is arranged is the apex coordinate traversed, and terminal is the apex coordinate chosen;
When judging that the vertex that traverses is in preset pixel, then at a distance from the vertex chosen in looping through process
Step 102 is executed, the starting point for needing to be arranged vertex auxiliary line is the apex coordinate traversed, and terminal is the apex coordinate chosen.
It should be noted that the vertex above-mentioned that traverse in process that loops through is pre- at a distance from the vertex chosen
Setting can be first vertex looped through in pixel, or the vertex nearest with the vertex chosen.
103, the vertex corresponding lateral or longitudinal with the apex coordinate traversed and the apex coordinate chosen is generated
Auxiliary line.
When the starting point of setting vertex auxiliary line is the apex coordinate traversed, terminal is need after the apex coordinate chosen
Generate the vertex auxiliary line corresponding lateral or longitudinal with the apex coordinate traversed and the apex coordinate chosen.
In the present embodiment, by judge in looping through process the vertex that traverses at a distance from the vertex chosen whether
In preset pixel, if so, the starting point of setting vertex auxiliary line is the apex coordinate traversed, terminal is that the vertex chosen is sat
Mark;The vertex auxiliary line corresponding lateral or longitudinal with the apex coordinate traversed and the apex coordinate chosen is generated, just
When realizing graphics vertex editor, auxiliary line corresponding with fixed point is intelligently shown according to the position on vertex, solves editor's figure
When the vertex of shape, whether the relationship that can only be compared between vertex and vertex by naked eyes when vertex position is adjusted is appropriate, if such as
Need the lateral position by A point to snap to A point, can only by visually judging whether to be aligned, caused editing graph it is not smart
The technical issues of true property, increase experience property.
The above is that the process of opposite vertexes edit methods is described in detail, below will to judge loop through process in
The vertex traversed at a distance from the vertex chosen whether in preset pixel, if so, setting vertex auxiliary line starting point be
The apex coordinate traversed, terminal is that the process for the apex coordinate chosen is described in detail, referring to Fig. 2, the present invention is real
Another embodiment for applying a kind of vertex edit method provided in example includes:
201, vertex edit instruction is obtained, and enters vertex circulation process;
In the present embodiment, when need opposite vertexes carry out accurate edits, and need automatically generate it is corresponding with vertex position auxiliary
When index contour, vertex edit instruction is obtained, and enter vertex circulation process.
202, whether the vertex that judgement is recycled to is selected state, if it is not, thening follow the steps 203;
Vertex edit instruction is obtained, and is entered after the circulation process of vertex, needs to judge whether the vertex being recycled to is choosing
Middle state, if it is not, thening follow the steps 203.
203, judge the vertex abscissa that the vertex abscissa that traverses and interface are chosen in looping through process away from
From whether in preset pixel, if so, 204 are thened follow the steps, if it is not, thening follow the steps 205;
When the vertex for judging to be recycled to is selected state, need to judge the horizontal seat in vertex traversed in looping through process
It marks at a distance from the vertex abscissa that interface is chosen whether in preset pixel, if so, 204 are thened follow the steps, if it is not, then executing
Step 205.
204, the starting point of vertex auxiliary line is arranged is the vertex ordinate traversed, and terminal is the vertex ordinate chosen;
When judging at a distance from the vertex abscissa that traverses is chosen with interface in looping through process vertex ordinate
In preset pixel, the starting point for needing to be arranged vertex auxiliary line is the vertex ordinate traversed, and terminal is the vertex cross chosen
Coordinate.
205, judge the vertex ordinate traversed in looping through process is at a distance from the vertex ordinate chosen
It is no in preset pixel, if so, thening follow the steps 206;
When judging at a distance from the vertex abscissa that traverses is chosen with interface in looping through process vertex abscissa
After not in preset pixel, need to judge the vertex ordinate traversed in looping through process and the vertical seat in the vertex chosen
Whether target distance is in preset pixel, if so, thening follow the steps 206.
206, the starting point of vertex auxiliary line is arranged is the vertex abscissa traversed, and terminal is the vertex abscissa chosen;
When judging in looping through process the vertex ordinate that traverses at a distance from the vertex ordinate chosen pre-
It sets in pixel, then the starting point for needing to be arranged vertex auxiliary line is the vertex abscissa traversed, and terminal is the horizontal seat in vertex chosen
Mark, it should be noted that aforementioned step 205 judges the vertex ordinate traversed in looping through process and the top chosen
The distance of point ordinate then executes step 203 to next vertex not in preset pixel.
207, the vertex corresponding lateral or longitudinal with the apex coordinate traversed and the apex coordinate chosen is generated
Auxiliary line.
When the starting point of the setting vertex auxiliary line of step 204 is the vertex ordinate traversed, terminal is the vertex chosen
The starting point of the setting vertex auxiliary line of ordinate or step 206 is the vertex abscissa traversed, and terminal is the vertex cross chosen
After coordinate, need to generate the vertex corresponding lateral or longitudinal with the apex coordinate traversed and the apex coordinate chosen
Auxiliary line.
In the present embodiment, preset pixel above-mentioned is 5 pixels.
In the present embodiment, by judge in looping through process the vertex that traverses at a distance from the vertex chosen whether
In preset pixel, if so, the starting point of setting vertex auxiliary line is the apex coordinate traversed, terminal is that the vertex chosen is sat
Mark;The vertex auxiliary line corresponding lateral or longitudinal with the apex coordinate traversed and the apex coordinate chosen is generated, just
When realizing graphics vertex editor, auxiliary line corresponding with fixed point is intelligently shown according to the position on vertex, solves editor's figure
When the vertex of shape, whether the relationship that can only be compared between vertex and vertex by naked eyes when vertex position is adjusted is appropriate, if such as
Need the lateral position by A point to snap to A point, can only by visually judging whether to be aligned, caused editing graph it is not smart
The technical issues of true property, increases experience property, meanwhile, the setting to auxiliary line of abscissa and ordinate is further accurate
The function of vertex auxiliary.
Referring to Fig. 3, a kind of one embodiment of the vertex edit device provided in the embodiment of the present invention includes:
Judging unit 301, for judging that the vertex that traverses is at a distance from the vertex chosen in looping through process
It is no in preset pixel, if so, the starting point of triggering the first setting unit 302 setting vertex auxiliary line is that the vertex that traverses is sat
Mark, terminal is the apex coordinate chosen;
Generation unit 303, it is corresponding lateral with the apex coordinate traversed and the apex coordinate chosen for generating
Or longitudinal vertex auxiliary line.
In the present embodiment, the vertex traversed in looping through process and the top chosen are judged by judging unit 301
Whether the distance of point is in preset pixel, if so, the starting point of triggering the first setting unit 302 setting vertex auxiliary line is traversal
The apex coordinate arrived, terminal are the apex coordinate chosen, and generation unit 303 generates and the apex coordinate traversed and the top chosen
The corresponding lateral or longitudinal vertex auxiliary line of point coordinate, when just realizing graphics vertex editor, intelligently according to vertex
Position show auxiliary line corresponding with fixed point, when solving the vertex of editing graph, vertex position adjust when can only pass through meat
Whether the relationship between eye comparison vertex and vertex is appropriate, such as the lateral position of A point is if desired snapped to A point, Zhi Nengtong
It crosses and visually judges whether to be aligned, the technical issues of the inexactness of caused editing graph, increase experience property.
The above is that each unit of opposite vertexes editing device is described in detail, and sub-unit is carried out detailed retouch below
It states, referring to Fig. 4, a kind of one embodiment of the vertex edit device provided in the embodiment of the present invention includes:
Acquiring unit 404 for obtaining vertex edit instruction, and enters vertex circulation process;
First judging unit 405 judges whether the vertex being recycled to is selected state, if it is not, then triggering judging unit
401。
Judging unit 401, for judge non-selected vertex at a distance from the vertex of selection whether in preset pixel, if
It is then to trigger the first setting unit 402 starting point of vertex auxiliary line is arranged as first coordinate on the vertex of selection, terminal is to choose
Vertex coordinate;
Judging unit 401 specifically includes:
Judgment sub-unit 4011, the vertex for judging the vertex abscissa traversed in looping through process with choosing
Whether the distance of abscissa is in preset pixel, if so, the starting point of the first setting unit 402 setting vertex auxiliary line is traversal
The vertex ordinate arrived, terminal are the vertex ordinate chosen.
Judgment sub-unit 4011 above-mentioned, specifically for judge in looping through process the vertex abscissa that traverses with
Whether the distance for the vertex abscissa that interface is chosen is in preset pixel, if so, the first setting unit 402 setting vertex assists
The starting point of line is the vertex ordinate traversed, and terminal is the vertex ordinate chosen, and triggers ordinate judgment step, if
It is no, then trigger ordinate judgment step;
Triggering ordinate judgment step is the top for judging the vertex ordinate traversed in looping through process with choosing
Whether the distance of point ordinate is in preset pixel, if so, the starting point of setting vertex auxiliary line is the horizontal seat in vertex traversed
Mark, terminal is the vertex abscissa chosen.
Generation unit 403, it is corresponding lateral with the apex coordinate traversed and the apex coordinate chosen for generating
Or longitudinal vertex auxiliary line.
Preset pixel above-mentioned is 5 pixels.
In the present embodiment, the vertex traversed in looping through process and the top chosen are judged by judging unit 401
Whether the distance of point is in preset pixel, if so, the starting point of triggering the first setting unit 402 setting vertex auxiliary line is traversal
The apex coordinate arrived, terminal are the apex coordinate chosen, and generation unit 403 generates and the apex coordinate traversed and the top chosen
The corresponding lateral or longitudinal vertex auxiliary line of point coordinate, when just realizing graphics vertex editor, intelligently according to vertex
Position show auxiliary line corresponding with fixed point, when solving the vertex of editing graph, vertex position adjust when can only pass through meat
Whether the relationship between eye comparison vertex and vertex is appropriate, such as the lateral position of A point is if desired snapped to A point, Zhi Nengtong
It crosses and visually judges whether to be aligned, the technical issues of the inexactness of caused editing graph, increase experience property, meanwhile, it is horizontal
The setting to auxiliary line of coordinate and ordinate, the further function of accurate vertex auxiliary.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.