CN101493768A - Method and device for setting display effect of skin element - Google Patents

Method and device for setting display effect of skin element Download PDF

Info

Publication number
CN101493768A
CN101493768A CNA2009100802016A CN200910080201A CN101493768A CN 101493768 A CN101493768 A CN 101493768A CN A2009100802016 A CNA2009100802016 A CN A2009100802016A CN 200910080201 A CN200910080201 A CN 200910080201A CN 101493768 A CN101493768 A CN 101493768A
Authority
CN
China
Prior art keywords
skin element
display effect
skin
calling interface
interface
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.)
Pending
Application number
CNA2009100802016A
Other languages
Chinese (zh)
Inventor
罗登
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNA2009100802016A priority Critical patent/CN101493768A/en
Publication of CN101493768A publication Critical patent/CN101493768A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for setting skin element display effect and a device thereof, which relates to the technical field of computers. The method comprises the steps of adding a call interface for each skin element in a skin engine and drawing figure of the skin elements by utilizing the call interface and according to the preset display effect. The device comprises an adding module and an effect drawing module. The embodiment of the invention adds one call interface in the skin elements and obtains the figure of the skin elements through the call interface when the interface design by utilizing the skin engine is carried out, and can compile the figure of the skin elements according to the preset display effect, thus leading the skin engine to flexibly realize various interface effects.

Description

A kind of method and apparatus that display effect of skin element is set
Technical field
The present invention relates to field of computer technology, particularly a kind of method and apparatus that display effect of skin element is set.
Background technology
The skin engine is the tool storage room that the developer is used for making up software interface, when a lot of developers carry out software development, all can construct the program interface that meets target by the skin engine.
The skin engine carries an interface database, comprises various skin elements: button (Button), picture (picture), text (Text) and menu (Menu) etc.Each skin element can provide the figure of self.The skin engine also provides a descriptive tool simultaneously, how be used for description by these skin element configuration program interfaces, use XML (eXtensible Markup Language such as the skin engine that has, extend markup language) language is described the skin element of forming program interface as instrument, and the content of description comprises the position of figure in program interface of the kind of skin element, quantity and skin element etc.By the description of descriptive tool, skin element is organized according to the relation of describing, form the relational tree that a plurality of skin elements are formed, each node on the relational tree all is the figure of a skin element.
In the prior art, when using skin engine drawing program interface, all be that relational tree according to skin element is according to the figure of being drawn skin element by bottom to the order on upper strata.When graphing, normally initiate to draw and call by the skin engine, successively the related data of skin element figure is converted into view then and is output on the computer screen, according to presenting the target program interface to the order on upper strata by bottom.
After prior art was studied, the inventor found:
In the prior art, the skin engine according to by bottom when the order on upper strata is successively drawn skin element, can not edit the display effect of skin element figure, the display effect of skin element figure is normally static, the program interface display effect of design is more single, can not show the skin element figure flexible and changeablely.
Summary of the invention
In order to change the display effect of skin element flexibly, the embodiment of the invention provides a kind of method and apparatus that display effect of skin element is set.Described technical scheme is as follows:
A kind of method that display effect of skin element is set, described method comprises:
For each skin element in the skin engine increases a calling interface;
Utilize described calling interface to draw the figure of described skin element according to default display effect.
The described display effect of presetting by described calling interface basis is drawn described skin element, comprising:
Obtain the figure of described skin element by the described calling interface that calls described skin element;
According to default display effect the figure of the described skin element that obtains is edited;
Figure to the described skin element behind the editor is drawn.
Described method also comprises:
Obtain the figure of described skin element by the described calling interface that calls described skin element;
According to default display position the figure of the described skin element that obtains is edited;
Figure to the described skin element behind the editor is drawn.
Described method also comprises:
Obtain the figure of described skin element by the described calling interface that calls described skin element;
According to default demonstration size the figure of the described skin element that obtains is edited;
Figure to the described skin element behind the editor is drawn.
Described display effect comprises: dynamic display effect and static display effect.
A kind of device that display effect of skin element is set, described device comprises:
Add module, be used to each skin element in the skin engine to increase a calling interface;
The effect drafting module is used to utilize described calling interface to draw the figure of described skin element according to default display effect.
Described effect drafting module comprises:
Acquiring unit is used for obtaining by the described calling interface that calls described skin element the figure of described skin element;
Edit cell is used for according to default display effect the figure of the described skin element that obtains being edited;
Drawing unit is used for the figure of the described skin element behind the editor is drawn.
Described device also comprises the position drafting module, and described position drafting module comprises:
Acquiring unit is used for obtaining by the described calling interface that calls described skin element the figure of described skin element;
Edit cell is used for according to default display position the figure of the described skin element that obtains being edited;
Drawing unit is used for the figure of the described skin element behind the editor is drawn.
Described device also comprises the scale module, and described scale module comprises:
Acquiring unit is used for obtaining by the described calling interface that calls described skin element the figure of described skin element;
Edit cell is used for according to default displaying ratio the figure of the described skin element that obtains being edited;
Drawing unit is used for the figure of the described skin element behind the editor is drawn.
Described display effect comprises: dynamic display effect and static display effect.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is:
By in skin element, increasing a calling interface, when utilizing the skin engine to carry out INTERFACE DESIGN, obtain the figure of skin element by this calling interface, and can edit the figure of skin element according to default display effect, make the various interfacial effects of realization that the skin engine can be flexible and changeable.
Description of drawings
Fig. 1 is the method flow diagram that display effect of skin element is set that the embodiment of the invention 1 provides;
Fig. 2 is the method flow diagram that display effect of skin element is set that the embodiment of the invention 2 provides;
Fig. 3 is the structural representation of the device that display effect of skin element is set that provides of the embodiment of the invention 3.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment 1
Referring to Fig. 1, in order to change the display effect of skin element flexibly, present embodiment provides a kind of method that display effect of skin element is set, and this method comprises:
101: for each skin element in the skin engine increases a calling interface.
In embodiments of the present invention,, make outside program or function when obtaining the figure of skin element, can edit the display effect of skin element figure by this calling interface by in each skin element, increasing a calling interface.
Such as, be example with skin element picture picture, the class of picture picture is Class Cpicture, is defined as follows:
Class?Cpicture
{
Int?GetLeft();
Int?GetRight();
Int?GetTop();
Int GetBottom (); // coordinate is set
Void?SetLeft();
Void?SetRight();
Void?SetTop();
Void SetRight (); // obtain coordinate
SetImagePath (strPath); // design path
Void Draw (HDC hdc); // drawing function
};
By above-mentioned definition as can be known, in the definition of Cpicture, comprise: coordinate is set, obtains coordinate, the picture file path of picture element and the function Draw that draws on screen (HDC hdc) are set.
In order to make picture picture element in the class of picture picture element, be increased the interface of a Bitmap*getpresentation () by external program or function call and editor, form is as follows:
class?Cpicture
{
Int?GetLeft();
Int?GetRight();
Int?GetTop();
Int?GetBottom();
Void?SetLeft();
Void?SetRight();
Void?SetTop();
Void?SetRight();
SetImagePath(strPath);
Void?Draw(HDC?hdc);
Bitmap*GetPresentation (); The calling interface of // increase
};
Picture (picture) element that has increased the interface of GetPresentation can be edited the display effect of the figure of picture (picture) element by external program or function call the time.
102: utilize this calling interface to draw the figure of this skin element according to default display effect.
Concrete, when using skin engine drawing program interface, draw the figure of certain skin element if desired, the calling interface that then calls this skin element earlier obtains the figure of this skin element, according to default display effect the figure of the skin element that obtains is edited then, at last the figure of the skin element behind the editor is drawn.The figure of the skin element of drafting can be presented with default display effect.Default display effect can be dynamic, such as can being to enlarge gradually and thin out gradually until the effect that disappears, or the effect of roll display.When not needing dynamically to show the figure of skin element, default display effect also can be the display effect of static state.
Concrete, be example still with picture (picture) element, when the figure P1 of the some pictures of needs (picture) element is presented in the interface, and display effect is also thin out gradually until disappearance for enlarging gradually.The calling interface that then can use function call picture (picture) element is to obtain figure P1, and figure P1 is carried out the editor of display effect, promptly according to default display effect, the corresponding display effect parameter of configuration in this function, then figure P1 is drawn, realize the requirement of dynamic display graphics P1.
The function of display graphics can be g.DrawImage, realizes that the dynamic false code that shows of figure is as follows:
CPiture?P1;
bmpP1=P1.GetPresentation();
Graphics?g(hdc);
For (circulation)
{
g.DrawImage(bmpP1,K1,K2);
}
By above-mentioned false code as can be seen, by increasing the calling interface of GetPresentation (), make function g.DrawImage when obtaining figure P1, can edit the display effect of figure P1, be about to the parameter of bmpP1 as function g.DrawImage, and dispose corresponding display effect parameter K 1 and K2, realize the purpose of dynamic displaying pictures.Wherein, the size of parameter K 1 presentation graphic in the interface of configuration enlarges gradually, and the opacity of parameter K 2 presentation graphics of configuration lowers gradually since 100%.
What remark additionally is: after having realized that the skin element dynamic figures shows, for the graphic presentation that makes skin element in position, can also be by calling the figure that this calling interface obtains this skin element, according to default display position the figure of this skin element of obtaining is edited, and the figure of this skin element behind the editor drawn, the figure of the skin element of drafting can be presented at default display position.In addition, when drawing the figure of skin element, what need to consider not only comprises display position, also comprises the displaying ratio of figure etc., and just need further edit the figure of skin element this moment, and the method for editor's method and editing graph position is similar.
Be example still with (picture) element figure P1 that Shows Picture, as needs display graphics P1 on program interface, and display effect is also thin out gradually until disappearance for enlarging gradually, the coordinate that is presented on the program interface is (x, y), the displaying ratio size is 60% o'clock of source picture file, then can dispose corresponding display effect parameter, display position parameter and show size parameter in function, then figure P1 is drawn, realize the dynamic demonstration of figure P1.Concrete false code is as follows:
CPiture?P1;
bmqpP1=P1.GetPresentation();
Graphics?g(hdc);
For (circulation)
{
g.DrawImage(bmpP1,K1,K2,K3,K4);
}
Wherein, the size of parameter K 1 presentation graphic in the interface of configuration enlarges gradually, and the opacity of parameter K 2 presentation graphics of configuration lowers gradually since 100%.(x, y), the size of the parameter K 4 presentation graphic P1 of configuration is 60% of a source picture file to the coordinate of the parameter K 3 presentation graphic P1 of configuration.
It is emphasized that: present embodiment only is shown as example with rendered images picture element dynamic figures, figure for other skin elements, when carrying out the drafting of dynamic display effect such as the figure of button (Button), menu (Menu) and text elements such as (Text), the method of method for drafting and rendered images (picture) element figure is similar, repeats no more herein.
The embodiment of the invention is by increasing a calling interface in skin element, when utilizing the skin engine to carry out INTERFACE DESIGN, obtain the figure of skin element by this calling interface, and according to default display effect the figure of skin element is edited, make the various interfacial effects of realization that the skin engine can be flexible and changeable.
Embodiment 2
Present embodiment provides a kind of method that display effect of skin element is set, and expands on the basis of embodiment 1, makes the method for design dynamic skin element figure can be applied to multiple operation interface, as window interface, and dialog box etc.
In embodiments of the present invention, can be according to the needs of practical application, in the resources bank of skin engine, add the required skin element and the figure of skin element in advance, make the designer when operation interface is designed, can directly from the resources bank of skin engine, call these skin elements.The method that the embodiment of the invention provides is as follows:
201: for each skin element in the skin engine increases a calling interface.
Concrete, the method that increases calling interface for each skin element in the skin engine is identical with 101, repeats no more herein.After in skin element, having increased calling interface, just can edit the display effect of skin element figure.
202: in operation interface, add required skin element.
Concrete, can adopt the method for from the resources bank of skin engine, calling skin element, in operation interface, increase skin element.
Such as, in a window interface, need the new skin element button that adds, then can from the resources bank of skin engine, call the skin element button, and this button is added in the window interface.
203: for the skin element that adds is selected suitable skin element figure.
Concrete, in operation interface, added skin element after, also to select the figure of this skin element according to concrete needs.Such as, need in 202, to have selected the interpolation button, then in 203, need further selection to need the figure of the button of interpolation, as selecting rhombus button of interpolation according to the design requirement of window interface.Wherein, the figure of this button is to be added in advance in the resources bank of skin engine, so that when utilizing the skin engine to carry out the design of window interface, can directly call the figure of this button from the resources bank of skin engine.
204: utilize this calling interface to draw the figure of this skin element according to default display effect.
Concrete, the method for drawing above-mentioned skin element figure in window interface is identical with 102, repeats no more herein.
In embodiments of the present invention, owing in skin element, increased calling interface, make the designer when utilizing function or program to get access to the figure of skin element, can edit the display effect of the figure of skin element, the figure that is about to skin element is as parameter, and disposing corresponding display effect parameter to realize dynamic display effect, concrete grammar is similar to Example 1, repeats no more herein.
On this basis, because the figure of the skin element that adds in operation interface can design dynamically, therefore, the designer can have bigger intention performance space, the better window interface of design display effect.Such as, in the above-mentioned window interface that adds the rhombus button, this rhombus push-button design can be become change the demonstration of color, the demonstration of perhaps changing from small to big makes that the demonstration of window interface is abundant and flexible and changeable more.
It is emphasized that: present embodiment is that example describes to add dynamic skin element figure at window interface only, operation interface for other types, as the method for adding dynamic skin element figure at operation interfaces such as dialog boxes similarly, repeat no more herein.
The embodiment of the invention is by increasing a calling interface in skin element, make the designer when utilizing the skin engine to carry out the design of operation interface, can in operation interface, add required skin element figure, and can edit the skin element figure according to default display effect, make that the display effect of operation interface is more flexible and changeable.
Embodiment 3
The embodiment of the invention provides a kind of device that display effect of skin element is set, and referring to Fig. 3, comprising:
Add module 301, be used to each skin element in the skin engine to increase a calling interface;
Effect drafting module 302 is used to utilize this calling interface to draw the figure of this skin element according to default display effect.
Concrete, in the embodiment of the invention, can call the figure that this calling interface obtains this skin element by this; According to default display effect the figure of this skin element of obtaining is edited and drawn, the skin element figure of drafting can be presented with default display effect.Default display effect can be the display effect of static state, also can be dynamic display effect.
This effect drafting module 302 comprises:
Acquiring unit 302a is used for obtaining by this calling interface that calls this skin element the figure of this skin element;
Edit cell 302b is used for according to default display effect the figure of this skin element of obtaining being edited;
Drawing unit 302c is used for the figure of this skin element behind the editor is drawn.
Further, after having realized skin element dynamic figures display effect, for the graphic presentation that makes skin element in correct position, can also be by calling the figure that this calling interface obtains this skin element; According to default display position the figure of this skin element of obtaining is edited and drawn; The figure of the skin element of drafting can be presented on default display position.
At this moment, this device also comprises position drafting module 303, and this position drafting module 303 comprises:
Acquiring unit 303a is used for obtaining by this calling interface that calls this skin element the figure of this skin element;
Edit cell 303b is used for according to default display position the figure of this skin element of obtaining being edited;
Drawing unit 303c is used for the figure of this skin element behind the editor is drawn.
For the figure that makes skin element is presented in the program interface with suitable ratio, can also be by calling the figure that this calling interface obtains this skin element; According to default displaying ratio the figure of this skin element of obtaining is edited and drawn, the figure of the skin element of drafting can be presented with default displaying ratio.
At this moment, this device also comprises scale module 304, and this scale module 304 comprises:
Acquiring unit 304a is used for obtaining by this calling interface that calls this skin element the figure of this skin element;
Edit cell 304b is used for according to default displaying ratio the figure of this skin element of obtaining being edited;
Drawing unit 304c is used for the figure of this skin element behind the editor is drawn.
The embodiment of the invention is by increasing a calling interface in skin element, when utilizing the skin engine to carry out INTERFACE DESIGN, obtain the figure of skin element by this calling interface, and can edit the figure of skin element according to default display effect, make the various interfacial effects of realization that the skin engine can be flexible and changeable.
The embodiment of the invention can utilize software to realize that corresponding software programs can be stored in the storage medium that can read, for example, and in the hard disk of router, buffer memory or the CD.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1, a kind of method that display effect of skin element is set is characterized in that, described method comprises:
For each skin element in the skin engine increases a calling interface;
Utilize described calling interface to draw the figure of described skin element according to default display effect.
2, the method that display effect of skin element is set according to claim 1 is characterized in that, the described display effect of presetting by described calling interface basis is drawn described skin element, comprising:
Obtain the figure of described skin element by the described calling interface that calls described skin element;
According to default display effect the figure of the described skin element that obtains is edited;
Figure to the described skin element behind the editor is drawn.
3, the method that display effect of skin element is set according to claim 1 is characterized in that, described method also comprises:
Obtain the figure of described skin element by the described calling interface that calls described skin element;
According to default display position the figure of the described skin element that obtains is edited;
Figure to the described skin element behind the editor is drawn.
4, the method that display effect of skin element is set according to claim 1 is characterized in that, described method also comprises:
Obtain the figure of described skin element by the described calling interface that calls described skin element;
According to default demonstration size the figure of the described skin element that obtains is edited;
Figure to the described skin element behind the editor is drawn.
5, the method that display effect of skin element is set according to claim 1 is characterized in that, described display effect comprises: dynamic display effect and static display effect.
6, a kind of device that display effect of skin element is set is characterized in that, described device comprises:
Add module, be used to each skin element in the skin engine to increase a calling interface;
The effect drafting module is used to utilize described calling interface to draw the figure of described skin element according to default display effect.
7, the device that display effect of skin element is set according to claim 6 is characterized in that, described effect drafting module comprises:
Acquiring unit is used for obtaining by the described calling interface that calls described skin element the figure of described skin element;
Edit cell is used for according to default display effect the figure of the described skin element that obtains being edited;
Drawing unit is used for the figure of the described skin element behind the editor is drawn.
8, the device that display effect of skin element is set according to claim 6 is characterized in that, described device also comprises the position drafting module, and described position drafting module comprises:
Acquiring unit is used for obtaining by the described calling interface that calls described skin element the figure of described skin element;
Edit cell is used for according to default display position the figure of the described skin element that obtains being edited;
Drawing unit is used for the figure of the described skin element behind the editor is drawn.
9, the device that display effect of skin element is set according to claim 6 is characterized in that, described device also comprises the scale module, and described scale module comprises:
Acquiring unit is used for obtaining by the described calling interface that calls described skin element the figure of described skin element;
Edit cell is used for according to default displaying ratio the figure of the described skin element that obtains being edited;
Drawing unit is used for the figure of the described skin element behind the editor is drawn.
10, the device that display effect of skin element is set according to claim 6 is characterized in that, described display effect comprises: dynamic display effect and static display effect.
CNA2009100802016A 2009-03-13 2009-03-13 Method and device for setting display effect of skin element Pending CN101493768A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2009100802016A CN101493768A (en) 2009-03-13 2009-03-13 Method and device for setting display effect of skin element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2009100802016A CN101493768A (en) 2009-03-13 2009-03-13 Method and device for setting display effect of skin element

