Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment one
Embodiments provide a kind of method performing mapping operation, as shown in Figure 1, the treatment scheme of the method can comprise following step:
Step 101, after detecting and pulling signal, the operational light obtained in interface is marked on this and pulls the displacement produced in the process that signal continues.
Step 102, according to the corresponding relation of the displacement prestored and Graphics Mode, determines the target Graphics Mode that the displacement that produces is corresponding.
Step 103, is set to target Graphics Mode by current operator scheme, and under target Graphics Mode, performs mapping operation according to the above-mentioned signal that pulls.
In the embodiment of the present invention, after detecting and pulling signal, the operational light obtained in interface is marked on this and pulls the displacement produced in the process that signal continues, according to the corresponding relation of the displacement prestored and Graphics Mode, determine the target Graphics Mode that the displacement of generation is corresponding, current operator scheme is set to target Graphics Mode, and under target Graphics Mode, performs mapping operation according to the above-mentioned signal that pulls.Like this, carrying out switching operation modes without the need to hitting function button by mobile operational light punctuate, the setting of operator scheme and the drafting of figure can be realized fast, the execution efficiency of mapping operation can be improved.
Embodiment two
Embodiments provide a kind of method performing mapping operation, the executive agent of the method can be terminal.Wherein, terminal can be computing machine, panel computer, mobile phone etc.In the method, the mode of operation of user can be mouse action, contact action etc.The present embodiment take executive agent as computing machine, and be operatively mouse action, and carry out the detailed description of scheme for the application scenarios of online class, other situation is similar with it, and the present embodiment is not repeated.
Below in conjunction with embodiment, be described in detail the treatment scheme shown in Fig. 1, content can be as follows:
Step 101, after detecting and pulling signal, the operational light obtained in interface is marked on this and pulls the displacement produced in the process that signal continues.
Wherein, pull signal can be mousebutton (as left button, right button, middle key etc.) pull signal, also can be touching screen pull signal.
In force, academics and students can install and the application program in operational network classroom in terminal, for the terminal of teacher (hereinafter referred to as first terminal), can be provided with the interface for information input in application program, the terminal (hereinafter referred to as the second terminal) that the content that teacher inputs in interface can be transferred to student by server shows.Be a teacher when wanting graphing in interface, operation cursor can be moved to the position of wanting to draw by mouse, the right button of then clicking the mouse rolling mouse, first terminal then can detect and pull signal, now first terminal can start to detect operational light and is marked on position in interface, until user unclamps mousebutton, pull blackout, the position that can pull operation cursor place when signal starts with this is for reference position, first terminal can pull in the lasting process of signal, operational light target position is detected according to predetermined period, calculate the distance between this position and reference position.
Alternatively, pull signal can be certain mousebutton pull signal, correspondingly, the treatment scheme of above-mentioned steps 101 can be as follows: when detect the first button pull signal after, the operational light obtained in interface is marked on the displacement pulling and produce in process that signal continues.
Wherein, the first button can be any button on mouse, as right mouse button, left mouse button, middle button of mouse etc.
In force, can arrange right mouse button is the first button.Be a teacher when wanting graphing, can to click the mouse right button, under the click state keeping right mouse button, sliding mouse control operation cursor moves in interface, operational light target position during click right can be set to reference position by first terminal, pulling in the lasting process of signal, operational light target position can be detected according to predetermined period, calculating the distance (namely above-mentioned displacement) between this position and reference position.
Step 102, according to the corresponding relation of the displacement prestored and Graphics Mode, determines the target Graphics Mode that the displacement that produces is corresponding.
In force, technician can arrange multiple Graphics Mode in advance in above-mentioned application program, as rectangle drawing mode, straight line drawing mode, circular drawing mode etc., and the corresponding relation of displacement and Graphics Mode can be set in the application, this corresponding relation can with application storage to first terminal, and what record in corresponding relation can be the span of displacement and the corresponding relation of Graphics Mode.When the operational light that first terminal gets in interface be marked on this pull the displacement produced in the process that signal continues time, Graphics Mode corresponding to this displacement (i.e. target Graphics Mode) can be found in above-mentioned corresponding relation.Owing to pulling in the lasting process of signal, the displacement of operational light target may be change, therefore first terminal can detect the displacement of operational light target according to small cycle, and after data displacement at every turn being detected, in above-mentioned corresponding relation, find the Graphics Mode corresponding to this displacement.
Alternatively, in the corresponding relation of displacement and Graphics Mode, the horizontal component of deformation based and vertical component function can determine corresponding Graphics Mode, corresponding process can be as follows:
Situation one, according to the corresponding relation of the displacement prestored and Graphics Mode, if the horizontal component of the displacement produced and vertical component are all greater than predetermined threshold value, then determines that target Graphics Mode corresponding to the displacement that produces is rectangle drawing mode.
Situation two, according to the corresponding relation of the displacement prestored and Graphics Mode, if the one in the horizontal component of displacement produced and vertical component is greater than predetermined threshold value, another one is less than predetermined threshold value, then determine that target Graphics Mode corresponding to the displacement that produces is straight line drawing mode.
Situation three, according to the corresponding relation of the displacement prestored and Graphics Mode, if the horizontal component of the displacement produced and vertical component are all less than predetermined threshold value, then determines that target Graphics Mode corresponding to the displacement that produces is rectangle drawing mode.
In force, what store in above-mentioned corresponding relation can be the span of the horizontal component of displacement, the span of the vertical component of displacement and the corresponding relation of Graphics Mode.This corresponding relation can arrange as follows: the horizontal component of displacement and vertical component are all greater than predetermined threshold value or are all less than predetermined threshold value, then corresponding Graphics Mode is the first Graphics Mode (as rectangle drawing mode); One in the horizontal component of displacement and vertical component is greater than predetermined threshold value, and one is less than predetermined threshold value, then corresponding Graphics Mode is the second Graphics Mode (as straight line drawing mode).
Pull in the lasting process of signal above-mentioned, first terminal can detect the horizontal component of displacement and vertical component that pull signal according to small cycle, and the magnitude relationship of difference determined level component and predetermined threshold value (as 15 pixels), and the magnitude relationship of vertical component and predetermined threshold value.When horizontal component and vertical component that this displacement detected all are greater than predetermined threshold value, the target Graphics Mode corresponding to this displacement can be defined as rectangle drawing mode; When the one in the horizontal component this displacement being detected and vertical component is greater than predetermined threshold value, when another one is less than predetermined threshold value, the target Graphics Mode corresponding to this displacement can be defined as straight line drawing mode; When horizontal component and vertical component that this displacement detected all are less than predetermined threshold value, the target Graphics Mode corresponding to this displacement can be defined as rectangle drawing mode.
Step 103, is set to target Graphics Mode by current operator scheme, and under target Graphics Mode, performs mapping operation according to the above-mentioned signal that pulls.
In force, current operator scheme, after determining target Graphics Mode, can be set to target Graphics Mode by first terminal.Now, pull signal and be still in persistent state, that is, one click operation is also underway, and also do not complete, first terminal can be in the clicking operation of carrying out state by current, namely this pulls clicking operation corresponding to signal, as the mapping operation under target Graphics Mode, the operational light target reference position corresponding according to this clicking operation and current location, determine corresponding mapping operation content.Such as, user pins right mouse button and sliding mouse, the A moment creates a displacement, horizontal component and the vertical component of this displacement are all greater than predetermined threshold value, then interface shows the schematic block (can be dotted line frame) of a rectangle, as shown in Figure 2, for the rectangular graph that can generate after illustrating to unclamp right mouse button, the upper left of this schematic block and the summit of bottom right can be respectively reference position and the current location of aforesaid operations cursor, and that is this schematic block can change with the slip of mouse; User pins right mouse button and sliding mouse, the horizontal component of the displacement produced in the B moment is greater than predetermined threshold value, and the vertical component of displacement is less than predetermined threshold value, then on interface, show a schematic lines (can be dotted line straight line), as shown in Figure 3, for the straight line that can generate after illustrating to unclamp right mouse button, this schematic lines left end point and right endpoint can be respectively reference position and the current location of aforesaid operations cursor, and that is this schematic lines can change with the slip of mouse.
Alternatively, corresponding figure can be sent to the terminal of student by the terminal of teacher after mapping operation completes, and corresponding processing mode can be as follows: when mapping operation is finished, and is sent by the figure that mapping operation is drawn by server to the second terminal.
In force, be a teacher when unclamping mousebutton, first terminal then detects that above-mentioned click signal disappears, now, first terminal can judge that mapping operation is finished, mapping operation graph of a correspondence can be shown, as rectangle, straight line, circular etc., and, first terminal can by the relevant information of this image (as position, size etc.) be carried in data transmission message and send to server (i.e. the background server of above-mentioned application program), after server receives the data transmission message of first terminal transmission, the account (i.e. the account of teacher) that first terminal logs in can be determined, and determine other account (can be the account of student) with the account in consolidated network classroom, then this data transmission message is sent to the terminal (i.e. the second terminal) that other account determined logs in.Second terminal then can carry out simultaneous display to corresponding figure.
Alternatively, after completing mapping operation, can adjust operator scheme, corresponding processing mode can be as follows: when mapping operation is finished, and is set to operator scheme to detect the operator scheme before pulling signal.
In force, first terminal can record current operator scheme when application program launching and when each pattern switches, and also, first terminal records the above-mentioned operator scheme pulled before signal produces.Be a teacher when unclamping mousebutton, first terminal then detects and above-mentionedly pulls blackout, now, first terminal can judge that mapping operation is finished, mapping operation graph of a correspondence can be shown, as rectangle, straight line, circle etc., and now, operator scheme can be switched back to the above-mentioned operator scheme pulled before signal produces by first terminal.Such as, teacher first under laser pen pattern (below content in can be described in detail) to interface in the content that shows explain, below certain the emphasis word content shown in interface, with click right and the mode pulled has drawn straight line, after this straight line paints, operator scheme can switch by terminal gets back to laser pen pattern.
In the embodiment of the present invention, additionally provide the method for opening Text Entry fast, corresponding processing mode can be as follows: after adopting consecutive click chemical reaction signal being detected, and current operator scheme is set to text entry mode, at the operating position display Text Entry that adopting consecutive click chemical reaction signal is corresponding.
Wherein, adopting consecutive click chemical reaction signal can be twice click signal being less than preset duration (as 0.2 second) interval time.
In force, during teacher's adopting consecutive click chemical reaction (namely double-clicking) left mouse button, current operator scheme is set to text entry mode by first terminal, simultaneously can when click signal being detected operational light target position display Text Entry, it can be a dotted rectangle, as shown in Figure 4, teacher can in Text Entry input characters.Be a teacher after input, can click the interface zone outside Text Entry, terminal then can judge that Text Input is complete, cancels the Text Input cursor in Text Entry.Teacher can also click and pull inputted word by left button, is moved to other position.
In the embodiment of the present invention; additionally provide and perform the method that track draws operation fast; corresponding processing mode can be as follows: when detect the second button pull signal after; the second button pull signal continue process in; according to operational light target motion track, perform track and draw operation (also can be called paintbrush pattern).
Wherein, the second button can be any button on mouse, as right mouse button, left mouse button, middle button of mouse etc.
In force, under any operator scheme (operator scheme especially beyond track drawing mode), operation cursor can be moved to certain position in interface by teacher, then left mouse button (i.e. the second button) sliding mouse is pinned, when first terminal detect left mouse button pull signal time, first terminal can start to detect operational light target position by predetermined period, and according to the operational light target position that each cycle detection is arrived, real-time display also records operational light target motion track (adjacent operator cycle corresponding operational light cursor position can be connected by straight line), as shown in Figure 5.Be a teacher when pinning left mouse button and pull, the effect of mouse can be equal to a paintbrush.Teacher can arrange the Show Color and thickness etc. of motion track in setting options.
In addition, the smoothing process of motion track that this application program can be drawn teacher, the process of this smoothing processing can be, when first terminal detect left mouse button pull signal time, first terminal can start to detect operational light target position according to the predetermined period (as 0.4 second) larger than above-mentioned predetermined period, then by the mode of curve, by the operational light cursor position corresponding the adjacent operator cycle, connect with curve and obtain motion track, real-time display also records operational light target motion track, makes the motion track of drafting more level and smooth.
Alternatively; in the process performing track drafting operation; the terminal of teacher can send to the terminal of student the image drawn in real time; corresponding process can be as follows: when detect the second button pull signal after; the second button pull signal continue process in; operational light target motion track is drawn in interface; and according to predetermined period; by server to the positional information of the second terminal transmit operation cursor in interface, to make, the second terminal is synchronous in interface draws operational light target motion track.
In force, pin in the process of left mouse button sliding mouse teacher, first terminal detects operational light target position according to predetermined period, and according to the operational light target position that each cycle detection is arrived, real-time display also records operational light target motion track, first terminal is after each cycle detection to operational light target position, corresponding positional information can be carried in data transmission message and send to server, after server receives the data transmission message of first terminal transmission, the account (i.e. the account of teacher) that first terminal logs in can be determined, and determine other account (can be the account of student) with the account in consolidated network classroom, then this data transmission message is sent to the terminal (i.e. the second terminal) that other account determined logs in.Second terminal then can in its interface simultaneous display operational light target motion track.In addition, second terminal can use same smoothing processing with first terminal, when the second terminal receives the data transmission message that first terminal sends over according to larger predetermined period, second terminal is according to the mode of the curve same with first terminal, by the operational light cursor position corresponding the adjacent operator cycle, connect with curve and obtain motion track, show and record operational light target motion track in real time, make the motion track of drafting more level and smooth.
In the embodiment of the present invention, also provide the method can opening laser pen pattern, corresponding process can be as follows: when do not detect pull signal or click signal time, current operator scheme is set to laser pen pattern.
Wherein, laser pen pattern is the pattern of the luminous point at an operational light target position display simulated laser pen.
In force, after above-mentioned application program is opened, can directly enter laser pen pattern, under laser pen pattern, can the luminous point of simultaneous display laser pen in the interface of the application program of the terminal of academics and students.If teacher triggers by certain operation above-mentioned the operation performed under other operator scheme (as rectangle drawing mode), then after end of operation, when first terminal can't detect pull signal or click signal time, then operator scheme can be switched back to laser pen pattern.The shape of the luminous point of laser pen and color can be arranged arbitrarily by user.
In the embodiment of the present invention, after detecting and pulling signal, the operational light obtained in interface is marked on this and pulls the displacement produced in the process that signal continues, according to the corresponding relation of the displacement prestored and Graphics Mode, determine the target Graphics Mode that the displacement of generation is corresponding, current operator scheme is set to target Graphics Mode, and under target Graphics Mode, performs mapping operation according to the above-mentioned signal that pulls.Like this, carrying out switching operation modes without the need to hitting function button by mobile operational light punctuate, the setting of operator scheme and the drafting of figure can be realized fast, the execution efficiency of mapping operation can be improved.
Embodiment three
Based on identical technical conceive, the embodiment of the present invention additionally provides a kind of device performing mapping operation, and as shown in Figure 6, this device comprises:
Detection module 610, for after detecting and pulling signal, pulls the displacement produced in the process that signal continues described in the operational light obtained in interface is marked on;
Determination module 620, for the corresponding relation according to the displacement prestored and Graphics Mode, determines the target Graphics Mode that the displacement of described generation is corresponding;
Execution module 630, for current operator scheme is set to described target Graphics Mode, and under described target Graphics Mode, performs mapping operation according to the described signal that pulls.
Alternatively, described determination module 620, for:
According to the corresponding relation of the displacement prestored and Graphics Mode, if the horizontal component of the displacement of described generation and vertical component are all greater than predetermined threshold value, then determine that target Graphics Mode corresponding to the displacement of described generation is rectangle drawing mode;
According to the corresponding relation of the displacement prestored and Graphics Mode, if the one in the horizontal component of the displacement of described generation and vertical component is greater than predetermined threshold value, another one is less than predetermined threshold value, then determine that target Graphics Mode corresponding to the displacement of described generation is straight line drawing mode;
According to the corresponding relation of the displacement prestored and Graphics Mode, if the horizontal component of the displacement of described generation and vertical component are all less than predetermined threshold value, then determine that target Graphics Mode corresponding to the displacement of described generation is rectangle drawing mode.
Alternatively, described device also comprises:
Sending module, for when described mapping operation is finished, the figure drawn by described mapping operation is sent to the second terminal by server.
Alternatively, described execution module 630 also for:
When described mapping operation is finished, the operator scheme before operator scheme being set to pull signal described in detecting.
Alternatively, described execution module 630 also for:
After adopting consecutive click chemical reaction signal being detected, current operator scheme is set to text entry mode, at the operating position display Text Entry that described adopting consecutive click chemical reaction signal is corresponding.
Alternatively, described detection module 610, comprising: when detect the first button pull signal after, pull the displacement produced in the process that signal continues described in the operational light obtained in interface is marked on;
Described execution module 630 also for: when detect the second button pull signal after, described second button pull signal continue process in, according to described operational light target motion track, perform track draw operation.
Alternatively, described execution module 630 also for:
When detect the second button pull signal after, described second button pull signal continue process in, described operational light target motion track is drawn in interface, and according to predetermined period, send described operational light by server to the second terminal and be marked on positional information in interface, to make, described second terminal is synchronous in interface draws described operational light target motion track.
Alternatively, described execution module 630 also for:
When do not detect pull signal or click signal time, current operator scheme is set to laser pen pattern.
In the embodiment of the present invention, after detecting and pulling signal, the operational light obtained in interface is marked on this and pulls the displacement produced in the process that signal continues, according to the corresponding relation of the displacement prestored and Graphics Mode, determine the target Graphics Mode that the displacement of generation is corresponding, current operator scheme is set to target Graphics Mode, and under target Graphics Mode, performs mapping operation according to the above-mentioned signal that pulls.Like this, carrying out switching operation modes without the need to hitting function button by mobile operational light punctuate, the setting of operator scheme and the drafting of figure can be realized fast, the execution efficiency of mapping operation can be improved.
It should be noted that: the device of the execution mapping operation that above-described embodiment provides is when performing mapping operation, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by equipment is divided into different functional modules, to complete all or part of function described above.In addition, the device of the execution mapping operation that above-described embodiment provides belongs to same design with the embodiment of the method performing mapping operation, and its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.