CN103559280A - Method for flexibly storing and displaying icons - Google Patents
Method for flexibly storing and displaying icons Download PDFInfo
- Publication number
- CN103559280A CN103559280A CN201310550112.XA CN201310550112A CN103559280A CN 103559280 A CN103559280 A CN 103559280A CN 201310550112 A CN201310550112 A CN 201310550112A CN 103559280 A CN103559280 A CN 103559280A
- Authority
- CN
- China
- Prior art keywords
- icon
- word
- character string
- program
- text
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a method for flexibly storing and displaying icons. According to the memory mode of a text word stock of embedded equipment, the icons are stored in the text word stock and are encoded, and text codes are directly mixed with icon codes to form a character string; if text and icon display needs to be corrected in a later period, the corresponding character string in a resource document can be directly corrected, and program codes do not need to be corrected; the combined character string can be displayed through the direct invocation of a text API (Application Programming Interface) function in a corresponding program position. The purpose of correcting a text and icon display mode without altering program can be achieved, so that the icons are flexibly displayed, and storage space can be reduced.
Description
Technical field
The present invention relates to a kind of character library flexible storage of embedded device and method of display icon utilized.
Background technology
Embedded device often need to show some simple icons, usually can be combined and show with word.Current common way is, first icon made to picture format, be stored in embedded device, and when needs show, first display icon, then display text.Program needs first to call picture API(interface function on realizing) icon of storage is shown, then calling word API shows word.Because the interface demand of various products is not quite similar, the binding sequence of icon and word also can be different because of needs, if the adjustment that put in order of icon and word, just need to remodify program, these are adjusted at the development phase and will often occur, and this has increased the workload of exploitation undoubtedly greatly.In addition, the storage space that need to take due to storage picture is larger than general word, if need the icon of demonstration many, needs more jumbo storer, thereby has increased the cost of embedded device.
Summary of the invention
The object of the present invention is to provide a kind of method of flexible storage and display icon, both can accomplish do not changing under the prerequisite of program, word and icon display mode are modified, thereby display icon neatly can reduce storage space again.
A method for flexible storage and display icon, step specific as follows:
Step 1, according to the storage mode of embedded device word character library, icon is stored in word character library and to its coding, this coding adopts present encoding to concentrate undefined code value;
Step 2, word and icon are combined: meeting under the prerequisite of concrete programming grammar, directly the coding of word and the icon formation character string that mixes; On the resource file that the character string program of being stored in can be accessed, and specify an identifier, make program find this character string by this identifier; If the later stage need to be revised the demonstration of word and icon, directly revise character string corresponding in resource file, do not need update routine code;
Step 3, at the corresponding place of program direct calling word api interface function, just can demonstrate the character string after combination.
Described step 1 specifically comprises the steps:
(1) with Window drawing tools, open after the icon that needs to show, calculate the pixel value of this icon;
(2) by character library handling implement, open the font file of program, select the position of an encoded radio not being used to set up a blank word, the pixel value identical with the icon that needs to show is set;
(3) icon showing as required, manually depicts figure at this blank word location, after operation character library handling implement converts this figure to .C code file, exports new font file, original font file in replacement program.
Adopt after technical scheme of the present invention, can have the following advantages:
1, the present invention at display text when icon is combined, can be directly word and icon according to the direct synthetic new character string of demand, during routine call word API, directly this, word and the icon after combination shows, the combination of display text and icon neatly;
2, icon of the present invention is stored in character library in an identical manner with word, and the form storage with respect to picture, can reduce storage space, thereby has reduced the cost that embedded device drops into;
3, the present invention due to by picture-storage in character library, amending method is the same with word, with respect to traditional complicated picture amending method, simple and convenient, the order adjustment showing for word and icon, can, without update routine, reduce development amount.
Accompanying drawing explanation
Fig. 1 to Fig. 4 is that in the present invention, icon stores step schematic diagram in common language character library into;
Below in conjunction with the drawings and specific embodiments, the invention will be further described.
Embodiment
The method of a kind of flexible storage of the present invention and display icon, comprises the steps:
Step 1, according to the storage mode of embedded device word character library, icon is stored in word character library and to its coding, this coding adopts present encoding to concentrate undefined code value, the most of latticed form that adopts of described embedded device Chinese word character library is stored, by the form of crossover tool or manual described point, just icon can be stored in word character library, specifically comprise the steps:
(1) obtain the icon that need to show as shown in Figure 1, after opening with Window drawing tools, can see the pixel distribution of icon as shown in Figure 2, from figure, can calculate, this icon as numerical values recited, be 11*12;
(2) by character library handling implement, open the font file of program, a blank word is set up in the position of selecting an encoded radio not being used for example 0XFFF1, and it is 11*12 that icon pixel value size is set, as shown in Figure 3;
(3) icon showing as required, manually depicts figure as shown in Figure 4 at this blank word location, after operation character library handling implement converts this figure to .C code file, exports new font file, original font file in replacement program.
The character set encoding that the present embodiment is used adopts UNICODE, also can adopt other coding; This character library handling implement mainly completes the conversion from generating writing pattern to .C code, also can manual modification .C code; The form of font file is .C code file not necessarily, other file layout that as required also can generator program can read.
Step 2, word and icon are combined, specifically comprise the steps:
(1) meeting under the prerequisite of concrete programming grammar, directly the coding of word and the icon formation character string that mixes;
(2) on the resource file that the character string program of being stored in can be accessed, and specify an identifier, make program find this character string by this identifier;
(3) if the later stage need to be revised the demonstration of word and icon, directly revise character string corresponding in resource file, do not need update routine code;
Object lesson is as follows:
According to C/C++ grammer, can be write as like this: " xfff1 This is a VPN icon ", wherein " xfff1 " is exactly the coding of VPN icon, stores resource file String.xml into upper, and distributes an identifier String_VPN;
If arrived development late stage, this interface need to be revised and be shown below:
Directly the character string that in resource file String.xml, String_VPN is corresponding is modified as: " The VPN icon is xfff1 ", does not need update routine code.
Step 3, at the corresponding place of program direct calling word api interface function, just can demonstrate the character string after combination.For example DrawText () is a word API, and program is directly called DrawText (String_VPN), just can show the character string after combination, as follows:
The above, it is only preferred embodiment of the present invention, not technical scope of the present invention is imposed any restrictions, therefore any trickle modification, equivalent variations and modification that every foundation technical spirit of the present invention is done above embodiment all still belong in the scope of technical solution of the present invention.
Claims (2)
1. a method for flexible storage and display icon, is characterized in that step specific as follows:
Step 1, according to the storage mode of embedded device word character library, icon is stored in word character library and to its coding, this coding adopts present encoding to concentrate undefined code value;
Step 2, word and icon are combined: meeting under the prerequisite of concrete programming grammar, directly the coding of word and the icon formation character string that mixes; On the resource file that the character string program of being stored in can be accessed, and specify an identifier, make program find this character string by this identifier; If the later stage need to be revised the demonstration of word and icon, directly revise character string corresponding in resource file, do not need update routine code;
Step 3, at the corresponding place of program direct calling word api interface function, just can demonstrate the character string after combination.
2. the method for a kind of flexible storage according to claim 1 and display icon, is characterized in that described step 1 specifically comprises the steps:
(1) with Window drawing tools, open after the icon that needs to show, calculate the pixel value of this icon;
(2) by character library handling implement, open the font file of program, select the position of an encoded radio not being used to set up a blank word, the pixel value identical with the icon that needs to show is set;
(3) icon showing as required, manually depicts figure at this blank word location, after operation character library handling implement converts this figure to .C code file, exports new font file, original font file in replacement program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310550112.XA CN103559280A (en) | 2013-11-08 | 2013-11-08 | Method for flexibly storing and displaying icons |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310550112.XA CN103559280A (en) | 2013-11-08 | 2013-11-08 | Method for flexibly storing and displaying icons |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103559280A true CN103559280A (en) | 2014-02-05 |
Family
ID=50013526
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310550112.XA Pending CN103559280A (en) | 2013-11-08 | 2013-11-08 | Method for flexibly storing and displaying icons |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103559280A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104361268A (en) * | 2014-11-28 | 2015-02-18 | 广州视源电子科技股份有限公司 | Watermark embedding and reading method, device and system |
CN104461564A (en) * | 2014-12-24 | 2015-03-25 | 浪潮(北京)电子信息产业有限公司 | Font-based icon generating method and device |
CN105094540A (en) * | 2015-06-30 | 2015-11-25 | 上海触乐信息科技有限公司 | Method and device for software icon display |
CN107704299A (en) * | 2017-09-11 | 2018-02-16 | 阿里巴巴集团控股有限公司 | The page display method and device of application APP, equipment, storage medium |
-
2013
- 2013-11-08 CN CN201310550112.XA patent/CN103559280A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104361268A (en) * | 2014-11-28 | 2015-02-18 | 广州视源电子科技股份有限公司 | Watermark embedding and reading method, device and system |
CN104461564A (en) * | 2014-12-24 | 2015-03-25 | 浪潮(北京)电子信息产业有限公司 | Font-based icon generating method and device |
CN105094540A (en) * | 2015-06-30 | 2015-11-25 | 上海触乐信息科技有限公司 | Method and device for software icon display |
WO2017000898A1 (en) * | 2015-06-30 | 2017-01-05 | 上海触乐信息科技有限公司 | Software icon display method and apparatus |
CN105094540B (en) * | 2015-06-30 | 2018-12-14 | 上海触乐信息科技有限公司 | Software icon display methods and device |
CN107704299A (en) * | 2017-09-11 | 2018-02-16 | 阿里巴巴集团控股有限公司 | The page display method and device of application APP, equipment, storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104007991A (en) | Method and device for adjusting application program interface layout | |
CN103559280A (en) | Method for flexibly storing and displaying icons | |
CN104731589A (en) | Automatic generation method and device of user interface (UI) | |
CN105528418B (en) | A kind of design documentation generation method and device | |
CN107122173A (en) | A kind of adaptation activiti, the list generation method that can be pulled | |
CN103412868A (en) | Method and device for generating document | |
CN105786578A (en) | Parameter configuration system and method | |
CN105630511A (en) | Font switching method and terminal equipment | |
CN103176802A (en) | Method of achieving separation of user interface UI of system and control library through control pool | |
CN104503769A (en) | Character dot matrix liquid crystal interface implementation method based on XML (extensive markup language) configuration file | |
CN104461519A (en) | Method for dynamically producing flow chart and controlling authority | |
CN106126284A (en) | The method and device shown for application program UI | |
CN103064661A (en) | Computer monitoring configuration screen extensible makeup language (XML) descriptor system and method | |
CN102375738B (en) | A kind of apparatus and method of mobile terminal data management | |
CN104765266B (en) | Simulation clock display method and device and LED display control card | |
CN105302558A (en) | Content presentation system and method for multiple clients | |
CN104375814A (en) | Generation method and device of an interface document | |
CN103049260A (en) | Method and system for displaying user interface of software at client | |
CN105653246A (en) | Method and device for implementing horizontal tabulation in Android system | |
CN105573973A (en) | Method for performing data correlation on EXCEL data in PPT file | |
CN105373388A (en) | Code management method for automatically uploading PATCH modifications | |
CN101571799A (en) | Editing system of application program interface and method thereof | |
CN104142824A (en) | Code generator based on class library and realization method of code generator | |
CN109947412B (en) | Automobile instrument HMI control program design system and method | |
CN104866313A (en) | Universal method for uploading files in JSP |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140205 |
|
WD01 | Invention patent application deemed withdrawn after publication |