CN102135876A - Method and system for generating irregular skin - Google Patents
Method and system for generating irregular skin Download PDFInfo
- Publication number
- CN102135876A CN102135876A CN2010101021721A CN201010102172A CN102135876A CN 102135876 A CN102135876 A CN 102135876A CN 2010101021721 A CN2010101021721 A CN 2010101021721A CN 201010102172 A CN201010102172 A CN 201010102172A CN 102135876 A CN102135876 A CN 102135876A
- Authority
- CN
- China
- Prior art keywords
- zone
- generates
- subregion
- area
- forms
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Generation (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention relates to a method and a system for generating irregular skin; the method comprises the following steps: obtaining an area description configuration file and establishing a mapping relation between an area and a form; generating an area according to the area description configuration file; and generating the irregular skin according to the generated area and the mapping relation between the area and the form. The system comprises an area generator and a skin generation module, wherein the area generator obtains the area description configuration file and generates the area according to the area description configuration file; and the skin generation module obtains the mapping relation between the area and the form and generates the irregular skin according to the generated area and the mapping relation between the area and the form. The method and the system for generating the irregular skin describe each area by using the configuration file and generate areas so as to generate the irregular skin so that different irregular skins can be quickly and dynamically configured only by using the configuration file but not modifying codes; and new areas can be generated according to form changes so that the effect of irregular appearance when the skin is stretched is realized.
Description
[technical field]
The present invention relates to the dynamic image process field, the method and system that particularly a kind of irregular skin generates.
[background technology]
At present, generation for irregular skin, generally be to specific dot chart (Bitmap in program, BMP) picture carries out the pixel traversal, with color value is not the synthetic zone of pixel groups (Region) of mask look, the zone that application programming interfaces by calling window (Windows) (Application Programming Interface is called for short " API ") this zone of function S etWindowRgn is set to specific forms reaches the irregular contour of forms.
Main at present employing dual mode is realized: (1) hard coded in program maps particular picture and specific forms, and the zone that particular picture generates can be set to the corresponding forms that mapping relations are arranged with it.(2) such as extending mark language (eXtensible Markup Language, be called for short " XML ") or initialization setting (initial, be called for short " INI ") etc. the mapping relations of designated pictures and forms in the configuration file of type, the zone that designated pictures generates is set to the corresponding forms that mapping relations are arranged with it.
For first kind of implementation, owing to be in program, specific BMP picture to be traveled through, therefore when needs are done the special-shaped skin of an other cover, need to change code, to deal with the BMP picture that changes in the skin, increase, configurability is poor.
For second kind of implementation, because the zone of window generates by BMP, and the size of BMP fixes, and therefore can't realize the irregular contour effect when window stretches (being that window size changes), the irregular outward appearance in the time of can't realizing stretching.
[summary of the invention]
Based on this, the method that is necessary to provide a kind of irregular skin to generate, the irregular skin of dynamic-configuration apace, and the irregular appearance can realize that forms stretch the time.
In addition, the system that also is necessary to provide a kind of irregular skin to generate, the irregular skin of dynamic-configuration apace, and the irregular appearance can realize that forms stretch the time.
The method that a kind of irregular skin generates may further comprise the steps:
Obtain the region description configuration file, set up the mapping relations between zone and the forms;
Generate the zone according to the region description configuration file;
Generate irregular skin according to zone that generates and the mapping relations between zone and the forms.
Preferably, the content of described region description configuration file description comprises: the merging mode in the width in regional identify code, area type, areal map sheet path, zone, the height in zone, zone and the arrangement mode in zone.
Preferably, the mapping relations between described zone and the forms are set up by configuration file.
Preferably, the zone of described generation comprises single area and/or synthetic zone, and the described step that generates the zone is specially:
A. set the size that will generate the zone;
B. judge whether this zone is single area, if, then carry out C, if not, then carry out D;
C. generate single area according to the region description configuration file;
D. generate synthetic zone according to the region description configuration file;
E. return the zone of generation.
Preferably, the step of generation single area is specially among the described step C:
C1. judge whether this zone is generated by the picture of being with the mask look, if, execution in step C2, otherwise execution in step C6;
C2. load the picture of the band mask look of this zone correspondence;
C3. judge whether to have traveled through last column of picture, if, execution in step C4, otherwise, execution in step C5.
C4. merge the zone of zone that each row obtains for generating.
C5. travel through the pixel of picture delegation, not comprise the area size of mask color pixel between every adjacent two mask color pixels, create the rectangular area, if a plurality of rectangular areas can be created by delegation, after then having traveled through delegation, a plurality of rectangular areas of creating are merged into a zone, change next line then over to, return step C3;
C6. create the rectangular area with the size of setting the zone that will generate as parameter.
Preferably, the described synthetic zone among the described step D comprises a plurality of subregions, and described subregion is single subregion and/or synthon zone, and the step in the synthetic zone of described generation is specially:
D1. judge whether all subregions have traveled through, if, then carry out D4, otherwise execution in step D2;
D2. determine the size of this subregion according to the property value of current subregion in the father zone at this subregion place of traversal;
D3. the big or small recursive call steps A~D according to the current subregion that travels through generates current subregion, changes next subregion then over to, and jumps to step D1;
D4. merge the zone of all subregion according to all subregion array mode for generating.
Preferably, described method also comprises:
Obtain the size after forms stretch;
According to the region description configuration file, obtain the preceding The corresponding area of described forms stretching;
According to corresponding zone before the big or small and described forms stretching after the forms stretching of being obtained, the corresponding new region of forms after generation and the stretching;
The new region that generates is disposed to the forms after stretching.
The system that a kind of irregular skin generates, this system comprises:
The zone maker obtains the region description configuration file, generates the zone according to the region description configuration file;
The skin generation module obtains the mapping relations between zone and the forms, generates irregular skin according to the zone of described generation and the mapping relations between zone and the forms.
Preferably, the content of described region description configuration file description comprises: the merging mode in the width in regional identify code, area type, areal map sheet path, zone, the height in zone, zone and the arrangement mode in zone.
Preferably, the mapping relations between described zone and the forms are set up by configuration file.
Preferably, described regional maker comprises single area generation module, synthetic regional generation module and judge module; The type in the zone that described judge module is used to judge that setting will generate; Described single area generation module judges that at judge module the zone that will generate then generates single area when being single area, and described synthetic regional generation module judges that at judge module the zone that will generate then generates synthetic zone when being synthetic zone.
Preferably, described single area generation module is further used for the picture that loads the band mask look of this zone correspondence when the picture of this zone that will generate for band mask look generates determining; The pixel of traversal picture delegation, not comprise the area size of mask color pixel between every adjacent two mask color pixels, create the rectangular area, if a plurality of rectangular areas can be created by delegation, after then having traveled through delegation, these zones are merged into a zone, change the next line traversal then over to, until having traveled through all pictures; Merge the zone of zone that each row obtains for generating; The single area that output generates.
Preferably, described single area generation module is further used for creating the rectangular area to set the area size that will generate as parameter when creating regional that the rectangular area generates determining zone that this setting will generate; The single area that output generates.
Preferably, described synthetic zone comprises a plurality of subregions, and described subregion is single area and/or synthetic zone, and described synthetic regional generation module is further used for traveling through subregion; Obtain the property value of described subregion in the father zone at place, determine the size of this subregion and generate current subregion, change next subregion then over to, until having traveled through all subregions; Obtain all subregion array mode and merge the zone of all subregion for generating; The synthetic zone that output generates.
Preferably, the size after described skin generation module further obtains forms and stretches and described forms are stretched after size pass to described regional maker; Described regional maker further obtains the preceding corresponding zone of forms stretching according to the region description configuration file, and the size after stretching according to the forms that obtain generate with described stretching after the corresponding new region of forms, and described new region disposed to the forms after stretching.
The method and system that above-mentioned irregular skin generates, adopt configuration file to describe the zone, generate the zone according to the region description in the configuration file, and according to zone that generates and the mapping relations between zone and the forms, generate irregular skin, reached and to have revised code and only need the just different irregular skin of dynamic-configuration fast of configuration file, and can change according to forms and regenerate new corresponding region, the irregular appearance when having realized stretching.
In addition, the method and system that above-mentioned irregular skin generates can produce diversified outward appearance, can well support the version interface to change desktop client software greatly.
[description of drawings]
Fig. 1 is the method flow diagram that irregular skin generates among the embodiment;
Fig. 2 A is a synthetic area schematic among the embodiment;
Fig. 2 B is the synoptic diagram after the stretching of synthetic zone changes among the embodiment;
Fig. 3 is the method flow diagram that generates the zone among the embodiment;
Fig. 4 is the method flow diagram that generates single area among the embodiment;
Fig. 5 is the method flow diagram that generates synthetic zone among the embodiment;
Fig. 6 is the process flow diagram that irregular skin stretch changes implementation method among the embodiment;
Fig. 7 is the structural representation of the system that irregular skin generates among the embodiment.
[embodiment]
Fig. 1 is the method that a kind of irregular skin generates among the embodiment, may further comprise the steps:
Step S1 obtains the region description configuration file, sets up the mapping relations between zone and the forms.
Wherein, region description a viewing area, can be Any shape, and the zone boundary can be the combination of curve and straight line, also can be that point and/or broken string are formed.The zone can be created with combining of path by rectangle, path or rectangle and be formed, can be by cutting and hit testing operation.The zone comprises single area and synthetic zone.Single area is: the zone that travels through the bitmap pixels generation of a band mask look, or call window (Windows) application programming interfaces (API) and create the zone that the function instrument (CreateRectRgn) of irregular area generates, or call the zone that the function instrument (CreatePolygonRegion) of creating polygonal region generates, single area can not divide again, has atomicity.Synthetic zone comprises a plurality of subregions, and this subregion can be single subregion and/or synthon zone.The synthetic mode of a plurality of subregions can be common factor, union or the difference set etc. in zone.
Have in the region description configuration file and adopt the description code of configuration file the zone, can be under the situation of not revising code modifier area fast, reach the purpose of the irregular skin that switches to another theme fast.The content that the region description configuration file is described the zone comprises: the merging mode in the width in regional identify code, area type, areal map sheet path, zone, the height in zone, zone and the arrangement mode in zone.Among one embodiment, the region description configuration file is extending mark language (eXtensible Markup Language, abbreviation " XML ") configuration file of configuration file, initialization (Initialization file is called for short " INI ") configuration file or other types.In one embodiment, it is as follows to adopt XML to describe regional form:
<Region OID=" ID title " Type=" area type " Image=" path of the band mask chromatic graph sheet in generation zone " Width=" width in zone " Height=" height in zone " Mode=" merging mode " Align=" arrangement mode in zone " 〉
</Region>
Wherein, Region OID is the identification code in zone, and the overall situation is unique; Width is the width in zone, and Height is the height in zone; Type is an area type, comprises two types in single area and synthetic zone, and two types of particular contents are as follows:
(1) single area, the value of single area can be Rect, represents that this single area is a rectangular area; The value of single area also can be bitmap (Bitmap), represent that this single area is the zone of the picture generation of a traversal band mask look, and the Area Node of the XML of this single area has image attributes, and the value of this image attributes is described the path of the band mask chromatic graph sheet that is used to generate this zone.
(2) should there be regional child node in synthetic zone under the synthetic Area Node during XML describes, and promptly synthetic zone comprises a plurality of subregions, each subregion of these a plurality of subregions can be single area or synthetic zone, if subregion is synthetic zone, then this subregion comprises a plurality of subregions again, so divides.
In one embodiment, the zone that claims child node to represent is the subregion in the zone represented of father node, and the represented zone of father node is the father zone in the zone represented of child node.Each subregion has array mode (Mode) attribute at the Area Node of XML, represents the merging mode of each subregion in his father zone, and this merging mode can be union, common factor or difference set etc.Simultaneously, each subregion has regional arrangement mode (Align) attribute at the Area Node of XML, and the arrangement mode attribute in zone is relevant with the layout of subregion in the synthetic zone, represents that each subregion is in the position in the remaining zone, his father zone.The arrangement mode in zone is Left, and the expression subregion is in the Far Left in remaining zone, its place father zone; The arrangement mode in zone is Right, and the expression subregion is in the rightmost in remaining zone, its place father zone; The arrangement mode in zone is Top, and the expression subregion is in the top in his father zone; The arrangement mode in zone is Bottom, and the expression subregion is in the bottom in remaining zone, his father zone; The arrangement mode in zone is LeftVStretch, and the expression subregion is in the Far Left in remaining zone, its place father zone, and height is the same with its place father zone; The arrangement mode in zone is RightVStretch, and the expression subregion is in the rightmost in remaining zone, its place father zone, and height is the same with its place father zone; The arrangement mode in zone is TopHStretch, and the expression subregion is in the top in remaining zone, its place father zone, and width is the same with its place father zone; The arrangement mode in zone is BottomHStretch, and the expression subregion is in the bottom in remaining zone, its place father zone, and width is the same with its place father zone; The arrangement mode in zone is client, and the expression subregion takes the Zone Full in remaining zone, its place father zone.
Wherein, when the arrangement mode attribute of subregion is LeftVStretch, RightVStretch, TopHStretch, BottomHStretch, during client, this subregion can be supported to stretch.When father's area size changes, this corresponding subregion in father zone can be regenerated, arrangement mode is that the subregion of LeftVStretch can be regenerated to taking the left side of father zone remaining space, the width that accounts for is the size of the Width attribute appointment of this subregion, arrangement mode is that the subregion of RightVStretch can be regenerated to taking the right of father zone remaining space, the width that accounts for is the size of the Width attribute appointment of this subregion, and arrangement mode is the irregular outward appearance that the subregion of LeftVStretch and RightVStretch can be realized the stretched vertically of forms; Arrangement mode is that the subregion of TopHStretch can be regenerated to taking the upside of father zone remaining space, it highly is the size of the Height attribute appointment of this subregion, arrangement mode is that the subregion of BottomHStretch can be regenerated to taking the downside of father zone remaining space, highly be the size of the Height attribute appointment of this subregion, arrangement mode is the irregular outward appearance that the subregion of TopHStretch and BottomHStretch can be realized the horizontal stretch of forms.Arrangement mode is that the zone of client can be regenerated and takes father zone remaining space, and it can realize the level and the stretched vertically of forms.
For the better all subregion in the synthetic zone of explanation and the stretching variation of subregion, in one embodiment, the XML in synthetic zone describes specific as follows:
<Region?OID=″BottomRightRgn″Type=″None″Align=″Client″
AlignArea=″Right″>
<Region?OID=″BottomRightLeftRgn″Type=″Bitmap″
Image=″MainWnd_BottomRight_LeftRegion.bmp″Mode=″OR″
Align=″Left″Width=″Bitmap″Height=″Bitmap″/>
<Region?OID=″BottomRightRightRgn″Type=″Bitmap″
Image=″MainWnd_BottomRight_RightRegion.bmp″
Mode=″OR″Align=″Right″Width=″Bitmap″Height=″Bitmap″/>
<Region?OID=″BottomRightMidRgn″Type=″Rect″Mode=″OR″
Align=″TopHStretch″Height=″61″/>
</Region>
A form region of foregoing description is shown in Fig. 2 A, and these forms are a synthetic zone, comprise left frame subregion 10, middle boxes subregion 20 and left frame subregion 30 3 sub regions.This three sub regions has been synthesized the synthetic zone of these forms, the unique identification sign indicating number (OID) in synthetic zone is " BottomRightRgn ", the unique identification sign indicating number (OID) of left frame subregion 10 is " BottomRightLeftRgn ", the unique identification sign indicating number (OID) of middle boxes subregion 20 is " BottomRightMidRgn ", and the unique identification sign indicating number (OID) of left frame subregion 30 is " BottomRightRightRgn ".
Wherein, left frame subregion 10 is single areas, is generated by a mask bitmap MainWnd_BottomRight_LeftRegion.bmp, and size is changeless; Middle boxes subregion 20 is single areas, it is a rectangular area, the arrangement mode of middle boxes subregion 20 is " TopHStretch ", then the size of middle boxes subregion 20 can change, and this middle boxes subregion 20 will fill up in the synthetic zone and occupy remaining space, back by left frame subregion 10 and left frame subregion 30; Left frame zone 30 is single areas, generate by a mask bitmap MainWnd_BottomRight_RightRegion.bmp, size is changeless, wherein, lower frame zone 32 is mask look zone in the left frame subregion 30, when generating the zone, the mask color pixel will be excluded out outside the generation zone.In the embodiment, the mask look is carmetta RGB (255,0,254).In addition, the array mode of left frame subregion 10, middle boxes subregion 20 and left frame subregion 30 all is a union, and therefore, this three sub regions is that the mode with union is combined into the synthetic zone that the unique identification sign indicating number is BottomRightRgn.
Shown in Fig. 2 B, in the time of should synthesizing the zone stretching, change procedure is as follows: the left and right side frame subregion is fixed, should the synthetic regional allocation of space that earlier these two zones need be occupied go out, middle boxes subregion 20 can regenerate new middle boxes subregion 22 according to the size of remaining space, takes this synthetic zone stretching variation and distributes to remaining space behind the left and right side frame subregion space.
Step S2 generates the zone according to the region description configuration file.What generate the zone employing is that regional maker receives regional identify code and the synthetic zone that has identification code that generates of region description configuration file that the skin generation module produces.The zone that generates comprises single area and/or synthetic zone.
As shown in Figure 3, the idiographic flow of the region method of generation may further comprise the steps:
Step S10, setting will generate the size in zone.According to the actual needs, the size in the zone that setting will generate is designated as rcClient.
Step S20 judges whether this zone is single area, if, execution in step S30 then; If not, execution in step S40 then.
Step S30 generates single area.As Fig. 4 is in the embodiment, and the idiographic flow that generates single area is:
Step S301 judges whether this zone is generated by the picture of being with the mask look, if, execution in step S302, if not, execution in step S306.
Step S302 loads the picture of the band mask look of this zone correspondence.Among one embodiment, when judging that this zone is the picture generation of band mask look, then loads the band mask chromatic graph sheet in this zone.
Step S303 judges whether to have traveled through last column of picture, if, execution in step S304; If not, execution in step S305.
Step S304 merges the zone of zone for generating that each row obtains.
Step S305, the pixel of traversal picture delegation, not comprise the area size of mask color pixel between every adjacent two mask color pixels, create the rectangular area, if delegation can create a plurality of rectangular areas, then travel through delegation after, a plurality of rectangular areas of establishment are merged into a zone, change the next line traversal then over to, return step S303.Among one embodiment, do not traveled through picture last column when judging, then travel through the picture one-row pixels, with the area size that does not comprise the mask color pixel between two adjacent mask color pixels is the function instrument establishment rectangular area that irregular area is created in parameter call, if a plurality of zones are created by delegation, then call the regional function body of merging (CombineRgn) and merge a plurality of zones.
For better explanation traversal picture one-row pixels generates regional process, be exemplified below: if the mask color pixel is the color (255,0,255) that adopts RGB to represent, existing one-row pixels, the color of pixel value is (200,200,200), (200,180,100), (100,100,5), (255,0,255), (190,100,100), (120,120,120), (240,240,240), (210,210,210), (255,0,255), (160,160,160), (150,150,150), (140,140,140).Then (200,200,200) are to (100,100,5) these several pixels can be created a rectangular area, are mask looks (255,0 because a pixel value is arranged thereafter, 255), ensuing (190,100,100) can create a rectangular area to (210,210,210) these several pixels, arrive (140 from (160,160,160) at last, 140,140) these several pixels can be created a rectangular area, and three rectangular areas will creating again are merged into a zone.
Step S306 creates the rectangular area with the size of setting the zone that will generate as parameter.Among one embodiment, can't help picture with the mask look when generating, calling the function instrument of creating irregular area and creating the rectangular area as parameter to set the area size that will generate when judge setting the zone that will generate.
Step S40 generates synthetic zone.Among one embodiment, when judging setting regions, generate synthetic zone for synthetic zone.As Fig. 5 is that the synthetic regional idiographic flow of generation is as follows in the embodiment:
Step S400 judges whether all subregions have traveled through, if, execution in step S403 then, otherwise execution in step S401.Among one embodiment, judge whether all subregions have traveled through, can all be traveled through by the node of judging all subregions in the father zone.
Step S401 determines the size of this subregion according to the property value of current subregion in the father zone at this subregion place of traversal.When subregion that the current subregion place father zone of traversal is not traveled through in addition, determine the size of this subregion according to the property value of current subregion in the father zone.
Step S402 generates current subregion according to the big or small recursive call step S10 to S40 of this current subregion, changes next subregion then over to, and jumps to step S400.Step S403 merges the zone of all subregion for generating according to all subregion array mode.Among one embodiment,, adopt to merge the function of region instrument and merge all subregion and generate the zone that will generate when determining all subregions when having traveled through.
Step S50 returns the zone of generation.
Step S3 generates irregular skin according to zone that generates and the mapping relations between zone and the forms.
Wherein, the generation cardinal principle of irregular skin is so that to be parameter call windows application program interface to the forms of the figure that has powerful connections in a zone window area (windows api SetWindowRegion) to be set, when this zone when being irregular, these forms show just irregular.In one embodiment, the generation of irregular skin adopts the mapping relations between zone and the forms to realize, the mapping relations between this zone and the forms adopt the configuration file configuration.This configuration file can be the configuration file of XML, initialization (INI) or other types.Among the embodiment, the form of the mapping relations between XML configuring area and the forms is exemplified below:
<ChildWindow?OID=″ComMsgBox″BgType=″Color″BgColor=″#0e121a″Width=″276″Height=″125″RegionID=″ControlWindowRegion″/>
Wherein, the value of unique regional identify code is ControlWindowRegion, and expression forms ComMsgBox and unique regional identify code are that the zone of ControlWindowRegion has mapping relations.Before ComMsgBox is shown, the unique identification sign indicating number is that the zone of ControlWindowRegion can be provided with forms function (API SetWindowRgn) by application programming interfaces as parameter and be provided with to give forms ComMsgBox, thus ComMsgBox when showing appearance profile be exactly this regional shape of ControlWindowRegion.
The method that above-mentioned irregular skin generates comprises that also the variation according to the application program forms realizes the stretching of irregular skin, is in the embodiment as Fig. 6, and the idiographic flow that skin stretch changes is as follows:
Step S601 obtains the size after forms stretch.
Step S602 according to the region description configuration file, obtains the preceding The corresponding area of forms stretching.By the identification code attribute in the zone in the region description configuration file, obtain stretching forms The corresponding area.
Step S603 is according to zone generation corresponding before size after the forms stretching of being obtained and the forms stretching and the corresponding new region of forms after the stretching.Utilize the size after regional maker stretches according to forms, generate with stretching after the corresponding new region of forms.
Step S604 disposes the new region that generates to the forms after stretching, and has promptly realized the stretching of irregular skin.
Fig. 7 is the system architecture synoptic diagram that a kind of irregular skin generates in the embodiment, and this system comprises regional maker 40 and skin generation module 50.
Among one embodiment, regional maker 40 comprises single area generation module 400, synthetic regional generation module 401 and judge module 402.The type in the zone that judge module 402 is used to judge that setting will generate.Single area generation module 400 then generates single area according to the region description configuration file when judge module 402 judges that the zone that will generate is single area.Synthetic regional generation module 401 then generates synthetic regional when judge module 402 judges that the zone that will generate is synthetic zone according to the region description configuration file, described synthetic zone comprises a plurality of subregions, and described subregion is single area and/or synthetic zone.
In one embodiment, single area generation module 400 is further used for the picture that loads the band mask look of this zone correspondence when the picture of this zone that will generate for band mask look generates determining; Load the picture of the band mask look of this zone correspondence; The pixel of traversal picture delegation, not comprise the area size of mask color pixel between every adjacent two mask color pixels, create the rectangular area, if a plurality of such zones can be created by delegation, after then having traveled through delegation, these zones are merged into a zone, change the next line traversal then over to, until having traveled through all pictures; Merge the zone of zone that each row obtains for generating; The single area that output generates.
In another embodiment, single area generation module 400 is further used for creating the rectangular area to set the area size that will generate as parameter when creating regional that the rectangular area generates determining zone that this setting will generate; The single area that output generates.Among one embodiment, single area generation module 400 calls the function instrument of creating irregular area and creates the rectangular area to set the area size that will generate as parameter.
An embodiment, synthetic regional generation module 401 is further used for traveling through a subregion; Obtain the property value of current subregion in the father zone at place and determine the size of this subregion and generate current subregion, change next subregion then over to, until having traveled through all subregions; Obtain all subregion array mode and merge the zone of all subregion for generating; The synthetic zone that output generates.
Wherein, the value of RegionOID is ControlWindowRegion, and expression forms ComMsgBox and OID are that the zone of ControlWindowRegion has mapping relations.Before ComMsgBox is shown, OID is that the zone of ControlWindowRegion can be set to forms ComMsgBox by API SetWindowRgn as parameter, thus ComMsgBox when showing appearance profile be exactly this regional shape of ControlWindowRegion.
The system that above-mentioned irregular skin generates can be used in the stretching that realizes irregular skin according to the variation of application program forms, specifically comprise: skin generation module 50 further obtains the size after forms stretch, and the size after the forms stretching of obtaining is passed to regional maker 40; Corresponding zone before zone maker 40 further obtains this forms and stretches, and the size after stretching according to forms generate with stretch after the corresponding new region of forms and this new region disposed to the forms after the stretching, realized the stretching of irregular skin.
Among one embodiment, zone maker 40 obtains the preceding The corresponding area of this forms stretching according to regional identify code in the region description configuration file, and generates corresponding new region according to the parameter information of new forms, the new region that generates is disposed to new forms, promptly realized the stretching of irregular skin.
The method and system that above-mentioned irregular skin generates, adopt configuration file to describe the zone and generate the zone, and according to zone that generates and the mapping relations between zone and the forms, generate irregular skin, reached and to have revised code and only need the just different irregular skin of dynamic-configuration fast of configuration file, and can change according to forms and regenerate new corresponding region, the irregular appearance when having realized stretching.
In addition, the method and system that above-mentioned irregular skin generates can produce diversified outward appearance, can well support the version interface to change desktop client software greatly.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.
Claims (15)
1. method that irregular skin generates may further comprise the steps:
Obtain the region description configuration file, set up the mapping relations between zone and the forms;
Generate the zone according to the region description configuration file;
Generate irregular skin according to zone that generates and the mapping relations between zone and the forms.
2. the method that irregular skin according to claim 1 generates, it is characterized in that the content that described region description configuration file is described comprises: the merging mode in the width in regional identify code, area type, areal map sheet path, zone, the height in zone, zone and the arrangement mode in zone.
3. the method that irregular skin according to claim 1 generates is characterized in that the mapping relations between described zone and the forms are set up by configuration file.
4. the method that irregular skin according to claim 1 and 2 generates is characterized in that, the zone of described generation comprises single area and/or synthetic zone, and the described step that generates the zone is specially:
A. set the size that will generate the zone;
B. judge whether this zone is single area, if, then carry out C, if not, then carry out D;
C. generate single area according to the region description configuration file;
D. generate synthetic zone according to the region description configuration file;
E. return the zone of generation.
5. the method that irregular skin according to claim 4 generates is characterized in that, the step that generates single area among the described step C is specially:
C1. judge whether this zone is generated by the picture of being with the mask look, if, execution in step C2, otherwise execution in step C6;
C2. load the picture of the band mask look of this zone correspondence;
C3. judge whether to have traveled through last column of picture, if, execution in step C4, otherwise, execution in step C5.
C4. merge the zone of zone that each row obtains for generating.
C5. travel through the pixel of picture delegation, not comprise the area size of mask color pixel between every adjacent two mask color pixels, create the rectangular area, if a plurality of rectangular areas can be created by delegation, after then having traveled through delegation, a plurality of rectangular areas of creating are merged into a zone, change next line then over to, return step C3;
C6. create the rectangular area with the size of setting the zone that will generate as parameter.
6. the method that irregular skin according to claim 4 generates, it is characterized in that, described synthetic zone among the described step D comprises a plurality of subregions, and described subregion is single subregion and/or synthon zone, and the step in the synthetic zone of described generation is specially:
D1. judge whether all subregions have traveled through, if, then carry out D4, otherwise execution in step D2;
D2. determine the size of this subregion according to the property value of current subregion in the father zone at this subregion place of traversal;
D3. the big or small recursive call steps A~D according to the current subregion that travels through generates current subregion, changes next subregion then over to, and jumps to step D1;
D4. merge the zone of all subregion according to all subregion array mode for generating.
7. the method that irregular skin according to claim 1 and 2 generates is characterized in that described method also comprises:
Obtain the size after forms stretch;
According to the region description configuration file, obtain the preceding The corresponding area of described forms stretching;
According to corresponding zone before the big or small and described forms stretching after the forms stretching of being obtained, the corresponding new region of forms after generation and the stretching;
The new region that generates is disposed to the forms after stretching.
8. system that irregular skin generates is characterized in that this system comprises:
The zone maker obtains the region description configuration file, generates the zone according to the region description configuration file;
The skin generation module obtains the mapping relations between zone and the forms, generates irregular skin according to the zone of described generation and the mapping relations between zone and the forms.
9. the system that irregular skin according to claim 8 generates, it is characterized in that the content that described region description configuration file is described comprises: the merging mode in the width in regional identify code, area type, areal map sheet path, zone, the height in zone, zone and the arrangement mode in zone.
10. the system that irregular skin according to claim 8 generates is characterized in that the mapping relations between described zone and the forms are set up by configuration file.
11. the system that irregular skin according to claim 8 generates is characterized in that, described regional maker comprises single area generation module, synthetic regional generation module and judge module; The type in the zone that described judge module is used to judge that setting will generate; Described single area generation module judges that at judge module the zone that will generate then generates single area when being single area, and described synthetic regional generation module judges that at judge module the zone that will generate then generates synthetic zone when being synthetic zone.
12. the system that irregular skin according to claim 11 generates, it is characterized in that described single area generation module is further used for the picture that loads the band mask look of this zone correspondence when the picture of this zone that will generate for band mask look generates determining; The pixel of traversal picture delegation, not comprise the area size of mask color pixel between every adjacent two mask color pixels, create the rectangular area, if a plurality of rectangular areas can be created by delegation, after then having traveled through delegation, these zones are merged into a zone, change the next line traversal then over to, until having traveled through all pictures; Merge the zone of zone that each row obtains for generating; The single area that output generates.
13. the system that irregular skin according to claim 11 generates, it is characterized in that described single area generation module is further used for creating the rectangular area to set the area size that will generate as parameter when creating regional that the rectangular area generates determining zone that this setting will generate; The single area that output generates.
14. the system that irregular skin according to claim 11 generates is characterized in that described synthetic zone comprises a plurality of subregions, described subregion is single area and/or synthetic zone, and described synthetic regional generation module is further used for traveling through subregion; Obtain the property value of described subregion in the father zone at place, determine the size of this subregion and generate current subregion, change next subregion then over to, until having traveled through all subregions; Obtain all subregion array mode and merge the zone of all subregion for generating; The synthetic zone that output generates.
15. the system according to each described irregular skin in the claim 7 to 14 generates is characterized in that, the size after described skin generation module further obtains forms and stretches and described forms are stretched after size pass to described regional maker; Described regional maker further obtains the preceding corresponding zone of forms stretching according to the region description configuration file, and the size after stretching according to the forms that obtain generate with described stretching after the corresponding new region of forms, and described new region disposed to the forms after stretching.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010102172.1A CN102135876B (en) | 2010-01-21 | 2010-01-21 | Method and system for generating irregular skin |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010102172.1A CN102135876B (en) | 2010-01-21 | 2010-01-21 | Method and system for generating irregular skin |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102135876A true CN102135876A (en) | 2011-07-27 |
CN102135876B CN102135876B (en) | 2015-05-20 |
Family
ID=44295671
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010102172.1A Active CN102135876B (en) | 2010-01-21 | 2010-01-21 | Method and system for generating irregular skin |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102135876B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102737394A (en) * | 2012-06-20 | 2012-10-17 | 北京市网讯财通科技有限公司 | Method for drawing irregular skin of windows system software |
CN103995701A (en) * | 2011-09-29 | 2014-08-20 | 北京奇虎科技有限公司 | Method for controlling stretching of user interface |
CN106611402A (en) * | 2015-10-23 | 2017-05-03 | 腾讯科技(深圳)有限公司 | Image processing method and device |
CN108205534A (en) * | 2016-12-16 | 2018-06-26 | 北京搜狗科技发展有限公司 | A kind of skin resource exhibition method, device and electronic equipment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101387954B (en) * | 2007-09-10 | 2011-06-22 | 汉王科技股份有限公司 | Method for implementing stretchable writing electronic curtain |
CN101539854B (en) * | 2008-01-24 | 2012-10-31 | 西安电子科技大学 | Method for realizing integration of heterogeneous software interface |
-
2010
- 2010-01-21 CN CN201010102172.1A patent/CN102135876B/en active Active
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103995701A (en) * | 2011-09-29 | 2014-08-20 | 北京奇虎科技有限公司 | Method for controlling stretching of user interface |
CN103995701B (en) * | 2011-09-29 | 2018-03-27 | 北京奇虎科技有限公司 | A kind of method of the stretching control of user interface |
CN102737394A (en) * | 2012-06-20 | 2012-10-17 | 北京市网讯财通科技有限公司 | Method for drawing irregular skin of windows system software |
CN106611402A (en) * | 2015-10-23 | 2017-05-03 | 腾讯科技(深圳)有限公司 | Image processing method and device |
CN106611402B (en) * | 2015-10-23 | 2019-06-14 | 腾讯科技(深圳)有限公司 | Image processing method and device |
CN108205534A (en) * | 2016-12-16 | 2018-06-26 | 北京搜狗科技发展有限公司 | A kind of skin resource exhibition method, device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN102135876B (en) | 2015-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4095671A1 (en) | Screencasting method, and terminal apparatus | |
CN102156999B (en) | Generation method and device thereof for user interface | |
CN106155454A (en) | A kind of interface display method, device and electronic equipment | |
CN106663208B (en) | Time notable figure | |
EP0408834B1 (en) | On screen display in a TV receiver | |
CN102135876A (en) | Method and system for generating irregular skin | |
JP3761559B1 (en) | Image output method | |
CN104007967B (en) | A kind of user interface creating method and device based on extensible markup language | |
CN102508663B (en) | Graphical interface layout setting device and method for multi-parameter monitor | |
CN101668144B (en) | Method for realizing semitransparent effect of image layer on video layer, device and set top box | |
CN107637075B (en) | Three-dimensional view processing | |
US7050112B2 (en) | Method and device for displaying at least two images within one combined picture | |
JP4522404B2 (en) | Image processing device | |
CN112672131B (en) | Panoramic video image display method and display device | |
CN109389558A (en) | A kind of method and device for eliminating image border sawtooth | |
CN102222354B (en) | Method and system for automatically drawing graphical interface | |
CN110851050A (en) | Method and device for testing clicking of page elements | |
CN111701255B (en) | Universal large-scale performance dynamic stage video display method | |
CN112185304B (en) | Video display system and method for reducing storage capacity and improving display resolution | |
CN107016976A (en) | Display control method and device and display screen system | |
JP2004110427A5 (en) | ||
CN116132572B (en) | Interface display method and electronic equipment | |
CN108509112A (en) | Menu display method and device, display equipment and storage medium | |
CN111683210B (en) | Space-time consistency-based large-scale performance dynamic stage video editing and displaying method | |
CN116841658A (en) | Interface display method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |