Embodiment
For ease of understanding the present invention, the present invention is set forth below in conjunction with accompanying drawing.
Please refer to Fig. 1, at first introduce method of the present invention, a kind of touch-screen is write disposal route, comprises step:
101, detected touch point number, position, touch point;
In each touch-screen detects, the touch point number and the position, touch point of senses touch screen.
102, judge that whether the touch point number is more than or equal to 2;
Judge that the touch point number is more than or equal to 2, if then carry out step 103.
103, send the mouse information that the touch point is pressed, moved and lift;
Send the mouse information of touch point one by one to operating system, wherein mouse information comprises: last once detect in the mouse information pressed of position, touch point, move to the mouse information of position, touch point in the current detection and the mouse information that lifts the position, touch point in current detection.
As a kind of concrete embodiment, suppose to have now 2 touch points, when then sending mouse information, send the mouse information of any touch point earlier, and then send the mouse information of another touch point.
105, upgrade the position, touch point.
Each touch point touch point position correspondence in last once detection is updated to each touch point touch point position in current detection, returns 101 steps.
The present invention is in each touch-screen scan period (sense cycle), touch point number and each touch point position of senses touch screen, when touch point number the time more than or equal to 2, send the mouse information of each touch point one by one, comprising: the mouse information of pressing, moving and lift; Initial point position is updated to the impact point position and returns the processing of writing of finishing a sense cycle (time intervals of 2 adjacent detections); In the present invention, each sense cycle all can send the mouse information of pressing, moving and lift; Compared with prior art, realize the function that multiple spot is write, and be applicable to the application software that any a support single-point is write, simple and practical.
Above-mentioned Fig. 1 embodiment also comprises step:
Operating system receives mouse information, then according to the position, last detected touch point of each touch point and current detection to the touch point obtain the motion track of corresponding touch point.
Because may there be the situation that is increased to several touch points by a touch point in touch-screen,, the foregoing description is done further improvement in order under the situation that does not influence existing single-point touches treatment scheme, to realize the present invention:
If the last number that detects the touch point is 1, in current detection, the number that detects the touch point is more than or equal to 2;
Then be sent in the mouse information that lift this single-point touches point position in last the detection to operating system earlier, carry out above-mentioned steps 103 then.
As a kind of preferred real-time mode, suppose that first sense cycle detects a touch point, second sense cycle detects 2 touch points, and the 3rd sense cycle detects a touch point, and the 4th sense cycle detects 3 touch points; Then before the processing of 2 touch points of carrying out second sense cycle, send the mouse information that the single-point touches point of first sense cycle lifts earlier; Before the processing of 3 touch points of carrying out the 4th sense cycle, the mouse information that the single-point touches point of the 3rd sense cycle of elder generation's transmission lifts.
If the judgement through above-mentioned steps 102 is the single-point touches point, then according to single-point touches treatment scheme of the prior art:
If the touch point number is 1, then send the touch point mouse information that press the position, touch point in current detection to operating system;
Detect next time and later detection in, still be 1 if detect the number of touch point, then to operating system send the touch point move to detect next time in the mouse information of position, touch point;
In the default time, do not detect the touch point, then send mouse-up message to operating system;
If operating system receives the mouse information that presses the position, touch point in current detection, moves to the mouse information of position, touch point in detecting next time, then obtain the motion track of single-point touches point according to position, touch point in touch point position in the current detection and the detection next time; If operating system receives the message of mouse-up, then finish the processing of single-point touches point.
In the existing single-point touches treatment scheme, forming track can be the basis mouse information that press the position, touch point in last once detection, the mouse information that moves to position, current touch point; Also can be according to the mouse information that moves to position, current touch point, move to next time the mouse information of position, touch point in detecting; Also can be the mouse information that moves to position, current touch point, the mouse information that lift the position, touch point next time in detecting.
For the ease of operation, in touch-screen is handled, generally can comprise processing under the state of writing and the processing under the touch-control state, the processing under the touch-control state comprises: rolling mouse, the response that drags, click, double-click etc.Write state and the touch-control state can be changed.
In order to make the motion track of touch point level and smooth, can carry out smoothing processing to the motion track that obtains in the foregoing description,
If touch point all is detected and has the motion track of this touch point in continuous 3 sense cycle, then in the motion track of this touch point, obtain at least three discrete points, according at least three discrete points motion track is carried out smoothly.
It is common in the prior art that motion track is carried out smoothing processing, for example: 1, discrete differential technique: interpolation continuous function on the basis of discrete data, make this continuous curve by whole given discrete data points, interpolation is the important method that discrete function approaches, utilize it to estimate the approximate value of function by the value situation of function at limited some place at other some places.
2, cubic spline smoothing method, cubic spline interpolation (be called for short Spline interpolation) is a smooth curve by a series of shape value points, draws the curvilinear function group by finding the solution the three moments euqation group on the mathematics, calculates more interpolation point by this curvilinear function batch total again.
Cubic spline function: definition: function S (x) ∈ C2[a, b], and on each minizone [xj, xj+1], be cubic polynomial, wherein, a=x0<x1<...<xn=b is given node, claims that then S (x) is node x0, x1 ... the cubic spline function on the xn.If given function value Yj=f (Xj) on node xj. (j=0,1,, n), and set up; S (xj)=yj. (j=0,1,, n), then claim S (x) to be cubic spline functions.
3, five 3 smoothing methods;
4, ultraphotic smoothing method.
As preferred embodiment a kind of, please refer to Fig. 2, in the cycle, obtain the ABC track in certain 2 continuous detection, the ABC track is carried out obtaining level and smooth ADBEFC track after the smoothing processing.
Please refer to Fig. 3, the invention also discloses a kind of touch-screen and write treating apparatus, comprising:
Detecting unit T1 is used for detecting at each touch-screen the touch point number and the position, touch point of senses touch screen;
Whether judging unit T2 is used to judge the touch point number more than or equal to 2, if then notify the first transmitting element T3 to send mouse information to operating system;
The first transmitting element T3 is used to send mouse information; Wherein mouse information comprises: last once detect in the mouse information pressed of position, touch point, move to the mouse information of position, touch point in the current detection and the mouse information that lifts the position, touch point in current detection;
Position renewal unit T5 be used for each touch point is updated to each touch point touch point position in current detection in the last touch point position correspondence that once detects, and notice detecting unit T1 detects.
The present invention is in each touch-screen scan period (sense cycle), touch point number and each touch point position of senses touch screen, when touch point number the time more than or equal to 2, send the mouse information of each touch point one by one, comprising: the mouse information of pressing, moving and lift; Initial point position is updated to the impact point position and returns the processing of writing of finishing a sense cycle (time intervals of 2 adjacent detections); In the present invention, each sense cycle all can send the mouse information of pressing, moving and lift; Compared with prior art, realize the function that multiple spot is write, and be applicable to the application software that any a support single-point is write, simple and practical.
Fig. 3 embodiment also comprises: operating system T4, be used to receive mouse information, and according to the position, last detected touch point of each touch point and current detection to the touch point obtain the motion track of corresponding touch point.
As preferred embodiment a kind of, operating system T4 can make a general reference for having the system of central processing unit (CPU) function, for example: windows serial system, linux system, apple system, Android system and Symbian system etc.In operating system, carry out forming of motion track by processor usually, can be referred to as the unit of drawing with picture processing capacity.
Please refer to Fig. 4, said apparatus also comprises: the second transmitting element T6;
The processing operation of single-point touches point is as follows:
If judging unit T2 judges that the touch point number is 1, then the second transmitting element T6 sends the touch point mouse information that press the position, touch point in current detection to picture unit T4;
In detecting, if judging unit T2 judges that the number of touch point still is 1, then the second transmitting element T6 sends the mouse information that the touch point moves to position, touch point in the detection next time to picture unit T4 next time;
In the default time, detecting unit T1 does not detect the touch point, and then the second transmitting element T6 sends mouse-up message to picture unit T4;
If picture unit T4 receives the mouse information that presses the position, touch point in current detection, moves to the mouse information of position, touch point in detecting next time, then obtain the motion track of single-point touches point according to position, touch point in touch point position in the current detection and the detection next time; If picture unit T4 receives the message of mouse-up, then finish the processing of single-point touches point.
Because may there be the situation that is increased to several touch points by a touch point in touch-screen,, the foregoing description is done further improvement in order under the situation that does not influence existing single-point touches treatment scheme, to realize the present invention:
If judging unit T1 judges that in current detection the number of touch point is 1, in detecting, the number of judging the touch point is more than or equal to 2 next time;
Then the second transmitting element T6 is sent in the mouse information that lift this single-point touches point position in the current detection to operating system T4 earlier, carries out the operation that the first transmitting element T3 sends the mouse information of touch point one by one then.
In order to make the motion track that obtains in the said apparatus smoothly attractive in appearance, can do further improvement to the device of Fig. 3 embodiment, please refer to Fig. 4, the device of Fig. 3 embodiment also comprises: smooth trajectory unit T7;
Judging unit T2 is used to also to judge that same touch point is whether at the continuous motion track that all is detected and has this touch point that picture unit T4 obtains more than 3 times, then smooth trajectory unit T7 obtains at least three discrete points in the motion track of this touch point, according at least three discrete points motion track is carried out smoothly.
Introduce a concrete application examples of the present invention below, please refer to Fig. 5,
Suppose that touch-screen exists 2 touch point Q1 and Q2 all the time by detecting.Position L1, L2, L3, L4 and the L5 of touch point Q1; Position M1, M2, M3, M4 and the M5 of touch point Q2 are in t, t+1, t+2, t+3, the detected position of a t+4 sense cycle;
For t+1 sense cycle, the initial point position of touch point Q1 is L1, and the impact point position is L2; Processing procedure is:
1, sends the mouse information that touch point Q1 presses at the L1 point;
2, send touch point Q1 and move to the mouse information that L2 is ordered;
3, send the mouse information that touch point Q1 lifts at the L2 point;
4, according to impact point L2 and reference position point L1, obtain line segment L1L2, shown in Fig. 5 phantom line segments;
For t+1 sense cycle, the initial point position of touch point Q2 is M1, and the impact point position is M2; Processing procedure is:
5, send the mouse information that touch point Q2 presses at the M1 point;
6, send touch point Q2 and move to the mouse information that M2 is ordered;
7, send the mouse information that touch point Q2 lifts at the M2 point;
8, according to impact point M2 and reference position point M1, obtain line segment M1M2, shown in Fig. 5 phantom line segments;
Through step 1 to 4 finish touch point Q1 t+1 sense cycle write processing, pass through step 5 to 8 finish touch point Q2 t+1 sense cycle write processing;
For t+2 sense cycle, the initial point position of touch point Q1 is L2, and the impact point position is L3; Processing procedure is:
9, send the mouse information that touch point Q1 presses at the L2 point;
10, send touch point Q1 and move to the mouse information that L3 is ordered;
11, send the mouse information that touch point Q1 lifts at the L3 point;
12, according to impact point L3 and reference position point L2, obtain line segment L2L3, shown in Fig. 5 phantom line segments;
For t+2 sense cycle, the initial point position of touch point Q2 is M2, and the impact point position is M3; Processing procedure is:
13, send the mouse information that touch point Q2 presses at the M2 point;
14, send touch point Q2 and move to the mouse information that M3 is ordered;
15, send the mouse information that touch point Q2 lifts at the M3 point;
16, according to impact point M3 and reference position point M2, obtain line segment M2M3, shown in Fig. 5 phantom line segments;
Through step 9 to 12 finish touch point Q1 t+2 sense cycle write processing, pass through step 13 to 16 finish touch point Q2 t+2 sense cycle write processing;
In the processing of t+3, a t+4 sense cycle, can obtain the line segment L3L4 that touch point Q1 obtains for touch point Q1 and Q2 after the processing of t+3 sense cycle according to above-mentioned disposal route; The line segment L4L5 that after the processing of t+3 sense cycle, obtains; The line segment M3M4 that touch point Q2 obtains after the processing of t+3 sense cycle; The line segment M4M5 that after the processing of t+3 sense cycle, obtains; Above-mentioned line segment is connected the motion track L1L2L3L4L5 (shown in the phantom line segments) that obtains touch point Q1 from beginning to end according to the sequencing of sense cycle; The motion track M1M2M3M4M5 (shown in the phantom line segments) of touch point Q2;
Motion track L1L2L3L4L5 (shown in the phantom line segments) to touch point Q1 carries out obtaining the level and smooth track of touch point Q1 501 after the smoothing processing; Motion track M1M2M3M4M5 (shown in the phantom line segments) to touch point Q2 carries out obtaining the level and smooth track of touch point Q2 502 after the smoothing processing.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.