Background technology
Nowadays, various client softwares are installed on user terminal, every kind of client software all has user interface separately, accomplishes the mutual of client software and user through user interface, we can say that user interface is exactly the door of client software.
Software vendors all can be user-interface design skin usually, the design of skin consider attractive in appearance in, also to take into account the reasonable use that skin assembly on the user interface is put layout, also to carefully design the stretching scheme simultaneously.The deviser often at first can design the skin picture that is fit to user interface when design skin; Write a data files to skin picture more afterwards, can be recorded in the parameter of the control that stretches on the skin picture in this data files with the form of code or data form, such as; Stretch zones, stretch ratio.This data files is difficult to understand for domestic consumer, but computer program can discern, in the time of affiliated skin being loaded into user interface, know by the computer program read data files how skin picture is handled when stretching.
Can see that being programmed in the skin design of data file is absolute core operation, but its complexity of writing well imagines that and the data of being write are very loaded down with trivial details, cause occurring easily mistake, for skin design has been brought very big difficulty.
Consider from another point of view, if the user hopes to come the stretching of own design skin to control through self-defining mode, data file write this too professional operation, cause the User Defined pattern can not realize basically.
Therefore a kind of mode need be provided; Can make the stretching controlling Design of skin become simple efficient; Especially make this specialty operation of writing of data file become friendly relatively, directly perceived; For anyone, be the design that domestic consumer or professional designer do not need professional technique just can stretch and control.
Summary of the invention
In view of this, technical matters to be solved by this invention has provided a kind of method of stretching control of user interface, and the feasible visual sign of controlling that is used to stretch is directly carried by picture, with this alternate data file, is very easy to use.
In order to solve the problems of the technologies described above, the invention discloses a kind of method of stretching control of user interface, comprising: on skin picture, draw said stretch zones through the visual sign that is used to indicate stretch position; Monitor when there is the stretching demand in said skin picture, thereby the visual sign of discerning said skin picture obtains stretch zones, only stretches to the skin picture that is in the said stretch zones.
Further, said visual sign comprises: one or more pairs of parallel lines of the horizontal expansion of the said background picture of one or more pairs of parallel lines of the longitudinal extension of the said background picture in edge and/or edge.
Further, said parallel lines use on the said skin picture shared area to indicate less than the color and/or the transparency of a threshold value, use various colors and/or transparency to distinguish between every pair of parallel lines.
Further, thereby the visual sign of discerning said skin picture obtains the step of stretch zones, comprising: identification is along the parallel lines of the longitudinal extension of said skin picture, and the part that folds between the every pair of parallel lines is horizontal stretch zones; And/or identification is along the parallel lines of the horizontal expansion of said skin picture, and the part that folds between the every pair of parallel lines is stretch zones longitudinally.
Further, the step that only stretches to the skin picture that is in the said stretch zones comprises: when having a plurality of stretch zones, each stretch zones is provided with weight; Monitor when there is the stretching demand in said skin picture, distribute corresponding stretch ratio for each stretch zones to weight, the stretch zones that weight is high more, the stretch ratio of its distribution is big more.
Further, the step that only stretches to the skin picture that is in the said stretch zones comprises: monitor when there is the stretching demand in said skin picture, distribute stretched dimension to a plurality of stretch zones equal proportions.
Further, the step that only stretches to the skin picture that is in the said stretch zones comprises: be in the outer skin picture of said stretch zones and remain unchanged.
Further, also comprise: said parallel lines are divided into several regions and number consecutively with said skin picture, and said zone does not comprise said parallel lines itself; According to the border direct splicing of the order of the said numbering skin picture that the zone of correspondence is interior, reconfigure the skin picture and the demonstration that are not comprised said parallel lines.
Compare the technique effect that the present invention obtained with existing scheme:
1) visual sign is directly carried by picture, with this alternate data file, be very easy to use, and visual sign is extremely strong as a kind of information readability, and for user easier identification, identification also is very easily for computer program.
2) to write data file relatively more simple in the mark operation of drawing itself, and display effect is more directly perceived, and the user can easily understand the stretching of skin picture and arrange.
3) application visualizes sign is directly bright at the enterprising rower of skin picture, makes to draw the stretch zones simple, intuitive that becomes, and therefore is convenient to Specialty Design, helps the self-definition design of domestic consumer.
4) display mode of the skin picture through subregion combination makes visual sign can not show, and guarantees that skin picture can not be destroyed.
5) use a plurality of stretch zones, by its deformation effect that is produced that stretches weight is set, the picture distortion that digesting by different level stretches brings promotes the display effect after stretching.
6) make the rhythm of skin picture distortion consistent, picture bulk deformation effect is even like this, and the destruction of the aesthetic feeling of the former figure in back that stretches is less relatively.
Embodiment
Below will cooperate graphic and embodiment specifies embodiment of the present invention, by this to the present invention how the application technology means implementation procedure that solves technical matters and reach technological effect can make much of and implement according to this.
Core idea of the present invention is: use skin picture to carry visual sign, with this alternate data file.
Said visual sign comprises: one or more pairs of parallel lines of the horizontal expansion of the said background picture of one or more pairs of parallel lines of the longitudinal extension of the said background picture in edge and/or edge; Said parallel lines use on the said skin picture shared area to indicate less than the color and/or the transparency of a threshold value; Use various colors and/or transparency to distinguish between every pair of parallel lines; Preferred color and/or the transparency that does not have appearance on the skin picture that adopt, promptly threshold value gets 0.Visual sign is more directly perceived simple, all is readable for computer program and domestic consumer.
Below with an embodiment overall plan of the present invention is described.As shown in Figure 1, carry out operation as follows:
Step 100 is drawn stretch zones through the visual sign that is used to indicate stretch position on skin picture;
In actual use, can use color lump, vitta or have the line segment of color, the strip that has transparency, line segment and wait the stretch zones that marks on the skin picture; Indicating stretch position generally can realize through the border that indicates stretch zones.
Here need to prove the sign that visual sign is to use visual means to mark.1) under extreme case; Can naked eyes not readable and computer program is readable (with the naked eye unrecognizable aberration or transparency difference sign; Perhaps the unrecognizable size of naked eyes marks); But generally be as specific use, to write data file relatively be unusual simple, intuitive but mark is drawn this operation itself; But in general 2) it is all readable for naked eyes and computer program; So not only mark is drawn this operation itself to write data file relatively is unusual simple, intuitive; Just more directly perceived on the display effect, the user can easily understand the reflection of assembly layout on skin.
Step 200 monitors when there is the stretching demand in said skin picture, thereby the visual sign of discerning said skin picture obtains stretch zones, only stretches to the skin picture that is in the said stretch zones;
1) thus the visual sign of the said skin picture of identification obtains stretch zones
Because stretch zones generally is by horizontal and vertical mark respectively place, specifically can realize through following mode: identification is along the parallel lines of the longitudinal extension of said skin picture, and the part that folds between the every pair of parallel lines is horizontal stretch zones; And/or identification is along the parallel lines of the horizontal expansion of said skin picture, and the part that folds between the every pair of parallel lines is stretch zones longitudinally;
2) only stretch to the skin picture that is in the said stretch zones
Monitor when there is horizontal stretching demand in said skin picture, carry out cross directional stretch to the skin picture in the said horizontal stretch zones, the said horizontal outer skin picture of stretch zones remains unchanged, thereby accomplishes the cross directional stretch of said skin picture;
Monitor said skin picture is existed when stretching demand longitudinally, carry out longitudinal stretching to the skin picture in the said stretch zones longitudinally, the outer skin picture of said stretch zones longitudinally remains unchanged, thereby accomplishes the longitudinal stretching of said skin picture;
Monitor when there is horizontal and vertical stretching demand simultaneously in said skin picture, can carry out longitudinal stretching according to aforesaid way earlier, carry out cross directional stretch again; Also can carry out cross directional stretch according to aforesaid way earlier, carry out longitudinal stretching again.
Also there is multiple strategy in middle stretched operation to step 200:
1) stretches by different level
When having a plurality of stretch zones, each stretch zones is provided with weight; Monitor when there is the stretching demand in said skin picture, distribute corresponding stretch ratio for each stretch zones to weight, the stretch zones that weight is high more, the stretch ratio of its distribution is big more.
The meaning that stretches by different level is---, composition full picture full for some colors, its image content do not stay and are easy to the zone that stretches and use, and for example color is single, the unconspicuous zone of distortion, back stretches; Like this for fear of causing the picture distortion in the stretch zones serious for certain piece stretch zones stretch ratio is excessive, cooperate inharmoniously with periphery, influence display effect; Then can use a plurality of stretch zones, by its deformation effect produced that stretches weight is set, distortion still has certain influence to full figure; Then should stretch less, so the weight setting is lower, distortion is very little to the influence of full figure sheet as far as possible; Then should stretch as much as possible, so weight is provided with higher; In this way, the picture distortion that digesting by different level stretches brings promotes the display effect after stretching.
2) equal proportion stretches
Monitor when there is the stretching demand in said skin picture, distribute stretched dimension to a plurality of stretch zones equal proportions.
The meaning that stretches by different level is---can make the rhythm of distortion consistent, picture bulk deformation effect is even like this, and the destruction of the aesthetic feeling of the former figure in back that stretches is smaller relatively.
In addition, in step 100, skin picture drawn stretch zones after, skin picture need consider that the visual sign of avoiding being drawn is revealed the destruction skin picture when normal the demonstration; And need consider that also the visual sign of avoiding being drawn is revealed the destruction skin picture when showing after in step 200, skin picture being stretched.
The visual sign that can avoid in the following manner being drawn is revealed, and is as shown in Figure 2, may further comprise the steps:
Step 301, said parallel lines are divided into several regions and number consecutively with said skin picture, and said zone does not comprise said parallel lines itself;
Step 302 according to the border direct splicing of the order of the said numbering skin picture that the zone of correspondence is interior, reconfigures the skin picture and the demonstration that are not comprised said parallel lines.
For example; As shown in Figure 3, use two parallel lines to draw out stretch zones at vertical and horizontal respectively to a skin picture, said like this skin picture is just divided for 9 zones by these parallel lines; Can number 1-9 respectively to these 9 zones; What it should be noted that these zones finally are read is the skin picture in the zone, and these zones do not comprise parallel lines itself; 2,5,8 is horizontal stretch zones among Fig. 3, and 4,5,6 are stretch zones longitudinally;
When showing said skin picture; Order according to said numbering combines the skin picture in the zone of correspondence again; These zones do not comprise said parallel lines, and the border direct splicing of skin picture in these zones so just can not comprised the skin picture of said parallel lines and shows; When these parallel lines are thin, after being omitted, these parallel lines can't influence the display effect of former figure.
Above-mentioned explanation illustrates and has described some preferred embodiments of the present invention; But as previously mentioned; Be to be understood that the present invention is not limited to the form that this paper discloses, should do not regard eliminating as, and can be used for various other combinations, modification and environment other embodiment; And can in invention contemplated scope described herein, change through the technology or the knowledge of above-mentioned instruction or association area.And change that those skilled in the art carried out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection domain of accompanying claims of the present invention.