[summary of the invention]
For addressing the above problem, main purpose of the present invention is to provide a kind of solution GUI graphics system dynamic switch method under multiple display standard, to reduce the complexity of graphic plotting process in the GUI graphics system, simplify GUI drawing process in the switching of multiple standards display environment.
For achieving the above object, technical scheme of the present invention is: solve GUI graphics system dynamic switch method under multiple display standard, comprise the steps:
(a) prepare the GUI resource according to the display standard of service application and support and the drafting district in the standard design realization GUI system, and according to drawing the district;
(b) generate a viewing area that meets current display standard according to current display standard or standard, related with the display device bottom, promptly be ready to the OSD that shows;
(c), be the graphic picture that painting canvas is drawn current application with the drafting district of GUI system, and notice OSD upgrade according to current service application;
(d) after incident is found to have more in the viewing area, according to drawing district's size and the ratio of width to height with the viewing area, adopt the technology of image processing to draw to need in district's figure the zone of upgrading to be processed into size and ratio on the OSD correspondence position, and be updated on the OSD correspondence position, finish once renewal;
(e) repeating step (c), (d) finish the demonstration support of system to current display standard/standard;
(f) change when display standard/standard, repeating step (b), and then (c), (d) finish the demonstration support of GUI system to current new display standard/standard set by step.
Compared to prior art, drafting district in the GUI graphics system of the present invention and viewing area separate processes make drafting memory field and display memory in the GUI system distinguish the design realization, handle.And realize drawing dynamically updating of data in district and the viewing area and show based on the technology of image processing, thereby simplify GUI system drawing process when a kind of display standard or standard environment switch to another kind of display environment, having solved in the common GUI system drawing process needs to express the difficult problem of graphic element according to the display requirement classification of multiple standards or standard.
[embodiment]
The present invention solves GUI graphics system dynamic switch method under multiple display standard, with drafting district in the GUI graphics system and viewing area separate processes, makes drafting memory field and display memory in the GUI system distinguish the design realization, handle.And realize drawing dynamically updating of data in district and the viewing area and show based on the technology of image processing, thereby simplify GUI system drawing process when a kind of display standard or standard environment switch to another kind of display environment, solved the display requirement classification that needs in the common GUI system drawing process according to multiple standards or standard and expressed the difficult problem of graphic element, specifically comprised the steps:
(a) prepare the GUI resource according to the drafting district (size and ratio) in practical business application and the display standard that may support and the standard design realization GUI system, and according to drawing to distinguish;
In originally executing example GUI system, consider to support 1080I/P, 720P, PAP standard and four kinds of display environments of TSC-system formula, promptly support four kinds of switchings between the display environment, consider to take into account four kinds of display effects under the display environment simultaneously, such as figure displaying ratio under the high definition environment is 16: 9, and the figure displaying ratio is 4: 3 under the SD environment.After considering multiple factor, the size in the drafting district in the design GUI system is 800 * 525.The figure of all application all will be drawn in { (0,0), (800, the 525) } coordinate system of drawing the district in the promptly later GUI system.Equally, select appropriate font storehouse and picture resource etc. according to the size (800 * 525) of drawing the district, fontlib is selected 24 * 24 dot matrix word library.
(b) generate a viewing area that meets current display standard according to set-top box current display standard or standard, related with the display device bottom, promptly be ready to the OSD (On Screen Display) that shows;
1080I/P, 720P, PAP standard and the four kinds of display environments of TSC-system formula supported in the corresponding step (a) and switching mutually thereof, the size of concrete viewing area is respectively 1344 * 756,1024 * 720,640 * 520 and 640 * 450 under design 1080I/P, 720P, PAP standard and four kinds of display environments of TSC-system formula.Certainly, constantly only can be a kind of in four kinds of display environments specifically at each.
(c) service application current according to set-top box be the graphic picture that painting canvas is drawn current application with the drafting district of GUI system, and notice OSD upgraded;
GUI draws and expresses is all GUI systems indispensable processes in service.In the inventive method, the drafting expression process of GUI does not have special character in this step and other GUI system, promptly by the principle of computer graphics, the graphic element in the picture of every frame GUI is drawn on the drafting district, so repeat no more.
In addition,, select to use the signalisation OSD renewal of notice OSD when changing, promptly allow subsequent step start working in the drafting district in order to improve later stage OSD updating efficiency.
(d) after the viewing area finds that update event is arranged, according to drawing district's size and the ratio of width to height with viewing area (OSD), adopt image processing techniques to draw to distinguish the zone that needs in the figure to upgrade to be processed into size and ratio on the OSD correspondence position, and be updated on the OSD correspondence position, upgrade thereby finish once;
Be responsible for part that OSD upgrades in the system and obtain to draw the district when notification signal of data variation is arranged, start the step of Data Update among the OSD each.Being drawn on the GUI picture data of drawing the district in step (c) is the data bitmap of a frame GUI figure in fact.With these data is that one of fundamental construction is based on the view data body in the internal memory, then according to needed target sizes in current OSD district and effect, adopt image process method to carry out integral transformation to view data, promptly amplify, dwindle, stretch, press inclined to one side, hyperchromic, operation such as lose lustre, be met the image frame of target viewing area standard (1080I/P, 720P, PAP standard and TSC-system formula) at last.
From the above mentioned, this step mainly is to handle view data in the drawing area according to the requirement of target display environment.Concrete view data is handled and is generally finished by two kinds of approach in actual product: the one, finish by the image processing module of the hardware supports that provides in the product platform; The 2nd, finish by software algorithm.As the image processing function of hardware supports is arranged in the fruit product, then adopting will be extremely simple, quick, efficient by way of an image processing of finishing in this step.Finish image processing by software algorithm and be actually coordinate transform and the color interpolation that pixel in the source images is carried out two-dimensional space.For example, the equation of transformation of scale is:
If during a=d=1 is identical transformation;
If a=d ≠ 1st, the geometric ratio conversion, a=d>1st, geometric ratio is amplified, a=d<1st, geometric ratio is dwindled.
At present popular image processing software algorithm is very many, does not repeat them here.
To draw the frame picture data in the district, the data that obtain according to the canonical transformation of target display requirement can directly be created among the OSD, promptly finish the demonstration of the every frame figure among the GUI, go round and begin again like this, continuous GUI graphic picture will show in OSD, finishes display application.
(e) repetition above-mentioned steps (c), (d) finish the demonstration support of system to current display standard/standard;
(f) when display standard/standard changes, repeating step (b), and then (c), (d) finish the demonstration support of GUI system to current new display standard/standard set by step.
The present invention solves GUI graphics system dynamic switch method under multiple display standard, and its core concept is that the graphic plotting district of GUI system is separated with the viewing area, and two distinguishes processing, dynamically updates GUI and draw district's data to the viewing area.Draw like this and distinguish the interior GUI course of work does not need to consider the target viewing area in certain degree result, the GUI that is absorbed in applied business expresses; The demonstration size of viewing area and wide high proportion then can be adjusted in real time according to the target display environment; By set up drawing the mapping relations of district and viewing area, utilize the method for graph transformation to realize that the Data Dynamic in two memory fields upgrades.
Figure 1 shows that GUI graphics system of the present invention main process step of dynamic switching under multiple display standard, at first design realizes that GUI draws the district, prepare the GUI resource, judged whether the GUI graphic plotting, if the GUI graphic plotting is arranged, then graphing and notify OSD to upgrade if OSD needs to upgrade, then carries out the demonstration of OSD targeted graphical after graph transformation upgrades with OSD; When switching display standard, triggered by display environment, after the environment that target shows reset and OSD generates, current display parameters will use in the GUI renewal process, finished at last to switch back OSD targeted graphical and show.
Fig. 2 is when using the trial system operation of the technology of the present invention, the graphic result of data is distinguished in the graphic result of the viewing area graph data in 1080I/P, 720P, pal mode and four kinds of display environments of TSC-system formula and drafting respectively, they have reflected the result schematic diagram shape effect of using the technology of the present invention realization 1080I/P, 720P, pal mode and four kinds of display standards of TSC-system formula truly, embodied the technology of the present invention four kinds of display environments under actual effect, as distortion, the distortion level of figure, font and color.
Most preferred embodiment described above only is that the present invention is set forth and illustrates, but is not limited to disclosed any concrete form, and it is possible carrying out many modifications and variations.