Publications (1)

Publication Number Publication Date
CN101493768A true CN101493768A (en) 2009-07-29

Family

ID=40924383

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2009100802016A Pending CN101493768A (en) 2009-03-13 2009-03-13 Method and device for setting display effect of skin element

Country Status (1)

Country Link
CN (1) CN101493768A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012159508A1 (en) * 2011-05-23 2012-11-29 腾讯科技(深圳)有限公司 Method for editing skin of client and skin editor
CN102929617A (en) * 2012-10-18 2013-02-13 广东威创视讯科技股份有限公司 Skin exchanging method for Web software UI (User Interface)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012159508A1 (en) * 2011-05-23 2012-11-29 腾讯科技(深圳)有限公司 Method for editing skin of client and skin editor
CN102929617A (en) * 2012-10-18 2013-02-13 广东威创视讯科技股份有限公司 Skin exchanging method for Web software UI (User Interface)

Similar Documents

Publication Publication Date Title
US6792595B1 (en) Source editing in a graphical hierarchical environment
Souchon et al. A review of XML-compliant user interface description languages
JP5102828B2 (en) Method and system for generating an application data editor
KR101213809B1 (en) electronic document style matrix
Vanderdonckt et al. Flexible reverse engineering of web pages with vaquista
US5812847A (en) Rule-based method for designing user interfaces for applications
US20040133854A1 (en) Persistent document object model
US7818690B2 (en) Framework for creating user interfaces containing interactive and dynamic 3-D objects
CN105094832A (en) WYSIWYG method and system for dynamically generating user interface
CN101211260B (en) GUI generation apparatus and method for generating gui
JP2004005568A (en) Updating of high-speed gui style of legacy application
US20010017622A1 (en) Apparatus and method for generating a configurable program explanation using templates and transparent graphical user interfaces
CN104657384A (en) Dynamic allocation report data processing method based on two-dimension relationship
JP2013518321A (en) Pattern-based user interface
US9286270B2 (en) Simultaneously displaying multiple related documents in a logically hierarchical manner
CN114048111A (en) Vue framework-based user-defined data visualization large-screen implementation method
WO2016099317A1 (en) Method and system for the visual management of data
CA2686367A1 (en) Dynamic native editor code view facade
US20030037310A1 (en) Visual programming tool and execution environment for developing computer software applications
CN112711731A (en) Data point burying method, device, equipment and storage medium
CN112631585B (en) XML-based rapid parameter interface configuration method
Luyten et al. Uiml. net: an open uiml renderer for the. net framework
CN101493768A (en) Method and device for setting display effect of skin element
CN115691772A (en) Operation visualization system and corresponding computer device and storage medium
JP3447365B2 (en) Object-oriented programming support device and object-oriented programming support method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20090729