Summary of the invention
Embodiments provide a kind of vertex edit method and device, solve vertex edit mode,
In OFFICE during editing graph summit, vertex position regulation does not translate, directionkeys can not be used to adjust
Save, can not regulate on multiple summits simultaneously, and the summit caused regulates the technical problem that experience property is relatively low.
A kind of vertex edit method that the embodiment of the present invention provides, including:
Get the vertex edit instruction of triggering;
Judge on keyboard trigger push-button type, if multiselect key, then to select summit according to institute
State many selection operations that multiselect key is corresponding, if translation key, then to select summit according to described translation
The translation that key is corresponding, if directionkeys, then to the summit selected according to relative with described directionkeys
The direction answered is moved.
Preferably, the vertex edit instruction getting triggering specifically includes:
Get the instruction of described vertex edit, and enter editing mode;
Extract the keyboard state corresponding with the instruction of described vertex edit.
Preferably, the summit selected is specifically included according to many selection operations corresponding with described multiselect key:
When by mouse trigger summit time, it is judged that whether multiselect key triggers, the most then will select described in
Summit is added in multiselect troop, if it is not, all described summit then removed in described multiselect troop.
Preferably, the summit selected is specifically included according to the translation corresponding with described translation key:
While mouse button triggers, obtain and catch the track that the cursor of mouse moves;
Judge whether described translation key triggers, the most then judge that whether moving direction of cursor is more than longitudinally moving
Dynamic instruction, the most then arranging summit abscissa is cursor abscissa, if it is not, then arrange summit vertical coordinate
For cursor vertical coordinate;
Judge whether described translation key triggers, if it is not, then arranging summit abscissa is described cursor abscissa,
Summit vertical coordinate is described cursor vertical coordinate.
Preferably, the summit selected moved according to the direction corresponding with described directionkeys specifically include:
Judge the type of the described directionkeys triggered, if LeftArrow, then summit abscissa be set and subtract one,
If right direction key, then summit abscissa is set and adds one, if upper directionkeys, then summit vertical coordinate is set
Subtract one, if lower directionkeys, then summit vertical coordinate is set and adds one.
A kind of vertex edit device provided in the embodiment of the present invention, including:
Acquiring unit, for getting the vertex edit instruction of triggering;
First judging unit, for judging the push-button type triggered on keyboard, if multiselect key, then touches
Send out multiselect performance element, if translation key, then trigger translation performance element, if directionkeys, then direction
Performance element;
Described multiselect performance element, is used for the summit selected according to the multiselect corresponding with described multiselect key
Operation;
Described translation performance element, is used for the summit selected according to the translation corresponding with described translation key
Operation;
Described direction performance element, is used for the summit selected according to the direction corresponding with described directionkeys
Mobile
Preferably, described acquiring unit specifically includes:
Obtain subelement, be used for getting the instruction of described vertex edit, and enter editing mode;
Extract subelement, for extracting the keyboard state corresponding with the instruction of described vertex edit.
Preferably, described multiselect performance element specifically includes:
Second judgment sub-unit, for when triggering summit by mouse, it is judged that whether multiselect key triggers,
The most then the described summit selected is added in multiselect troop, if it is not, then remove described multiselect troop
In all described summit.
Preferably, described translation performance element specifically includes:
First obtains subelement, and for obtaining while mouse button triggers, the cursor catching mouse moves
Track;
First judgment sub-unit, is used for judging whether described translation key triggers, the most then judges that cursor moves
Whether dynamic direction is more than vertically moving instruction, the most then arranging summit abscissa is cursor abscissa, if
No, then arranging summit vertical coordinate is cursor vertical coordinate;
Described first judgment sub-unit, is additionally operable to judge whether described translation key triggers, if it is not, then arrange
Summit abscissa is described cursor abscissa, and summit vertical coordinate is described cursor vertical coordinate.
Preferably, described direction performance element specifically includes:
3rd judgment sub-unit, for judging the type of the described directionkeys triggered, if LeftArrow,
Summit abscissa is then set and subtracts one, if right direction key, then summit abscissa is set and adds one, if top
Xiang Jian, then arrange summit vertical coordinate and subtract one, if lower directionkeys, then arranges summit vertical coordinate and adds one.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
Embodiments provide a kind of vertex edit method and device, wherein, vertex edit method bag
Include: get the vertex edit instruction of triggering;Judge the push-button type triggered on keyboard, if multiselect
Key, then to the summit selected according to the many selection operations corresponding with multiselect key, if translation key, then to choosing
The summit selected is according to the translation corresponding with translation key, if directionkeys, then presses the summit selected
Move according to the direction corresponding with directionkeys.In the present embodiment, by judging the button triggered on keyboard
Type, if multiselect key, then to the summit selected according to the many selection operations corresponding with multiselect key, if
Translation key, then to the summit selected according to the translation corresponding with translation key, if directionkeys, then
The summit selected is moved according to the direction corresponding with directionkeys, when just achieving graphics vertex editor,
Triggered the follow-up operation setting of opposite vertexes by keyboard, solve vertex edit mode, at OFFICE
During middle editing graph summit, vertex position regulation does not translate, can not use directionkeys regulation, Bu Nengduo
Individual summit regulates simultaneously, and the summit caused regulates the technical problem that experience property is relatively low.
Detailed description of the invention
Embodiments provide a kind of vertex edit method and device, solve vertex edit mode,
In OFFICE during editing graph summit, vertex position regulation does not translate, directionkeys can not be used to adjust
Save, can not regulate on multiple summits simultaneously, and the summit caused regulates the technical problem that experience property is relatively low.
For making the goal of the invention of the present invention, feature, the advantage can be the most obvious and understandable, below will
In conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground describes, it is clear that the embodiments described below are only a part of embodiment of the present invention, and not all
Embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creativeness
The all other embodiments obtained under work premise, broadly fall into the scope of protection of the invention.
Refer to Fig. 1, an embodiment bag of a kind of vertex edit method provided in the embodiment of the present invention
Include:
101, the vertex edit instruction of triggering is got;
In the present embodiment, when needs opposite vertexes is edited, and carries out vertex operations by keyboard, need
Get the vertex edit instruction of triggering.
102, judge the push-button type triggered on keyboard, if multiselect key, then perform step 103, if
For translation key, then perform step 104, if directionkeys, then perform step 105;
After getting the vertex edit instruction triggered by keyboard, need to judge triggering on keyboard
Push-button type, if multiselect key, then performs step 103, if translation key, then performs step 104, if
For directionkeys, then perform step 105.
103, to the summit selected according to the many selection operations corresponding with multiselect key;
When judge on keyboard trigger push-button type be multiselect key after, need to select summit according to
The many selection operations corresponding with multiselect key.
104, to the summit selected according to the translation corresponding with translation key;
When judge on keyboard trigger push-button type for translation key after, need to selection summit according to
The translation corresponding with translation key.
105, the summit selected is moved according to the direction corresponding with directionkeys.
When judge on keyboard trigger push-button type be directionkeys after, need to select summit according to
The direction corresponding with directionkeys is moved.
In the present embodiment, by judging the push-button type triggered on keyboard, if multiselect key, then to choosing
The summit selected, according to the many selection operations corresponding with multiselect key, if translation key, is then pressed by the summit selected
According to the translation corresponding translation of key, if directionkeys, then to the summit selected according to directionkeys
Corresponding direction is moved, and when just achieving graphics vertex editor, triggers the follow-up of opposite vertexes by keyboard
Operation setting, solve vertex edit mode, in OFFICE during editing graph summit, position, summit
Put regulation not translation, directionkeys can not be used to regulate, can not regulate on multiple summits simultaneously, and cause
The technical problem that summit regulation experience property is relatively low.
The above is that the process of opposite vertexes edit methods is described in detail, and will exist to according to coordinate figure below
The process of the generation that side, summit carries out coordinate figure text box is described in detail, and refers to Fig. 2, the present invention
Another embodiment of a kind of vertex edit method provided in embodiment includes:
201, get vertex edit instruction, and enter editing mode;
In the present embodiment, when needs opposite vertexes is edited, and carries out vertex operations by keyboard, need
Get vertex edit instruction, and enter editing mode.
202, the keyboard state corresponding with vertex edit instruction is extracted;
Get vertex edit instruction, and after entering editing mode, need to extract and instruct with vertex edit
Corresponding keyboard state.
203, judge the push-button type triggered on keyboard, if multiselect key, then perform step 204, if
For translation key, then perform step 207, if directionkeys, then perform step 213;
After getting the vertex edit instruction triggered by keyboard, need to judge triggering on keyboard
Push-button type, if multiselect key, then performs step 204, if translation key, then performs step 207, if
For directionkeys, then perform step 213.
204, when triggering summit by mouse, it is judged that whether multiselect key triggers, the most then perform step
205, if it is not, then perform step 206;
After judging that the push-button type triggered on keyboard is multiselect key, need when triggering summit by mouse
Time, it is judged that whether multiselect key triggers, the most then perform step 205, if it is not, then perform step 206.
205, the summit of selection is added in multiselect troop;
When judging that multiselect key triggers, such as, press multiselect key, then the summit of selection is added to multiselect troop
In.
206, all summits in multiselect troop are removed;
When judging that multiselect key does not triggers, such as, do not press multiselect key, then remove all tops in multiselect troop
Point.
207, while mouse button triggers, obtain and catch the track that the cursor of mouse moves;
After judging that the push-button type triggered on keyboard is as translation key, need while mouse button triggers,
Obtain and catch the track that the cursor of mouse moves.
208, judge to translate whether key triggers, the most then perform step 209, if it is not, then perform step
212;
While triggering at mouse button, after the track that the cursor of acquisition seizure mouse moves, need to sentence
Whether disconnected translation key triggers, the most then perform step 209, if it is not, then perform step 212.
209, judge that moving direction of cursor whether more than vertically moving instruction, the most then performs step 210,
If it is not, then perform step 211;
When judging that translation key triggers, then judge that whether moving direction of cursor is more than vertically moving instruction, if so,
Then perform step 210, if it is not, then perform step 211.
210, arranging summit abscissa is cursor abscissa;
When judging moving direction of cursor more than vertically moving instruction, then arranging summit abscissa is the horizontal seat of cursor
Mark.
211, arranging summit vertical coordinate is cursor vertical coordinate;
When judging that moving direction of cursor no more than vertically moves instruction, then arranging summit vertical coordinate is that cursor is indulged
Coordinate.
212, arranging summit abscissa is cursor abscissa, and summit vertical coordinate is cursor vertical coordinate;
When judging that translation key does not triggers, then arranging summit abscissa is cursor abscissa, and summit vertical coordinate is
Cursor vertical coordinate.
Multiselect key in the present embodiment can be shift or the ctrl key of keyboard, and translation key multiselect key can be
The shift of keyboard, does not specifically limit herein.
213, judge the type of the directionkeys triggered, if LeftArrow, then summit abscissa be set and subtract one,
If right direction key, then summit abscissa is set and adds one, if upper directionkeys, then summit vertical coordinate is set
Subtract one, if lower directionkeys, then summit vertical coordinate is set and adds one.
After judging that the type that vertex edit instructs is Second Type, then judge directionkeys type, if
LeftArrow, then arrange summit abscissa and subtract one, if right direction key, then arranges summit abscissa and adds one,
If upper directionkeys, then summit vertical coordinate is set and subtracts one, if lower directionkeys, then summit vertical coordinate is set
Add one.
In the present embodiment, by judging the push-button type triggered on keyboard, if multiselect key, then to choosing
The summit selected, according to the many selection operations corresponding with multiselect key, if translation key, is then pressed by the summit selected
According to the translation corresponding translation of key, if directionkeys, then to the summit selected according to directionkeys
Corresponding direction is moved, and when just achieving graphics vertex editor, triggers the follow-up of opposite vertexes by keyboard
Operation setting, solve vertex edit mode, in OFFICE during editing graph summit, position, summit
Put regulation not translation, directionkeys can not be used to regulate, can not regulate on multiple summits simultaneously, and cause
The technical problem that summit regulation experience property is relatively low, meanwhile, combines multiselect summit, and according to dissimilar
Carry out corresponding summit to move, it is achieved that the multi-functional operation of vertex edit.
Refer to Fig. 3, an embodiment bag of a kind of vertex edit device provided in the embodiment of the present invention
Include:
Acquiring unit 301, for getting the vertex edit instruction of triggering;
First judging unit 302, for judging the push-button type triggered on keyboard, if multiselect key, then
Trigger multiselect performance element 303, if translation key, then trigger translation performance element 304, if directionkeys,
Then direction performance element 305;
Multiselect performance element 303, is used for the summit selected according to the many selection operations corresponding with multiselect key;
Translation performance element 304, is used for the summit selected according to the translation corresponding with translation key;
Direction performance element 305, for moving according to the direction corresponding with directionkeys the summit selected.
In the present embodiment, judged the push-button type triggered on keyboard by the first judging unit 302, if
For multiselect key, then the multiselect performance element 303 summit to selecting is according to the multiselect behaviour corresponding with multiselect key
Making, if translation key, then the translation performance element 304 summit to selecting is according to corresponding with translation key
Translation, if directionkeys, then direction performance element 305 to select summit according to directionkeys phase
Corresponding direction is moved, and when just achieving graphics vertex editor, triggers the follow-up of opposite vertexes by keyboard
Operation setting, solves vertex edit mode, in OFFICE during editing graph summit, and vertex position
Regulation does not translate, can not use directionkeys regulation, can not regulate on multiple summits simultaneously, and the top caused
The technical problem that some regulation experience property is relatively low.
The above is that each unit of opposite vertexes editing device is described in detail, and is carried out by sub-unit below
Detailed description, refers to Fig. 4, a reality of a kind of vertex edit device provided in the embodiment of the present invention
Execute example to include:
Acquiring unit 401, is instructed for getting the vertex edit triggered by keyboard;
Acquiring unit 401 can further include:
Obtain subelement 4011, be used for getting vertex edit instruction, and enter editing mode;
Extract subelement 4012, for extracting the keyboard commands corresponding with vertex edit instruction.
First judging unit 402, for judging the push-button type triggered on keyboard, if multiselect key, then
Trigger multiselect performance element 403, if translation key, then trigger translation performance element 404, if directionkeys,
Then direction performance element 405;
Multiselect performance element 403, is used for the summit selected according to the many selection operations corresponding with multiselect key;
Multiselect performance element 403 specifically includes:
Second judgment sub-unit, for when triggering summit by mouse, it is judged that whether multiselect key triggers,
The most then the summit of selection is added in multiselect troop, if it is not, then remove owning in multiselect troop
Summit.
Translation performance element 404, is used for the summit selected according to the translation corresponding with translation key;
Translation performance element 404 specifically includes:
First obtains subelement 4041, for obtaining while mouse button triggers, catches the cursor of mouse
The track of movement;
First judgment sub-unit 4042, is used for judging to translate whether key triggers, the most then judges that cursor moves
Whether dynamic direction is more than vertically moving instruction, the most then arranging summit abscissa is cursor abscissa, if
No, then arranging summit vertical coordinate is cursor vertical coordinate;
First judgment sub-unit 4042, is additionally operable to judge to translate whether key triggers, if it is not, then arrange summit
Abscissa is cursor abscissa, and summit vertical coordinate is cursor vertical coordinate.
Direction performance element 405, for moving according to the direction corresponding with directionkeys the summit selected.
Direction performance element 405 specifically includes:
3rd judgment sub-unit 4051, for judging the type of the directionkeys triggered, if LeftArrow,
Summit abscissa is then set and subtracts one, if right direction key, then summit abscissa is set and adds one, if top
Xiang Jian, then arrange summit vertical coordinate and subtract one, if lower directionkeys, then arranges summit vertical coordinate and adds one.
In the present embodiment, judged the push-button type triggered on keyboard by the first judging unit 402, if
For multiselect key, then the multiselect performance element 403 summit to selecting is according to the multiselect behaviour corresponding with multiselect key
Making, if translation key, then the translation performance element 404 summit to selecting is according to corresponding with translation key
Translation, if directionkeys, then direction performance element 405 to select summit according to directionkeys phase
Corresponding direction is moved, and when just achieving graphics vertex editor, triggers the follow-up of opposite vertexes by keyboard
Operation setting, solves vertex edit mode, in OFFICE during editing graph summit, and vertex position
Regulation does not translate, can not use directionkeys regulation, can not regulate on multiple summits simultaneously, and the top caused
The point regulation relatively low technical problem of experience property, meanwhile, combines multiselect summit, and according to dissimilar enter
The corresponding summit of row is moved, it is achieved that the multi-functional operation of vertex edit.
Those skilled in the art is it can be understood that arrive, and for convenience and simplicity of description, above-mentioned retouches
The specific works process of the system stated, device and unit, is referred to the correspondence in preceding method embodiment
Process, does not repeats them here.
In several embodiments provided herein, it should be understood that disclosed system, device and
Method, can realize by another way.Such as, device embodiment described above is only shown
Meaning property, such as, the division of described unit, be only a kind of logic function and divide, actual can when realizing
There to be other dividing mode, the most multiple unit or assembly can in conjunction with or be desirably integrated into another
System, or some features can ignore, or do not perform.Another point, shown or discussed each other
Coupling direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, device or unit
Or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, makees
The parts shown for unit can be or may not be physical location, i.e. may be located at a place,
Or can also be distributed on multiple NE.Can select according to the actual needs part therein or
The whole unit of person realizes the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit,
Can also be that unit is individually physically present, it is also possible to two or more unit are integrated in a list
In unit.Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ software function list
The form of unit realizes.
If described integrated unit realizes and as independent production marketing using the form of SFU software functional unit
Or when using, can be stored in a computer read/write memory medium.Based on such understanding, this
The part that the most in other words prior art contributed of technical scheme of invention or this technical scheme
Completely or partially can embody with the form of software product, this computer software product is stored in one
In storage medium, including some instructions with so that computer equipment (can be personal computer,
Server, or the network equipment etc.) perform completely or partially walking of method described in each embodiment of the present invention
Suddenly.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD
Etc. the various media that can store program code.
The above, above example only in order to technical scheme to be described, is not intended to limit;
Although being described in detail the present invention with reference to previous embodiment, those of ordinary skill in the art should
Work as understanding: the technical scheme described in foregoing embodiments still can be modified by it, or to it
Middle part technical characteristic carries out equivalent;And these amendments or replacement, do not make appropriate technical solution
Essence depart from various embodiments of the present invention technical scheme spirit and scope.