Background technology
Nowadays, various client softwares are installed on user terminal, every kind of client software has user interface separately, completes the mutual of client software and user by user interface, can say that user interface is exactly the door of client software.
Software vendors can be all user-interface design skin conventionally, the design of skin consider attractive in appearance in, also to take into account skin assembly in user interface and put the reasonable use of layout, also to carefully design stretching scheme simultaneously.First deviser, in the time of design skin, often can design the skin picture that is applicable to user interface; Write a data file for skin picture more afterwards, in this data file, can be recorded in the parameter that stretches and control on skin picture with the form of code or data form, such as; Stretch zones, stretch ratio.This data file is difficult to understand for domestic consumer, but computer program can identify, affiliated skin is loaded into user interface time, by computer program read data files know skin picture stretch time how to process.
Can see, being programmed in skin design of data file is absolute core operation, but its complexity of writing well imagine, and the data of writing are very loaded down with trivial details, cause easily occurring mistake, for skin design has been brought very large difficulty.
Consider from another point of view, if user wishes to carry out the own stretching control that designs skin by self-defining mode, data file write this too professional operation, cause User Defined pattern substantially can not realize.
Therefore need to provide a kind of mode, can make the stretching control design of skin become simple efficient, especially make this specialty operation of writing of data file become relatively friendly, directly perceived, for anyone, be domestic consumer or professional designer do not need professional technique just can stretch control design.
Summary of the invention
In view of this, technical matters to be solved by this invention has been to provide a kind of method of stretching control of user interface, makes directly to be carried by picture for the visual mark of controlling that stretches, and 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 by drawing described stretch zones for the visual mark that indicates stretch position; Monitor when described skin picture is existed to stretching demand, thereby the visual mark of identifying described skin picture obtains stretch zones, only stretches for the skin picture in described stretch zones.
Further, described visual mark, comprising: along one or more pairs of parallel lines extending longitudinally of described background picture and/or along one or more pairs of parallel lines of the horizontal expansion of described background picture.
Further, described parallel lines are indicated by color and/or transparency that shared area on described skin picture is less than a threshold value, between every pair of parallel lines, are distinguished by different colors and/or transparency.
Further, thus the visual mark of identifying described skin picture obtains the step of stretch zones, comprising: identification is along the parallel lines extending longitudinally of described skin picture, and the part folding between every pair of parallel lines is horizontal stretch zones; And/or identification is along the parallel lines of the horizontal expansion of described skin picture, the part folding between every pair of parallel lines is longitudinal stretch zones.
Further, the step only stretching for the skin picture in described stretch zones, comprising: in the time there is multiple stretch zones, each stretch zones is arranged to weight; Monitor when described skin picture is existed to stretching demand, distribute corresponding stretch ratio to each stretch zones for weight, the stretch zones that weight is higher, the stretch ratio of its distribution is larger.
Further, the step only stretching for the skin picture in described stretch zones, comprising: monitor when described skin picture is existed to stretching demand, distribute stretched dimension for multiple stretch zones equal proportions.
Further, the step only stretching for the skin picture in described stretch zones, comprising: the skin picture outside described stretch zones remains unchanged.
Further, also comprise: described skin picture is divided into some regions number consecutively by described parallel lines, described region does not comprise described parallel lines itself; The order of the described numbering of foundation, by the border direct splicing of the skin picture in corresponding region, reconfigures the skin picture that is not comprised described parallel lines and shows.
Compared with existing scheme, the technique effect that the present invention obtains:
1) visual mark is directly carried by picture, with this alternate data file, be very easy to use, and visual mark is extremely strong as a kind of information readability, easily identifies for user, and for computer program, identification is also very easily.
2) it is more simple that data file is write in the operation itself that mark is drawn relatively, and display effect is more directly perceived, and user can easily understand the stretching of skin picture and arrange.
3) apply visual mark directly bright at the enterprising rower of skin picture, make to draw stretch zones and become simple, intuitive, be therefore convenient to Specialty Design, be conducive to the self-definition design of domestic consumer.
4) display mode of the skin picture combining by subregion can not show visual mark, ensures that skin picture can be not destroyed.
5) use multiple stretch zones, by its deformation effect producing that stretches, weight is set, the picture distortion that digestion stretching brings by different level, promotes the display effect after stretching.
6) make the rhythm of skin picture distortion consistent, picture bulk deformation effect is even like this, and after stretching, the destruction of the aesthetic feeling of former figure is relatively little.
Embodiment
Below will coordinate graphic and embodiment to describe embodiments of the present invention in detail, and by this present invention's implementation procedure how application technology means solve technical matters and reach technology effect can be fully understood and be implemented according to this.
Core idea of the present invention is: use skin picture to carry visual mark, with this alternate data file.
Described visual mark, comprising: along one or more pairs of parallel lines extending longitudinally of described background picture and/or along one or more pairs of parallel lines of the horizontal expansion of described background picture; Described parallel lines are indicated by color and/or transparency that shared area on described skin picture is less than a threshold value, between every pair of parallel lines, distinguish by different colors and/or transparency, preferably adopt the color and/or the transparency that on skin picture, there is no appearance, threshold value gets 0.Visual mark is more directly perceived simple, is all readable for computer program and domestic consumer.
With an embodiment, overall plan of the present invention is described below.As shown in Figure 1, carry out operation as follows:
Step 100 is drawn stretch zones by the visual mark for indicating stretch position on skin picture;
In actual use, can be with color lump, vitta or with coloured line segment, mark the stretch zones on skin picture with strip, the line segment etc. of transparency; Indicating stretch position generally can realize by the border that indicates stretch zones.
Here it should be noted that, visual mark is the mark that uses 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 mark, or the unrecognizable size of naked eyes marks), but be generally as specific use, but mark is drawn this operation itself, relatively to write data file be unusual simple, intuitive; 2) still in general it is all readable for naked eyes and computer program, so not only mark is drawn this operation itself relatively to write data file is unusual simple, intuitive, just more directly perceived in display effect, user can easily understand the reflection of assembly layout on skin.
Step 200, monitors when described skin picture is existed to stretching demand, thereby identifies the visual mark acquisition stretch zones of described skin picture, only stretches for the skin picture in described stretch zones;
1) thus the visual mark of identifying described skin picture obtains stretch zones
Because stretch zones is generally by horizontal and vertical mark respectively place, specifically can realize in the following way: identification is along the parallel lines extending longitudinally of described skin picture, and the part folding between every pair of parallel lines is horizontal stretch zones; And/or identification is along the parallel lines of the horizontal expansion of described skin picture, the part folding between every pair of parallel lines is longitudinal stretch zones;
2) only stretch for the skin picture in described stretch zones
Monitor when described skin picture is existed to horizontal stretching demand, carry out cross directional stretch for the skin picture in described horizontal stretch zones, the skin picture outside described horizontal stretch zones remains unchanged, thereby completes the cross directional stretch of described skin picture;
Monitor when described skin picture is existed to longitudinal stretching demand, carry out longitudinal stretching for the skin picture in described longitudinal stretch zones, the skin picture outside described longitudinal stretch zones remains unchanged, thereby completes the longitudinal stretching of described skin picture;
Monitor when described skin picture is existed to horizontal and vertical stretching demand simultaneously, can first carry out longitudinal stretching according to aforesaid way, then carry out cross directional stretch; Also can first carry out cross directional stretch according to aforesaid way, then carry out longitudinal stretching.
For the middle stretched operation of step 200, also there is multiple strategy:
1) stretch by different level
In the time there is multiple stretch zones, each stretch zones is arranged to weight; Monitor when described skin picture is existed to stretching demand, distribute corresponding stretch ratio to each stretch zones for weight, the stretch zones that weight is higher, the stretch ratio of its distribution is larger.
The meaning of stretching is by different level---, composition full picture full for some colors, and its image content does not stay and is easy to the region that stretching is used, and for example color is single, the unconspicuous region of rear distortion stretches; Like this for fear of causing the picture distortion in stretch zones serious for certain piece stretch zones stretch ratio is excessive, coordinate inharmonious with periphery, affect display effect, can use multiple stretch zones, by its deformation effect producing that stretches, weight is set, distortion still has certain influence to full figure, should lack stretching, therefore weight setting is lower as far as possible, and distortion is very little on the impact of full figure sheet, the Duola that should try one's best stretches, and therefore weight setting is higher; In this way, the picture distortion that digestion stretching brings by different level, promotes the display effect after stretching.
2) equal proportion stretches
Monitor when described skin picture is existed to stretching demand, distribute stretched dimension for multiple stretch zones equal proportions.
The meaning stretching is by different level---can make the rhythm of distortion consistent, picture bulk deformation effect is even like this, and after stretching, the destruction of the aesthetic feeling of former figure is relatively smaller.
In addition, in step 100, skin picture has been drawn after stretch zones, skin picture need to consider that the visual mark of avoiding drawn is revealed destruction skin picture in the time of normal demonstration; And also need while showing after skin picture being stretched in step 200 to consider to avoid drawn visual mark to be revealed destruction skin picture.
Can avoid in the following manner drawn visual mark to be revealed, as shown in Figure 2, comprise the following steps:
Step 301, described skin picture is divided into some regions number consecutively by described parallel lines, and described region does not comprise described parallel lines itself;
Step 302, the order of the described numbering of foundation, by the border direct splicing of the skin picture in corresponding region, reconfigures the skin picture that is not comprised described parallel lines and shows.
For example, as shown in Figure 3, use two collateral line renderings to go out stretch zones at vertical and horizontal respectively to a skin picture, described like this skin picture is just divided for 9 regions by these parallel lines, can number respectively 1-9 to these 9 regions, what it should be noted that these regions are finally read is the skin picture in region, and these regions do not comprise parallel lines itself; In Fig. 3,2,5,8 is horizontal stretch zones, and 4,5,6 is longitudinal stretch zones;
In the time showing described skin picture, order according to described numbering is got up the skin picture recombinant in corresponding region, these regions do not comprise described parallel lines, the border direct splicing of the skin picture in these regions, so just can not comprised the skin picture of described parallel lines and be shown, in the time that these parallel lines are thinner, after being omitted, these parallel lines can't affect 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 disclosed form herein, should not regard the eliminating to other embodiment as, and can be used for various other combinations, amendment and environment, and can, in invention contemplated scope described herein, change by technology or the knowledge of above-mentioned instruction or association area.And the change that those skilled in the art carry out and variation do not depart from the spirit and scope of the present invention, all should be in the protection domain of claims of the present invention.