The subject matter herein generally relates to an electronic device and method for displaying a graphical user interface on a display.
Generally, an electronic device can display a graphical user interface on a display screen. The graphical user interface can include a plurality of image layers.
Implementations of the present technology will now be described, by way of example only, with reference to the attached figures.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
Several definitions that apply throughout this disclosure will now be presented.
The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
In general, the word “module” as used hereinafter refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language such as, for example, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware such as in an erasable-programmable read-only memory (EPROM). It will be appreciated that the modules may comprise connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.
The interface displaying system 10 can include an obtaining module 11, a determining module 12, an image processing module 13, and a displaying module 14. The modules 11-14 can include one or more software programs in the form of computerized codes stored in the storage device 20. The computerized codes can include instructions executed by the processing device 40 to provide functions for the modules 11-14.
The obtaining module 11 can obtain a total number “n” of image layers to be displayed on the graphical user interface. In at least one embodiment, a first image layer can be a top-most image layer being operable by a user, a last image layer can be a wallpaper of the graphical user interface, and a second to last image layer can be a plurality of icons on the wallpaper. The obtaining module 11 can determine whether the total number of image layers to be displayed is greater than two.
When the total number of image layers to be displayed is greater than two, the determining module 12 can determine a processing method of a plurality of processing methods for processing each of the total number of image layers. The plurality of processing methods can include size adjustment, saturation adjustment, obfuscation adjustment, and transparency adjustment. In at least one embodiment, each of the image layers from a second image layer to the second to last image layer is processed by size adjustment, each of the image layers from the second image layer to the last image layer is processed by obfuscation and saturation adjustment, and each of the image layers from the first image layer to the last image layer is processed by transparency adjustment.
The image processing module 13 can process each image layer according to the processing methods determined by the determining module 12.
To adjust the size of each of the image layers from the second image layer to the second to last image layer, the image processing module 13 first reduces the size of the second image layer by a predetermined proportion “r”. The rest of the image layers can be processed according to the following formula:
[r−(i−2)*Δr]
wherein:
r<1;
Δr is a predetermined step reduction value of r for each consecutive image layer after the second image layer;
i is an integer and equals a sequence number of the image layer;
2≦i≦n−1; and
Δr<r/(n−2).
To adjust the obfuscation of each image layer from the second image layer to the last image layer, the image processing module 13 first obtains “K” reference pixels for each pixel of the image layer. As illustrated in
The image processing module can calculate an average (R, G, B) value of each pixel from the K reference pixels.
When the pixel is located at a border of the display or adjacent to the border, a number of times of counting the (R, G, B) value of the reference pixels located at the border of the display is equal to a deficit number of the reference pixels along the corresponding horizontal or vertical direction. For example, as illustrated in
To adjust the saturation of each image layer from the second image layer to the last image layer, the image processing module first reduces the saturation of the second image layer by a predetermined proportion “t”. The rest of the image layers can be processed according to the following formula:
[t−(i−2)*Δt]
wherein:
t<1;
Δt is a predetermined step reduction value oft for each consecutive image layer after the second image layer;
i is an integer and equals a sequence number of the image layer; and
Δt<t/(n−2).
To adjust the transparency of each image layer from the first image layer to the last image layer, the image layers can be processed by known processing means in the art.
Referring to
At block 201, a total number of image layers to be displayed can be obtained. If the total number of image layers to be displayed is greater than two, block 202 is implemented. Otherwise, if the total number of image layers is less than or equal to two, the method ends.
At block 202, a processing method of a plurality of processing methods for processing each of the image layers to be displayed can be determined. The processing methods can include size adjustment, obfuscation adjustment, saturation adjustment, and transparency adjustment.
At block 203, each of the image layers to be displayed can be processed according to the determined processing methods. In at least one embodiment, each image layer from a second image layer to a second to last image layer is processed by size adjustment, each image layer from the second image layer to the last image layer is processed by obfuscation adjustment, each image layer from the second image layer to the last image layer is processed by saturation adjustment, and each image layer from a first image layer to the last image layer is processed by transparency adjustment.
At block 204, the graphical user interface with the processed image layers can be displayed on the display.
The embodiments shown and described above are only examples. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes may be made in the detail, including in matters of shape, size and arrangement of the parts within the principles of the present disclosure up to, and including, the full extent established by the broad general meaning of the terms used in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201410706147.2 | Nov 2014 | CN | national |