Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
In the embodiment of the present invention, on screen after screenshotss, according to the screen area being truncated to, generate display panel, by setting up the coordinate corresponding relation of screen and display panel, the position of operational order on the display panel after amplification is mapped on the relevant position of screen, this operational order of sync response on the relevant position of screen, when the size of screen and displaying contents do not match, has improved the operability of screen.
The realization flow of the method that a kind of mobile terminal screen that Fig. 1 shows the embodiment of the present invention to be provided operates, details are as follows:
In step S101, obtain the screenshotss event on screen, according to the screen area being truncated to, generate display panel.
In embodiments of the present invention, carry out screenshotss on the screen of mobile terminal, with the screen area being truncated to, generate display panel, the shape of display panel includes but not limited to square, rectangle, irregular polygon or circle etc.
In step S102, set up the coordinate corresponding relation of described screen and described display panel.
Get after screenshotss event, in order to make display panel can be mapped to it on the original position of screen, in real time for screen and display panel are set up respectively rectangular coordinate system.As one embodiment of the present of invention, as shown in Figure 2, S102 is specially:
In S201, the first rectangular coordinate system is set up as the first initial point in the first contact of take in described screenshotss event on described screen.
In embodiments of the present invention, take the first contact of screenshotss event is the first initial point, and the Width of screen of take is x direction of principal axis, and the length direction of screen is that y direction of principal axis is set up the first rectangular coordinate system.
In S202, the pixel in the described screen area upper left corner that is truncated to of take is set up the second rectangular coordinate system as the second initial point on described display panel.
In embodiments of the present invention, the pixel in the screen area upper left corner that is truncated to of take is set up the second rectangular coordinate system as the second initial point, and x direction of principal axis is identical with the first rectangular coordinate system with y direction of principal axis.
In S203, according to described the first rectangular coordinate system and described the second rectangular coordinate system, calculate described the second initial point to the mapping relations of described the first initial point.
When the top left corner pixel point of the first contact of screenshotss event and the screen area that is truncated to is not at same, the first initial point does not overlap with the second initial point, calculate the second initial point to the mapping relations of the first initial point, by these mapping relations, can calculate other point transformation that the second rectangular coordinate fastens to the coordinate after the first rectangular coordinate system.For example, according to the relative position of the second initial point and the first initial point, the mapping point that the second initial point (0,0) is fastened at the first rectangular coordinate is (1,2), and the mapping point that (x, the y) fastening at the second rectangular coordinate fastens at the first rectangular coordinate is (x+1, y+2).
When the top left corner pixel point of the first contact of screenshotss event and the screen area that is truncated to is at same, the first initial point overlaps with the second initial point, the first rectangular coordinate system overlaps with the second rectangular coordinate system, now, the point that the second rectangular coordinate is fastened does not need to carry out coordinate transform while being mapped to the first rectangular coordinate system, (1,2) that for example the second rectangular coordinate is fastened is still (1,2) after being mapped to the first rectangular coordinate system.
In step S103, according to amplification coefficient, amplify described display panel.
In order to check easily and operation display panel, according to amplification coefficient, amplify display panel.Amplification coefficient can be some fixing values, is chosen, or amplify by the mode of progress bar by user on the operation interface of mobile terminal.Meanwhile, the coordinate on display panel also correspondingly changes, and if amplification coefficient is 2 o'clock, (1,2) on the second screen becomes (2,4).The second screen after amplification can dwindle again, to allow to adjust to suitable screen size.
In step S104, obtain the operational order on described display panel.
As one embodiment of the present of invention, in order to improve the precision of mapping from display panel to screen, as shown in Figure 3, S104 is specially:
In S301, obtain the touch event on described display panel, described touch event forms touch screen region on described display panel.
Conventionally, when the enterprising line operate of touch-screen, what contact with screen is not a point but the irregular touch screen of a slice region.
In S302, determine the center in described touch screen region.
In S303, take the center in described touch screen region, be the center of circle, on the circle that default radius is radius, determine four points.
Because the area in touch screen region can be different because of user's difference, for the position that can determine exactly that this touch event occurs, in embodiments of the present invention, take the center in above-mentioned definite touch screen region, it is the center of circle, default radius is evenly to choose four points on the circle of radius, and default radius is according to statistical law, to calculate the area that the finger of different crowd contacts with screen to obtain.Five points that obtain thus represent the touch screen region of current touch screen event.
In S304, judge successively whether the center in described touch screen region and the touch event on described four points are identical valid function instruction.
In embodiments of the present invention, by above-mentioned steps, got after five touch events on point, judge successively whether these five touch events are identical valid function instruction.For example, have " determining " and " cancellation " these two buttons on display panel, in the time will selecting " determining " this button, effectively operational order should be to click on the region of " determining " button.Judge successively whether above-mentioned five touch events drop on the region of " determining " button, dropping in region is effectively, drops on extra-regional for invalid.
In S305, if the described touch event on the center in described touch screen region and described four points is identical valid function instruction, the position of described operational order is the coordinate at the center in described touch screen region.
Consider the touch event on above-mentioned five points, as shown in Figure 4, Fig. 4 shows three kinds of position relationships of above-mentioned five points and " determining " button.
If the operational order on touch screen regional center and described four points is all effective, the location determination of operational order is the coordinate of touch screen regional center.As the position relationship that (a) in Fig. 4 represents,, when five points all drop on the region of " determining " button, the touch event on five points is all effective click, the point at the current location positioning Wei center of clicking.
If five points all drop on outside the region of " determining " button, as the position relationship that (c) in Fig. 4 represents, the touch event on five points is all invalid click.
When if five points partly drop on the region of " determining " button, as the position relationship of (b) expression in Fig. 4,, if at least one is that invalid operation instruction and at least one item are valid function instruction in the described touch event on the center in described touch screen region and described four points, the position of described operational order is the first coordinate that is judged as the loca of valid function instruction in described touch event, and the current position of clicking is judged as on the point of valid function instruction at first.
In step S105, according to described amplification coefficient and described coordinate corresponding relation, the operational order on described display panel described in sync response on described screen.
As one embodiment of the present of invention, as shown in Figure 5, S105 is specially:
In S501, according to described amplification coefficient and described coordinate corresponding relation, the position of described operational order is mapped on the corresponding coordinate of described screen.
In embodiments of the present invention, operational order above-mentioned steps being got and the position of generation thereof are mapped on screen.According to amplification coefficient and coordinate corresponding relation, for example, amplification coefficient is 2, and the mapping point that (x, the y) fastening at the second rectangular coordinate fastens at the first rectangular coordinate when (x+1, y+2), be that the point of (4,6) is (3,5) while being mapped to screen on display panel.
In S502, operational order described in sync response on the corresponding coordinate of described screen.
As above-described embodiment, in (3,5) of screen, locate the above-mentioned click of sync response.
In the embodiment of the present invention, on screen after screenshotss, according to the screen area being truncated to, generate display panel, by setting up the coordinate corresponding relation of screen and display panel, the position of operational order on the display panel after amplification is mapped on the relevant position of screen, this operational order of sync response on the relevant position of screen, when the size of screen and displaying contents do not match, has improved the operability of screen.
It should be noted that, above-described embodiment is that the display panel after amplifying by operation carrys out function screen, follows identical principle, and the display panel after also can dwindling by operation carrys out function screen.
The structured flowchart of the device that a kind of mobile terminal screen that Fig. 6 shows the embodiment of the present invention to be provided operates, this device can be positioned at smart mobile phone, panel computer, pocket computing machine (Pocket Personal Computer, PPC), palm PC, personal digital assistant (Personal Digital Assistant, PDA) etc. in mobile terminal, for carrying out the method for a kind of mobile terminal screen operation described in Fig. 1 to Fig. 5 embodiment of the present invention.For convenience of explanation, only show the part relevant to the present embodiment.With reference to Fig. 6, this device comprises:
Screenshotss unit 61, obtains the screenshotss event on screen, according to the screen area being truncated to, generates display panel.
Set up unit 62, set up the coordinate corresponding relation of screen and display panel.
Amplifying unit 63, amplifies display panel according to amplification coefficient.
Acquiring unit 64, obtains the operational order on display panel.
Response unit 65, according to amplification coefficient and coordinate corresponding relation, the operational order of sync response on display panel on screen.
Alternatively, the described unit 62 of setting up comprises:
First sets up subelement, and the first rectangular coordinate system is set up as the first initial point in the first contact of take in screenshotss event on screen.
Second sets up subelement, and the pixel in the screen area upper left corner that is truncated to of take is set up the second rectangular coordinate system as the second initial point on display panel.
Computation subunit, according to the first rectangular coordinate system and the second rectangular coordinate system, calculates the second initial point to the mapping relations of the first initial point.
Alternatively, described acquiring unit 64 comprises:
Obtain subelement, obtain the touch event on display panel, touch event forms touch screen region on display panel.
First determines subelement, determines the center in touch screen region.
Second determines subelement, take the center in touch screen region, is the center of circle, determines four points on the circle that default radius is radius.
Judgment sub-unit, judges whether the center in touch screen region and the touch event on described four points are identical valid function instruction successively.
Operational order location positioning the first subelement, if the touch event on the center in touch screen region and described four points is identical valid function instruction, the position of operational order is the coordinate at the center in described touch screen region.
Alternatively, described acquiring unit 64 also comprises:
Operational order location positioning the second subelement, if center and at least one of the touch event on described four points for touch screen region are that invalid operation instruction and at least one item are valid function instruction, the position of operational order is the first coordinate that is judged as the loca of valid function instruction in touch event.
Alternatively, described response unit 65 comprises:
Mapping subelement, according to amplification coefficient and coordinate corresponding relation, is mapped to the position of operational order on the corresponding coordinate of screen.
Response subelement, sync response operational order on the corresponding coordinate of screen.
In the embodiment of the present invention, on screen after screenshotss, according to the screen area being truncated to, generate display panel, by setting up the coordinate corresponding relation of screen and display panel, the position of operational order on the display panel after amplification is mapped on the relevant position of screen, this operational order of sync response on the relevant position of screen, when the size of screen and displaying contents do not match, has improved the operability of screen.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.