Disclosure of Invention
The invention aims to provide a method for changing the size of information content in a mobile terminal and the mobile terminal, which are used for solving the defect that the user experience in the reading and watching process is influenced due to the fact that a display screen is too small in the prior art.
A mobile terminal for changing the size of information content, comprising: the basic unit is consistent with the position and the size of a display screen of the mobile terminal; the selection area unit is used for selecting a zooming display area outside the center of the area to be zoomed according to the resolution and the zooming times supported by the mobile terminal after the area to be zoomed is selected; the zooming display layer unit is independent of the base layer unit, is consistent with the position and the size of a selected zooming display area, and is used for displaying the information content in the zooming display area; and the display layer synthesis unit is used for calculating the color value of the pixel corresponding to the information content in the zoomed display area after the base layer unit and the zoomed display layer unit are superposed, and sending the color value to the zoomed display layer unit for display.
In the above mobile terminal, the display layer composition unit further includes: and the display layer offset unit is used for calculating the initial offset and the length and the width between the zooming display layer unit and the basic layer unit and only superposing the part of the zooming display layer unit within the range of the basic layer unit.
In the above mobile terminal, the display layer composition unit further includes: a calculating unit, configured to calculate the color values of the pixels in the scaled display area according to the transparency of the base layer unit and the transparency of the scaled display layer unit, specifically: the color value is base layer element transparency (1-scaled display layer element transparency) + scaled display layer element transparency.
In the above mobile terminal, the selected area unit includes: the boundary calculation unit is used for determining a default display radius according to different zoom multiples; calculating four distance pixel values from the current pixel to the upper, lower, left and right boundaries; selecting a minimum value from the four distance pixel values and the default display radius as an actual display radius of the scaled display region.
In the above mobile terminal, the display layer composition unit further includes one of: a zoom center unit for determining coordinates of a center of the zoom display region; determining a speed of movement of the zoomed display region.
A method for changing the size of information content comprises a basic unit for a mobile terminal, which is consistent with the position and size of a display screen of the mobile terminal; the method comprises the following steps: after a region to be zoomed is selected, a zooming display region is selected outside the center of the region to be zoomed according to the resolution and the zooming times supported by the mobile terminal; the zooming display area is consistent with the position and the size of a zooming display layer unit independent of the base layer unit, and information content in the zooming display area is displayed; and when the base layer unit and the zooming display layer unit are superposed, calculating the color value of the pixel corresponding to the information content in the zooming display area, and sending the color value to the zooming display layer unit for displaying.
In the above method, when the base layer unit and the zoom display layer unit are overlaid, the method further includes: and calculating the initial offset and the length and the width between the zooming display layer unit and the basic layer unit, and only overlapping the part of the zooming display layer unit within the range of the basic layer unit.
In the above method, when the base layer unit and the zoom display layer unit are overlaid, the method further includes: calculating the color values of the pixels in the zoom display area according to the transparency of the base layer unit and the zoom display layer unit, specifically: the color value is base layer element transparency (1-scaled display layer element transparency) + scaled display layer element transparency.
In the above method, selecting a zoom display area outside the center of the area to be zoomed further comprises: determining a default display radius according to the different zoom factors; calculating four distance pixel values from the current pixel to the upper, lower, left and right boundaries; selecting a minimum value from the four distance pixel values and the default display radius as an actual display radius of the scaled display region.
In the above method, selecting a zoom display area outside the center of the area to be zoomed further comprises: determining coordinates of a center of the zoomed display region; determining a speed of movement of the zoomed display region.
The embodiment of the invention has the advantages that when a client pays attention to information on a screen, the mobile terminal can provide content with freely-scaled size, so that the eyes of the user feel more comfortable, the mobile terminal can be applied to a plurality of scenes, and the speed is high because the content is displayed according to memory backup.
Detailed Description
In order to make the objects, technical features and implementation effects of the present invention clearer, the technical solutions of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
In an embodiment provided by the present invention, a mobile terminal for amplifying information content at the mobile terminal is provided, as shown in fig. 1, including:
abase unit 101, which is consistent with the position and size of the display screen of the mobile terminal;
aselect area unit 102, configured to select a zoom display area outside a center of a to-be-zoomed area according to a resolution and a zoom factor supported by the mobile terminal after the to-be-zoomed area is selected;
a zoomingdisplay layer unit 104, which is consistent with the position and size of a selected zooming display area and is used for displaying the information content in the zooming display area;
and a displaylayer composition unit 103, configured to calculate a color value of a pixel corresponding to information content in the zoom display area after the base layer unit and the zoom display layer unit are superimposed, and send the color value to the zoomdisplay layer unit 104 for display.
For theselected area unit 102, as shown in fig. 2, a zooming display area is selected, and the zooming display area enlarges or reduces (usually enlarges) the specific information content in the area to be zoomed; for example, if the user currently touches a line of text, a content in a text box, a picture, a video, or a part of a picture/video, the part is called a region to be zoomed, and the displayedlayer composition unit 103 displays the zoomed region in the zoomeddisplay layer unit 104 after being enlarged; the specific shape of the zoom display region may be arbitrary, such as a circle, or a rectangle. In fig. 2, the area to be zoomed includes the Chinese character "china", and the zoomed display area includes the enlarged Chinese character "china".
For the displaylayer composition unit 103, the corresponding pixel value is taken out from the data of the area to be zoomed that is backed up in the memory, and is placed on the corresponding position of the zoomdisplay layer unit 104, and is covered in the rectangular range of the corresponding magnification factor, for example, the magnification factor is 3, then one pixel point in the area to be zoomed correspondingly needs to zoom the corresponding 9 pixel points on the display area, and is filled with the pixel value taken out from the corresponding position in the backup memory.
By applying the technology provided by the embodiment, when a client pays attention to information on a screen, the mobile terminal can provide content with freely-zoomed size, so that the eyes of the user feel more comfortable, the technology can be applied to a plurality of scenes, and the speed is high because the content is displayed according to memory backup.
In order to complete the functions of the mobile terminal, the displaylayer composition unit 103 further includes:
a display layer offset unit 105, configured to calculate a starting offset and a length and width between the scaleddisplay layer unit 104 and thebase layer unit 101, and only superimpose a portion of the scaleddisplay layer unit 104 within thebase layer unit 101.
The displaylayer composition unit 103 further includes:
a calculating unit 106, configured to calculate the color value of the pixel in the scaleddisplay layer unit 104 according to the transparency of thebase layer unit 101 and the scaleddisplay layer unit 104, specifically:
the color value is base layer element transparency (1-scaled display layer element transparency) + scaled display layer element transparency. When the transparency is 100%, the information content below the zoomdisplay layer unit 104 is made opaque.
For transparent colors, if the color of pixels of some regions of one display layer is transparent, no processing is done at the time of superimposition.
Theselected area unit 102 further includes:
a boundary calculating unit 107, configured to determine a default display radius according to different zoom factors; calculating four distance pixel values from the current pixel to the upper, lower, left and right boundaries; selecting a minimum value from the four distance pixel values and the default display radius as a final display radius of the scaled display region.
The method specifically comprises the following steps: if the area concerned by the user is set as a circle, a default display radius can be predetermined according to the magnification factor set by the user and the resolution supported by the hardware display equipment; for example, the user sets the magnification factor to be 3, and the resolution of the hardware display device to be 240 × 400; then the default display radius is less than or equal to 40 pixels, and then the distance pixel values from the current pixel point to the upper, lower, left and right boundaries are checked; one of the minimum values from these five distance parameters is selected as the final display radius of the zoomed display region currently selected by the user.
The displaylayer composition unit 103 further includes one of:
a zoom center unit 108 for determining coordinates of a center of the zoom display region; determining a speed of movement of the zoomed display region.
Further, after the pixels of the entire zoom display area are processed, the circle edge and the handle of the magnifying glass are added to the zoomdisplay layer unit 104, and the outside of the circle edge and the handle is filled with transparent color.
After the whole processing is finished, the hardware display device can be refreshed.
Theselected area unit 102 may be added with one:
the zooming display areadefault selection unit 302 is used for directly taking a display module, such as a text box, where a focus or a cursor is located at a specific position on the touch screen unit 202 as a selected area to be zoomed when the focus or the cursor is located at the specific position, without further calculation.
Theselected area unit 102 further includes one of:
a zoom center unit 107 for selecting coordinates of a new zoom center in order to reduce the amount of calculation of the CPU and make the eyes of a person feel comfortable during zooming (mainly zooming in), from two aspects:
one is to determine the magnification center coordinates.
Secondly, determining the moving speed, on the zoomingdisplay layer unit 104, when the moving speed is slow, the coordinate distance of the zooming center is at least two pixels different; when the moving speed is high, the coordinate distance of the zoom center at least reaches three to four pixels.
The effect of increasing the eye comfort of the user can be achieved for both the mobile terminal with the touch screen and the mobile terminal that relies on the keys to select the zoom display area.
To further improve the functions of the mobile terminal, theselected area unit 102 specifically includes:
the touch screen unit 202 is used for selecting a region currently concerned by a user according to the operation of the user, and specific information content in the region is amplified; for example, if the user currently touches a line of text, a text box, a picture, a video, or a picture/video: locally, the part is called an area to be zoomed, and the displayedlayer composition unit 103 displays the zoomed area in the zoomdisplay layer unit 104 after being enlarged. The specific shape of the zoomdisplay layer unit 104 may be arbitrary, such as a circle, or a rectangle.
When a specific position on the touch screen unit 202 is touched, the display module, such as a text box, where the position is located, can be directly used as the area to be zoomed.
Preferably, since the user generally clicks the center coordinate of the zoom display area with a finger or a touch pen, and at this time, if the magnified display image directly displays some content with the center coordinate as the center, the user experience is not good, the magnified image is displayed above the center coordinate by default, and the pixel values of the distances from the center coordinate of the zoom display area to the upper, lower, left and right boundaries are calculated at the same time, and the center coordinate of the zoom display area is adjusted until the whole magnified image can be displayed without blocking the content of the center coordinate part of the zoom display area.
By implementing the technology, when a client focuses on information on a screen, the mobile terminal can provide content with freely-zoomed size, so that the eyes of the user feel more comfortable; because the display is carried out according to the memory backup, both pictures and characters can be realized; and has no relation with hardware, and is fast because the operation is carried out on the information content in the memory.
Corresponding to the mobile terminal, the embodiment provides a method for zooming information content on the mobile terminal, which comprises abase unit 101 for the mobile terminal, wherein the base unit is consistent with the position and the size of a display screen of the mobile terminal; as shown in fig. 3, includes:
step 301, after a region to be zoomed is selected, a zooming display region is selected outside the center of the region to be zoomed according to the resolution and the zooming times supported by the mobile terminal;
step 302, the zoom display area is consistent with the position and the size of a zoomdisplay layer unit 104, and information content in the zoom display area is displayed;
step 303, when thebase unit 101 and the scalingdisplay layer unit 104 are overlaid, calculating a color value of a pixel corresponding to information content in the scaling display area, and sending the color value to the scalingdisplay layer unit 104 for displaying.
By implementing the technology in the embodiment, when a client focuses on information on a screen, the mobile terminal can provide content with freely scaled size, so that the eyes of the user feel more comfortable.
Wherein,
when thebase layer unit 101 and the zoomdisplay layer unit 104 are overlaid, the method further comprises the following steps: the initial offset and length and width between the scaleddisplay layer unit 104 and thebase layer unit 101 are calculated and only the portion of the scaleddisplay layer unit 104 within thebase layer unit 101 is superimposed.
When thebase layer unit 101 and the zoomdisplay layer unit 104 are overlaid, the method further includes: calculating the color value of the pixel in the zoom display area according to the transparency of thebase layer unit 101 and the zoomdisplay layer unit 104, specifically:
the color value is base layer element transparency (1-scaled display layer element transparency) + scaled display layer element transparency.
Selecting a zoom display area according to the default display parameters, further comprising: determining a default display radius according to the different zoom factors; calculating four distance pixel values from the current pixel to the upper, lower, left and right boundaries; selecting a minimum value from the four distance pixel values and the default display radius as a final display radius of the scaled display region.
Selecting a zoom display area according to the default display parameters, further comprising: determining coordinates of a center of the zoomed display region; determining a speed of movement of the zoomed display region.
The embodiment of the invention has the advantages that when a client pays attention to information on a screen, the mobile terminal can provide content with freely-zoomed size, so that the eyes of the user feel more comfortable; and can be applied to a plurality of scenes, such as receiving and sending mails, receiving and sending messages, making calls, etc.; because the display is carried out according to the memory backup, both pictures and characters can be realized; and has no relation with hardware, and is fast because the operation is carried out on the information content in the memory.
It should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting, and all the values of the parameters can be adjusted according to the actual situation, and are within the scope of the claims. It will be understood by those skilled in the art that various modifications and equivalent arrangements may be made without departing from the spirit and scope of the present invention and shall be covered by the appended claims.