CN100405293C - Dot matrix graphic interface development method - Google Patents
Dot matrix graphic interface development method Download PDFInfo
- Publication number
- CN100405293C CN100405293C CNB2006100212956A CN200610021295A CN100405293C CN 100405293 C CN100405293 C CN 100405293C CN B2006100212956 A CNB2006100212956 A CN B2006100212956A CN 200610021295 A CN200610021295 A CN 200610021295A CN 100405293 C CN100405293 C CN 100405293C
- Authority
- CN
- China
- Prior art keywords
- dot matrix
- display screen
- graphic
- graphical interfaces
- api 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Digital Computer Display Output (AREA)
Abstract
The present invention discloses a development method of a dot matrix graphic interface, which relates to a method of carrying out development of graphic interfaces in a real-time operational system. The development method of a raster graphic interface comprises the steps that API interface programs of graphic processing are formed in advance and then stored in a single-chip computer, a graphic interface is formed by combination or generated through changes on a display screen by invoking the API interface programs of graphic processing in the single-chip computer, and each of the formed API interface programs of graphic processing is a program in which the changes of the display screen are controlled by controlling dot matrix collections on the display screen; a step of obtaining the dot matrix collections of the pictures of the graphic interface is also needed during the step of forming the API interface programs of graphic processing and the step of storing the API interface program of graphic processing in the single-chip computer. The present invention has the advantages of low difficulty of graphical interface development, small quantity of the API interface programs of graphic processing, good real-time performance and no flicker on the display screen at the time of graphic changes, and is applicable to the graphic interface development carried out by real-time operational systems such as vxWorks, etc.
Description
Technical field
The present invention relates to a kind of method of in real time operating system, carrying out the graphical interfaces exploitation, particularly a kind of method of in the vxWorks real time operating system, carrying out the graphical interfaces exploitation.
Background technology
When on the PC system platform, developing graphical interface of user, the developer can utilize a large amount of development languages and IDE, and (Integerated Development Environment is the software of the utility relevant with exploitation such as a kind of integrated code editor, compiler, debugger etc.Because most of common tool all integrated,, can increase work efficiency greatly so use IDE to develop work) the graphical interfaces developing instrument that provides, finish the work of designing and developing apace.Yet, on based on vxWorks embedded real-time operating system (or being called platform), the development graph interface but faces more technical barrier: because operating system generally only provides simple graphics process API (Application Programming Interface, application programming interfaces, usually be also referred to as api function), as described point, cls etc., improved the difficulty that graphical interfaces is made greatly; Though developing instruments such as use zinc can improve graphical interfaces development efficiency, but the graphical interfaces that develops thus must be based on windml graphical interfaces development platform, and the general size of class windows interface element that developing instrument provides is bigger, if very little at screen size, do not support that multicolour, system real time can exigent situations under, then be not suitable for adopting zinc.And traditional graphical interfaces API method for packing, the general API that draws point, line, surface, character figures that all only provides, really to realize the drafting of graphical interfaces, still a large amount of API must be combined that the complexity of exploitation and debugging does not still obtain basic simplification.
Traditional graphical interfaces development method all is the direct control display screen, whenever the figure that shows changes, just can only first cls, and weigh " picture " whole screen then, such consequence causes screen flicker exactly, and executing efficiency is very low.
Summary of the invention
The objective of the invention is: solve that on embedded real-time operating systems such as vxWorks development graph interface difficulty height, graphical interfaces real-time performance are relatively poor, the technical barrier of display screen flicker during graphic change, provide a kind of graphical interfaces exploitation easily, graphics process api interface program quantity is few, real-time performance good, display screen does not glimmer during graphic change dot matrix graphic interface development method.
The objective of the invention is to realize by following technical proposals:
Dot matrix graphic interface development method comprises the steps:
A. make up graphics process api interface program in advance, the graphics process api interface program of structure is the dot matrix set on the control display screen, with the program of control display screen variation;
B. with graphics process api interface procedure stores in single-chip microcomputer;
C. obtain the dot matrix set of graphical interfaces picture;
D. call the graphics process api interface program in the single-chip microcomputer, the dot matrix that changes display screen according to the dot matrix set of graphical interfaces picture shows, to constitute or to change the generation graphical interfaces.
Described graphical interfaces picture format is GIF or JPG or BMP or PNG.
Be provided with the graphics cache device in the described single-chip microcomputer, when calling graphics process api interface program and on display screen, generate new graphical interfaces, the pixel data that to put in order the screen figure earlier originally is kept in the graphics cache device, according to the data in the call instruction elder generation modification graphics cache device, again the dot matrix zone that changes in the graphics cache device is mapped on the display screen then.
Comprise the output character program in the described graphics process api interface program, the character of output comprises that the user can self-defining ESC.
Graphics process api interface program of the present invention is to draw relevant api routine with dot matrix, gather to realize the exploitation of graphical interfaces by the dot matrix that calls on the direct control display screen, compare with traditional drafting point, line, surface, the API of character figures, have following advantage:
1, avoided graphic elements a large amount of in the traditional graph INTERFACE DESIGN method to draw programing work, has the advantage that api interface program quantity is few, use simply, have a clear meaning, the user is when the development graph interface, do not need to consider the stack of various point, line, surface, greatly reduce the difficulty of programming, and character and the drafting of some special graphic elements is unified in the draw characters operation, simplified the drafting of dynamic content in the interface;
2, the fast lattice set Core Generator by providing, directly obtain the dot matrix set of graphical interfaces picture, realized to a certain extent the exploitation of real time operating system graphical interfaces " What You See Is What You Get " as long as---the picture of the graphical interfaces that can draw, just can be translated into the dot matrix set very soon, show on goal systems by development approach of the present invention, make the exploitation at complex figure interface under the limited platform become possibility;
3, the graphics cache device is set, when graphical interfaces changes, revise graphics cache earlier, again the zone that changes in the buffer memory is mapped on the display screen, just can effectively solve the problem of screen flicker, and reduced the frequency and the scope of screen-refresh, and significantly reduced unnecessary I/O operation, improved executing efficiency;
4, utilize the part of relationship between light and dark reversing and graphics cache device to paste, can realize ejecting dialog box, the highlighted complex figure interface such as demonstration of choosing easily;
5, the present invention does not adopt windml (wind multi-library) graphical interfaces development platform, and be that the upper strata encapsulation has been done on the basis with VGA described point, cls program directly, the graphical interfaces of developing instrument exploitations such as ratio use zinc is " lightweight " more, does not need vxWorks system configuration windml module.Simultaneously, only need replace bottom described point, cls api routine, just can realize the transplanting of system easily according to the bottom api routine that different system platform provides.
As seen, adopt the present invention of above-mentioned steps, compared with prior art, have that the graphical interfaces development difficulty is low, graphics process api interface program quantity is few, real-time performance good, display screen does not glimmer, uses simple advantage during graphic change, applicable to carrying out as real time operating systems such as vxWorks in the graphical interfaces exploitation.
Description of drawings
Fig. 1 is the synoptic diagram of the embodiment of the invention;
Fig. 2 is the synoptic diagram that obtains the set of graphical interfaces picture dot matrix of the embodiment of the invention;
Fig. 3 is the graphical interfaces synoptic diagram of the embodiment of the invention.
Embodiment
The present invention is further illustrated below in conjunction with specific embodiments and the drawings.
Development graph interface in microcontroller embedded real time operating system, the display screen of this single-chip microcomputer are the single colour liquid crystal display of 160 * 120 specifications.At first in the storer of its single-chip microcomputer, make up a cover as shown in table 1 in advance and draw relevant graphics process api interface program, and be called api function with dot matrix.As can be seen, above-mentioned function is divided from function and is mainly contained three classes: the one, and utilize the dot matrix set to draw all or part of figure; The 2nd, all or part of cls; The 3rd, to dot matrix set typewrite, operations such as regional stickup, deepening, light and shade conversion.Above-mentioned function all according to the customization of 160 * 120 specifications, at different screen specification, can be made amendment above-mentioned function.
Table 1 graphics process api interface program list
Title | Chinese | Statement | Effect |
DrawFrame | Draw whole screen function | Void drawFrame (unsigned long data[120] [5]); | With the dot matrix set serves as according to drawing whole screen image. |
DrawArea | The drawing area function | Void drawArea (unsigned long data[120] [5], int sX, int sY, int eX, int eY); | With the image in the dot matrix set foundation drafting appointed area. |
SetHZat | Insert character function | Void setHZat (unsigned long data[120] [5], char buf[], int x, int y); | Assigned address in the dot matrix set inserts character, but does not directly draw, and background is entirely for black in the appointed area. |
PasteArea | Paste function | Void pasteArea (unsigned long sourceData[120] [5], unsigned long destData[120] [5], int sX, int sY, int eX, int eY); | Image information in the source point battle array appointed area in the parameter is pasted in the identical zone of target dot matrix. |
DarkArea | Appointed area deepening function | Void darkArea (unsigned long data[120] [5], int sX, int sY, int eX, int eY); | Make deepening in the dot matrix appointed area, but do not draw. |
Overturn | Light and shade reversing function | Void overturn (unsigned long data[120] [5], int sX, int sY, int eX, int eY); | The relationship between light and dark that dot matrix is gathered in the specified scope reverses, but does not draw. |
ClearScreen | The cls function | Void clearScreen (); | Make all pixel deepenings on the screen. |
ClearArea | Remove the appointed area function | Void clearArea (int sX, int sY, int eX, int eY); | Make the whole deepenings of pixel in the appointed area. |
The main implementation method of each graphics process api interface program (api function) is in the table 1:
1, full frame function: adopt a unsigned long variable to represent the relationship between light and dark of horizontal 32 pixels (0 expression is dark, 1 expression is bright), then delegation needs 5,5 * 120 unsigned long of full frame need variable, sets gradually the light and shade of all pixels in full frame scope according to these 600 unsigned long variablees.
2, drawing area function: the whole screen of implementation method and drafting is similar, but the pixel beyond the scope of appointed area is not provided with, and regional extent is definite by upper left coordinate with 2 of bottom rights.
3, insert character function: (a western language character boundary is 8 * 16 pixels to index word lattice in the character library by the literal code in the char array, Chinese double byte character size is 16 * 16 characters), from the assigned address beginning according to the pixel-matrix light and shade in the word lattice information change respective range.
4, paste function: at first utilize the target dot matrix to draw whole screen operation, utilize the source point battle array in specified scope, to carry out the drawing area operation again.
5, light and shade reversing function: source point battle array and complete 1 is carried out xor operation in specified scope.
6, cls function: draw whole screen with complete 0 dot matrix.
7, remove the appointed area function: dot matrix is carried out and operation with complete 0, draw whole screen again in the appointed area.
8, appointed area deepening function: dot matrix is carried out and operation with complete 0 in the appointed area.
Then, design on computers and want the graphical interfaces picture that on the display screen of single-chip microcomputer, shows, as shown in Figure 2, the left side is the graphical interfaces picture, this picture can be GIF or JPG or BMP or PNG form, (this instrument can be to adopt the general program of extracting dot matrix from the picture pixel by picture Pixel Information extraction apparatus, the dot matrix collective data that will extract from the picture pixel is stored or is transmitted by the data layout of unsigned long) set of the dot matrix of picture is extracted, the graphic structure of graphical interfaces is converted into corresponding with it dot matrix set, and the right of Fig. 2 is that picture pixel extraction device moves the screen synoptic diagram that extracts the set of graphical interfaces picture dot matrix on computers.Then that other is follow-up graphical interfaces picture all obtains its dot matrix set by same mode.
As shown in Figure 1, the dot matrix set of graphical interfaces is stored in the graphics cache device, when graphical interfaces changes, direct control display screen not, revise the corresponding dot matrix collective data in the graphics cache device earlier, again the zone that changes in the graphics cache device is mapped on the display screen, during this, can utilize the ClearArea function to remove the dot matrix of appointed area, utilize the DrawArea function to draw the dot matrix of appointed area again.
Utilize the graphics cache device, some it seems that complicated operations can become simple in the past.For example, can use and complete 1 xor operation, constructor overturn realizes the relationship between light and dark reversing with the appointed area like a cork.All right constructor pasteArea utilizes dot array data in two appointed areas that are stored in the buffer, carries out the figure " stickup " in position or the operation realization appointed area.Like this, seem to be difficult to the ejection dialog box operation of realization, utilize the pasteArea function just to become very simple.
The dot matrix set of common Chinese and western languages character and user-defined ESC is stored in the storer, and with itself and as shown in table 2 being mapped of ASC II code value, utilize the API of storage in advance to insert character function, it can be accessed in the dot matrix that is inserted in graphical interfaces, realize the dynamic demonstration of graphical interfaces and the drafting of complicated interface element fast.
According to said method, can on the real time operating system display screen that with the single-chip microcomputer is the processing core, develop graphical interfaces as shown in Figure 3, and function prompt is directly perceived, as to choose label be 1 icon, nethermost blank bar middle part will show the text prompt of " system ", adopts traditional graphical interfaces development method may develop these complicated interfaces attractive in appearance hardly on real time operating systems such as limited platform such as vxWorks.
Table 2 User Defined ESC ASCII character value corresponding tables
Claims (3)
1. dot matrix graphic interface development method is characterized in that:
Comprise the steps,
A. make up in advance and comprise the graphics process api interface program of drawing full frame, drawing area, insertion character, stickup, light and shade reversing, appointed area deepening, cls, removing appointed area, the graphics process api interface program that makes up is the dot matrix set on the control display screen, with the program of control display screen variation;
B. with graphics process api interface procedure stores in single-chip microcomputer;
C. obtain the dot matrix set of graphical interfaces picture;
D. call the graphics process api interface program in the single-chip microcomputer, be provided with the graphics cache device in the single-chip microcomputer, when calling graphics process api interface program and on display screen, generate new graphical interfaces, the pixel data that to put in order the screen figure earlier originally is kept in the graphics cache device, then according to the data in the call instruction elder generation modification graphics cache device, again the dot matrix zone that changes in the graphics cache device is mapped on the display screen, the dot matrix that set changes display screen according to the dot matrix of graphical interfaces picture shows, to constitute or to change the generation graphical interfaces.
2. dot matrix graphic interface development method as claimed in claim 1 is characterized in that: described graphical interfaces picture format is GIF or JPG or BMP or PNG.
3. dot matrix graphic interface development method as claimed in claim 2 is characterized in that: comprise the output character program in the graphics process api interface program, the character of output comprises that the user can self-defining ESC.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100212956A CN100405293C (en) | 2006-06-29 | 2006-06-29 | Dot matrix graphic interface development method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100212956A CN100405293C (en) | 2006-06-29 | 2006-06-29 | Dot matrix graphic interface development method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1869924A CN1869924A (en) | 2006-11-29 |
CN100405293C true CN100405293C (en) | 2008-07-23 |
Family
ID=37443592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006100212956A Expired - Fee Related CN100405293C (en) | 2006-06-29 | 2006-06-29 | Dot matrix graphic interface development method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100405293C (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833940B (en) * | 2009-03-13 | 2012-03-14 | 武汉奇致激光技术有限公司 | Method for realizing LCD full-screen background picture display in singlechip system |
CN102929615A (en) * | 2012-10-16 | 2013-02-13 | 北京迪文科技有限公司 | Display method and display device of man-machine interaction equipment |
CN107220225A (en) * | 2016-06-17 | 2017-09-29 | 林德(中国)叉车有限公司 | Multilingual instrument and the built-in character library generation for multilingual instrument and display mode |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001042934A2 (en) * | 1999-12-13 | 2001-06-14 | Honeywell International Inc. | Driving of multiple displays of a plurality of types |
CN1517859A (en) * | 2003-01-17 | 2004-08-04 | 英业达股份有限公司 | Graphic interface development method of application program |
-
2006
- 2006-06-29 CN CNB2006100212956A patent/CN100405293C/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001042934A2 (en) * | 1999-12-13 | 2001-06-14 | Honeywell International Inc. | Driving of multiple displays of a plurality of types |
CN1517859A (en) * | 2003-01-17 | 2004-08-04 | 英业达股份有限公司 | Graphic interface development method of application program |
Non-Patent Citations (4)
Title |
---|
Zinc--嵌入式操作系统VxWorks下的用户图形界面开发工具. 陈旭,李义民.电子科技,第4期. 2005 |
Zinc--嵌入式操作系统VxWorks下的用户图形界面开发工具. 陈旭,李义民.电子科技,第4期. 2005 * |
基于V xWorks 的中文图形界面开发. 焦永和,冯欣欣.北京理工大学学报,第26卷第2期. 2006 |
基于V xWorks 的中文图形界面开发. 焦永和,冯欣欣.北京理工大学学报,第26卷第2期. 2006 * |
Also Published As
Publication number | Publication date |
---|---|
CN1869924A (en) | 2006-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2004205327B2 (en) | Programming interface for a computer platform | |
CN110069257B (en) | Interface processing method and device and terminal | |
US7426734B2 (en) | Facilitating presentation functionality through a programming interface media namespace | |
Petzold | Creating Mobile Apps with Xamarin. Forms Preview Edition 2 | |
US5986654A (en) | System and method for rendering on-screen iconic buttons with dynamic textual link | |
US20050091575A1 (en) | Programming interface for a computer platform | |
CN101008939A (en) | Implementation method of dot matrix word library of embedded system | |
CN111324381B (en) | Development system, development method, development apparatus, computer device, and storage medium | |
CN104657384A (en) | Dynamic allocation report data processing method based on two-dimension relationship | |
CN104298504A (en) | Method for achieving font rendering based on FreeType font engine | |
CN100405293C (en) | Dot matrix graphic interface development method | |
US20230343000A1 (en) | Method and apparatus for picture generation and storage medium | |
CN102253841A (en) | Small-scale graphical user interface system | |
CN101000557A (en) | Virtual machine | |
CN102801936B (en) | Method for realizing on screen display | |
CN102109999B (en) | Realizing method for liquid crystal interface relay protection | |
CN102902534A (en) | Transparent OSD (Optical Scanning Device) software realization method | |
CN112667210A (en) | Modularization customizing method and device for geographic information system software | |
CN112070858A (en) | Method for realizing electronic chart representation library conforming to S-52 specification | |
CN102567017B (en) | The Simple Realizable Method that a kind of OSD interface exports and device | |
CN108553899A (en) | A kind of i.e. point plays the development device and its method of game | |
CN101493768A (en) | Method and device for setting display effect of skin element | |
Schneider et al. | AUI: A programming language for developing plastic interactive software | |
Calder | Building user interfaces with lightweight objects | |
CN117724719A (en) | User interface dynamic extensible development method and system based on software platform |
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 | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080723 Termination date: 20120629 |