WO2022151587A1 - 一种基于嵌入式人机界面的矢量图显示方法与终端 - Google Patents

一种基于嵌入式人机界面的矢量图显示方法与终端 Download PDF

Info

Publication number
WO2022151587A1
WO2022151587A1 PCT/CN2021/082890 CN2021082890W WO2022151587A1 WO 2022151587 A1 WO2022151587 A1 WO 2022151587A1 CN 2021082890 W CN2021082890 W CN 2021082890W WO 2022151587 A1 WO2022151587 A1 WO 2022151587A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
graphics
display
text information
pvg
Prior art date
Application number
PCT/CN2021/082890
Other languages
English (en)
French (fr)
Inventor
范多忠
欧新木
黄继波
洪慰
Original Assignee
福州富昌维控电子科技有限公司
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 福州富昌维控电子科技有限公司 filed Critical 福州富昌维控电子科技有限公司
Publication of WO2022151587A1 publication Critical patent/WO2022151587A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the technical field of computers, in particular to a vector diagram display method and terminal based on an embedded human-machine interface.
  • SVG Scalable Vector Graphics
  • W3C World Wide Web ConSortium, a new two-dimensional vector graphics format formulated in August 2000 by the International Internet Standards Organization, is also a network vector graphics standard in the specification.
  • SVG is completely based on XML (Extensible Markup Language, Extensible Markup Language), and can be integrated with the above-mentioned technologies of a new generation of network image format.
  • SVG is not just an image format, because it is an XML-based language, which means that it inherits the cross-platform and extensibility of XML, thus taking a big step in the reusability of graphics.
  • SVG can be embedded in other XML documents, and other XML contents can also be embedded in SVG documents.
  • Various SVG graphics can be easily combined to form new SVG graphics.
  • SVG uses text to describe vectorized graphics, which makes SVG image files as readable as HTML web pages. Therefore, SVG graphics are widely used in embedded devices.
  • SVG graphics means that the SVG dynamic library needs to be installed in the embedded device.
  • the SVG dynamic library file is relatively large, and more space cannot be freed up for the embedded small memory device to store the dynamic library file.
  • the SVG library contains too many unnecessary but very complex processing methods, such as filters, shadow effects, blurring, bezier curves, clipping and masking, etc. These contents are not only useless in embedded devices, even if they are used, they will be very CPU-intensive, so that the overall experience will be affected.
  • the SVG dynamic library file is large and needs to occupy a large device storage space.
  • the technical problem to be solved by the present invention is to provide a vector diagram display method and terminal based on an embedded human-machine interface, which can reduce the consumption of system resources of the embedded device and save the storage space of the device.
  • the technical scheme adopted in the present invention is:
  • a vector diagram display method based on an embedded human-machine interface comprising:
  • a vector diagram display terminal based on an embedded human-machine interface comprising a processor, a memory and a computer program stored in the memory and running on the processor, the processor implements the following steps when executing the computer program:
  • the present invention loads the PVG vector graphics that saves a plurality of state graphics information, and caches the state graphics therein, so that when the state is switched, it is not necessary to modify the graphics description text like SVG graphics and reload it directly.
  • the corresponding state graphics can be selected for display, which saves a lot of system resources; and the present invention does not need to install the SVG dynamic library, thereby reducing the size of the library file to be installed, and greatly saving the storage space of the device.
  • FIG. 1 is a flowchart of a method for displaying a vector diagram based on an embedded human-machine interface according to an embodiment of the present invention
  • FIG. 2 is a structural diagram of a vector diagram display terminal based on an embedded human-machine interface according to an embodiment of the present invention
  • FIG. 3 is a detailed flowchart of a method for displaying vector graphics based on an embedded human-machine interface according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of the content of a PVG graphic of a vector diagram display method based on an embedded human-machine interface according to an embodiment of the present invention
  • a vector graphics display terminal based on an embedded human-machine interface; 2. A processor; 3. A memory.
  • a vector diagram display method based on an embedded human-machine interface including:
  • the beneficial effects of the present invention are: the present invention loads the PVG vector graphics that saves multiple state graphics information, and caches the state graphics therein, so that when the state is switched, the graphics description text does not need to be modified like SVG graphics. And reload, directly select the corresponding state graphics to display, saving a lot of system resources; and the present invention does not need to install the SVG dynamic library, thereby reducing the size of the library file to be installed, and greatly saving the storage space of the device.
  • loading preset PVG graphics is specifically:
  • the PVG graphics corresponding to the preset components are installed at the display positions of the preset components, and each state graphics in the PVG graphics is loaded respectively.
  • the PVG graphic is added to the display position corresponding to the preset component and loaded, so that the display panel can subsequently display the icon corresponding to the state of the preset component at the position.
  • step S3 the state graphics and text information corresponding to the current state of the device are selected from the cache to be drawn and displayed as follows:
  • the present invention does not need to use the SVG dynamic library, and directly calls the native functions of the system to draw and display, thus avoiding many unnecessary blurring, Bezier curves and filters brought by the use of the SVG dynamic library. operation and CPU usage, thus improving the overall running speed, making the operation and screen more smooth.
  • system native functions include native graphics rendering and display functions and native text rendering and display functions;
  • Select the state graphics and text information corresponding to the current state of the device from the cache call the system's native graphics drawing and display function to draw and display the state graphics, and call the system's native text drawing and display functions to draw and display the text information .
  • the graphics information calls the native graphics drawing and display function to draw and display
  • the text information calls the native text drawing and display function to draw and display, which is pertinent.
  • the display condition information includes the state numbers of the components corresponding to each of the state graphics;
  • the step S2 is specifically:
  • the first state number is obtained according to the current first operating state of the preset component corresponding to the PVG graphic in the device, and the corresponding first state graphic and first text are selected according to the first state number and the display condition information information is drawn and displayed;
  • the step S3 is specifically:
  • Receive the user's operation request execute the operation request and correspondingly change the operation state of the preset component to the second operation state, obtain the second state number, and select the corresponding state from the cache according to the second state number and the display condition information
  • the second state graphics and the second text information are drawn and displayed.
  • the present invention numbers the running states of the components, and selects the corresponding state graphics for display through the state number and actual condition information, so as to ensure that each state has a corresponding state chart for display, which is more accurate.
  • FIG. 2 a vector diagram display terminal based on an embedded human-machine interface, including a processor, a memory, and a computer program stored in the memory and running on the processor, when the processor executes the computer program Implement the following steps:
  • the beneficial effects of the present invention are: the present invention loads the PVG vector graphics that saves multiple state graphics information, and caches the state graphics therein, so that when the state is switched, the graphics description text does not need to be modified like the SVG graphics. And reload, directly select the corresponding state graphics to display, saving a lot of system resources; and the present invention does not need to install the SVG dynamic library, thereby reducing the size of the library file to be installed, and greatly saving the storage space of the device.
  • loading preset PVG graphics is specifically:
  • the PVG graphics corresponding to the preset components are installed at the display positions of the preset components, and each state graphics in the PVG graphics is loaded respectively.
  • the PVG graphic is added to the display position corresponding to the preset component and loaded, so that the display panel can subsequently display the icon corresponding to the state of the preset component at the position.
  • drawing and displaying the state graph and the text information corresponding to the selection in the step S2 is as follows:
  • step S3 the state graphics and text information corresponding to the current state of the device are selected from the cache to be drawn and displayed as follows:
  • the present invention does not need to use the SVG dynamic library, and directly calls the native functions of the system to draw and display, thus avoiding many unnecessary blurring, Bezier curves and filters brought by the use of the SVG dynamic library. operation and CPU usage, thus improving the overall running speed, making the operation and screen more smooth.
  • system native functions include native graphics rendering and display functions and native text rendering and display functions;
  • Select the state graphics and text information corresponding to the current state of the device from the cache call the system's native graphics drawing and display function to draw and display the state graphics, and call the system's native text drawing and display functions to draw and display the text information .
  • the graphics information calls the native graphics drawing and display function to draw and display
  • the text information calls the native text drawing and display function to draw and display, which is pertinent.
  • the display condition information includes the state numbers of the components corresponding to each of the state graphics;
  • the step S2 is specifically:
  • the first state number is obtained according to the current first operating state of the preset component corresponding to the PVG graphic in the device, and the corresponding first state graphic and first text are selected according to the first state number and the display condition information information is drawn and displayed;
  • the step S3 is specifically:
  • Receive the user's operation request execute the operation request and correspondingly change the operation state of the preset component to the second operation state, obtain the second state number, and select the corresponding state from the cache according to the second state number and the display condition information
  • the second state graphics and the second text information are drawn and displayed.
  • the present invention numbers the running states of the components, and selects the corresponding state graphics for display through the state number and actual condition information, so as to ensure that each state has a corresponding state chart for display, which is more accurate.
  • the first embodiment of the present invention is:
  • a vector diagram display method based on an embedded human-machine interface comprising:
  • the loading of the preset PVG graphics is specifically:
  • the PVG graphics corresponding to the preset components are installed at the display positions of the preset components, and each state graphics in the PVG graphics is loaded respectively.
  • the engineer pre-creates a PVG graphic (part vector graphic) on the PC side, which is also a vectorized graphic described by a specific text, which includes the number of states of the picture, and the number of states of each state.
  • the specific graphic information of use the status tag to distinguish, and use the status number id to identify the display condition information of each status graphic.
  • step S2 is specifically:
  • the first state number is obtained according to the current first operating state of the preset component corresponding to the PVG graphic in the device, and the corresponding first state graphic and first text are selected according to the first state number and the display condition information information, call the native graphics drawing and display function of the system to draw and display the first state graphics, and call the native text drawing and display function of the system to draw and display the first text information;
  • a PVG diagram of a switch component in an embedded device is used for description.
  • the switch component has two states, which are on and off, and the corresponding states are numbered 0 and 1 respectively.
  • the running state of the component is off, so the corresponding state graph is selected according to the state number 0 and the display condition information, as shown in Figure 4.
  • the embedded system calls the native graphics drawing and display function of the system to draw and display the state graphics.
  • the text information is also the same.
  • the call selects the corresponding text information according to the state number and display condition information, and uses the native text drawing and display function to draw and display it.
  • step S3 is specifically:
  • Receive the user's operation request execute the operation request and correspondingly change the operation state of the preset component to the second operation state, obtain the second state number, and select the corresponding state from the cache according to the second state number and the display condition information the second state graphics and second text information, call the system's native graphics drawing and display function to draw and display the second state graphics, and call the system's native text drawing and display functions to draw and display the second text information ;
  • the embedded system executes the user's operation.
  • the state of the component changes from off to on
  • the corresponding state number changes from 0 to 1. Therefore, according to the state number 1 and the actual condition information, the state graphics and text information corresponding to the closed state are obtained from the cache, and the system's native graphics drawing and display function and native text drawing and display function are respectively called to draw and display.
  • the second embodiment of the present invention is:
  • a vector diagram display terminal 1 based on an embedded human-machine interface comprising a processor 2, a memory 3 and a computer program stored in the memory 3 and running on the processor 2, the processor 2 executing the computer program At the same time, the steps in the above Embodiment 1 are implemented.
  • the present invention provides a vector graphics display method and terminal based on an embedded human-machine interface.
  • the present invention loads a PVG vector graphics that saves a plurality of state graphics information, and caches the state graphics therein, so that the state graphics can be When switching, it is not necessary to modify the graphic description text and reload it like SVG graphics, and directly select the corresponding state graphic for display, which saves a lot of system resources; and the present invention does not need to install the SVG dynamic library, thereby reducing the need for installation.
  • the size of the library file greatly saves the storage space of the device; and directly calls the system's native functions to draw and display graphics and text, avoiding unnecessary operations brought by many practical SVG dynamic libraries, reducing CPU usage, and improving The overall running speed is improved, and the operation and picture are smoother.

Abstract

一种基于嵌入式人机界面的矢量图显示方法,包括加载预设的PVG图形,抽取PVG图形的文本信息,并对PVG图形中包含的各个状态图形进行缓存,预设的PVG图形包含预设部件的多个状态图形;根据当前设备的运行状态和状态图形的显示条件信息,选择对应的状态图形和文本信息进行绘制并显示;接收用户的操作请求,执行操作请求并对应改变设备状态,根据变化后的设备状态和状态图形的显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示;本发明节省了大量系统资源;且本发明不需要安装SVG动态库,较大地节省了设备的存储空间。

Description

一种基于嵌入式人机界面的矢量图显示方法与终端 技术领域
本发明涉及计算机技术领域,特别涉及一种基于嵌入式人机界面的矢量图显示方法与终端。
背景技术
SVG(可放缩的矢量图形)是W3C(World Wide Web ConSortium,国际互联网标准组织)在2000年8月制定的一种新的二维矢量图形格式,也是规范中的网络矢量图形标准。SVG是完全基于XML(Extensible Markup Language,可扩展置标语言),并能和上述各项技术相融会的新一代的网络图像格式。SVG并非仅仅是一种图像格式,由于它是一种基于XML的语言,也就意味着它继承了XML的跨平台性和可扩展性,从而在图形可重用性上迈出了一大步。如SVG可以内嵌于其他的XML文档中,而SVG文档中也可以嵌入其他的XML内容,各个不同的SVG图形可以方便地组合,构成新的SVG图形。SVG采用文本来描述矢量化的图形,这使得SVG图像文件可以像HTML网页一样有着很好的可读性。因此,SVG图形在嵌入式设备中得到广泛的运用。
SVG图形的使用意味着需要在嵌入式设备中安装SVG动态库。而SVG动态库文件较大,对于嵌入式小内存设备来说无法腾出更多空间存储该动态库文件。SVG库中包含太多不需要但是又非常复杂的处理方法,例如滤镜、阴影效果、模糊处理、贝塞尔曲线、剪切和遮罩等。这些内容在嵌入式设备中不仅没用,即使用了也会非常的占用CPU,以至于整体的体验受到影响。
因此,使用在嵌入式设备中使用SVG矢量图形具有以下缺点:
1、图片中局部区域图形变化需要修改图形描述文本,后续必须重新加载并绘制整个图形,浪费系统资源;
2、SVG动态库文件较大,需要占用较大的设备存储空间。
技术问题
本发明所要解决的技术问题是:提供一种基于嵌入式人机界面的矢量图显示方法与终端,降低嵌入式设备的系统资源的消耗并节省设备的存储空间。
技术解决方案
为了解决上述技术问题,本发明采用的技术方案为:
一种基于嵌入式人机界面的矢量图显示方法,包括:
S1、加载预设的PVG图形,抽取所述PVG图形的文本信息,并对所述PVG图形中包含的各个状态图形进行缓存,预设的所述PVG图形包含预设部件的多个所述状态图形;
S2、根据当前设备的运行状态和所述状态图形的显示条件信息,选择对应的所述状态图形和所述文本信息进行绘制并显示;
S3、接收用户的操作请求,执行所述操作请求并对应改变设备状态,根据变化后的设备状态和所述状态图形的所述显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示。
为了解决上述技术问题,本发明采用的另一种技术方案为:
一种基于嵌入式人机界面的矢量图显示终端,包括处理器、存储器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
S1、加载预设的PVG图形,抽取所述PVG图形的文本信息,并对所述PVG图形中包含的各个状态图形进行缓存,预设的所述PVG图形包含预设部件的多个所述状态图形;
S2、根据当前设备的运行状态和所述状态图形的显示条件信息,选择对应的所述状态图形和所述文本信息进行绘制并显示;
S3、接收用户的操作请求,执行所述操作请求并对应改变设备状态,根据变化后的设备状态和所述状态图形的所述显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示。
有益效果
本发明的有益效果在于:本发明加载保存有多个状态图形信息的PVG矢量图形,并缓存其中的状态图形,使得进行状态切换时,不需要如SVG图形般修改图形描述文本并重新加载,直接选择对应的状态图形进行显示即可,节省了大量系统资源;且本发明不需要安装SVG动态库,从而降低了需要安装的库文件大小,较大地节省了设备的存储空间。
附图说明
图1为本发明实施例的一种基于嵌入式人机界面的矢量图显示方法的流程图;
图2为本发明实施例的一种基于嵌入式人机界面的矢量图显示终端的结构图;
图3为本发明实施例的一种基于嵌入式人机界面的矢量图显示方法的详细流程图;
图4为本发明实施例的一种基于嵌入式人机界面的矢量图显示方法的PVG图形的内容示意图;
标号说明:
1、一种基于嵌入式人机界面的矢量图显示终端;2、处理器;3、存储器。
本发明的实施方式
为详细说明本发明的技术内容、所实现目的及效果,以下结合实施方式并配合附图予以说明。
请参照图1以及图3,一种基于嵌入式人机界面的矢量图显示方法,包括:
S1、加载预设的PVG图形,抽取所述PVG图形的文本信息,并对所述PVG图形中包含的各个状态图形进行缓存,预设的所述PVG图形包含预设部件的多个所述状态图形;
S2、根据当前设备的运行状态和所述状态图形的显示条件信息,选择对应的所述状态图形和所述文本信息进行绘制并显示;
S3、接收用户的操作请求,执行所述操作请求并对应改变设备状态,根据变化后的设备状态和所述状态图形的所述显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示。
从上述描述可知,本发明的有益效果在于:本发明加载保存有多个状态图形信息的PVG矢量图形,并缓存其中的状态图形,使得进行状态切换时,不需要如SVG图形般修改图形描述文本并重新加载,直接选择对应的状态图形进行显示即可,节省了大量系统资源;且本发明不需要安装SVG动态库,从而降低了需要安装的库文件大小,较大地节省了设备的存储空间。
进一步地,所述加载预设的PVG图形具体为:
在预设部件的显示位置加装对应预设部件的PVG图形,并分别对所述PVG图形中的各个状态图形进行加载。
由上述描述可知,将PVG图形加装在对应预设部件的显示位置,并进行加载,从而使显示面板在后续能够在该位置显示对应预设部件状态的图标。
进一步地,所述步骤S2中的选择对应的所述状态图形和所述文本信息进行绘制并显示具体为:
选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示;
所述步骤S3中的从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示具体为:
从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示。
由上述描述可知,本发明不需要使用SVG动态库,直接调用系统的原生函数进行绘制和显示,因此避免了使用SVG动态库带来的许多如模糊处理、贝塞尔曲线和滤镜的不必要操作和CPU占用,从而提高了整体的运行速度,使操作和画面更加流畅。
进一步地,所述系统原生函数包括原生图形绘制显示函数和原生文本绘制显示函数;
选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示具体为:
选择对应的所述状态图形和所述文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示;
从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示具体为:
从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示。
由上述描述可知,图形信息调用原生图形绘制显示函数进行绘制和显示,文本信息则调用原生文本绘制显示函数进行绘制和显示,具有针对性。
进一步地,所述显示条件信息包含各个所述状态图形对应的部件的状态编号;
所述步骤S2具体为:
根据设备中所述PVG图形对应的所述预设部件当前的第一运行状态得到第一状态编号,根据所述第一状态编号和所述显示条件信息选择对应的第一状态图形和第一文本信息进行绘制并显示;
所述步骤S3具体为:
接收用户的操作请求,执行所述操作请求并对应改变所述预设部件的运行状态为第二运行状态,得到第二状态编号,根据所述第二状态编号和显示条件信息从缓存中选取对应的第二状态图形和第二文本信息进行绘制并显示。
由上述描述可知,本发明通过对部件的运行状态进行编号,并通过状态编号和现实条件信息选取对应的状态图形进行显示,保证每个状态都有对应的状态图进行显示,更加准确。
请参照图2,一种基于嵌入式人机界面的矢量图显示终端,包括处理器、存储器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
S1、加载预设的PVG图形,抽取所述PVG图形的文本信息,并对所述PVG图形中包含的各个状态图形进行缓存,预设的所述PVG图形包含预设部件的多个所述状态图形;
S2、根据当前设备的运行状态和所述状态图形的显示条件信息,选择对应的所述状态图形和所述文本信息进行绘制并显示;
S3、接收用户的操作请求,执行所述操作请求并对应改变设备状态,根据变化后的设备状态和所述状态图形的所述显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示。
从上述描述可知,本发明的有益效果在于:本发明加载保存有多个状态图形信息的PVG矢量图形,并缓存其中的状态图形,使得进行状态切换时,不需要如SVG图形般修改图形描述文本并重新加载,直接选择对应的状态图形进行显示即可,节省了大量系统资源;且本发明不需要安装SVG动态库,从而降低了需要安装的库文件大小,较大地节省了设备的存储空间。
进一步地,所述加载预设的PVG图形具体为:
在预设部件的显示位置加装对应预设部件的PVG图形,并分别对所述PVG图形中的各个状态图形进行加载。
由上述描述可知,将PVG图形加装在对应预设部件的显示位置,并进行加载,从而使显示面板在后续能够在该位置显示对应预设部件状态的图标。
进一步地,,所述步骤S2中的选择对应的所述状态图形和所述文本信息进行绘制并显示具体为:
选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示;
所述步骤S3中的从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示具体为:
从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示。
由上述描述可知,本发明不需要使用SVG动态库,直接调用系统的原生函数进行绘制和显示,因此避免了使用SVG动态库带来的许多如模糊处理、贝塞尔曲线和滤镜的不必要操作和CPU占用,从而提高了整体的运行速度,使操作和画面更加流畅。
进一步地,所述系统原生函数包括原生图形绘制显示函数和原生文本绘制显示函数;
选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示具体为:
选择对应的所述状态图形和所述文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示;
从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示具体为:
从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示。
由上述描述可知,图形信息调用原生图形绘制显示函数进行绘制和显示,文本信息则调用原生文本绘制显示函数进行绘制和显示,具有针对性。
进一步地,所述显示条件信息包含各个所述状态图形对应的部件的状态编号;
所述步骤S2具体为:
根据设备中所述PVG图形对应的所述预设部件当前的第一运行状态得到第一状态编号,根据所述第一状态编号和所述显示条件信息选择对应的第一状态图形和第一文本信息进行绘制并显示;
所述步骤S3具体为:
接收用户的操作请求,执行所述操作请求并对应改变所述预设部件的运行状态为第二运行状态,得到第二状态编号,根据所述第二状态编号和显示条件信息从缓存中选取对应的第二状态图形和第二文本信息进行绘制并显示。
由上述描述可知,本发明通过对部件的运行状态进行编号,并通过状态编号和现实条件信息选取对应的状态图形进行显示,保证每个状态都有对应的状态图进行显示,更加准确。
请参照图1、图3和图4,本发明的实施例一为:
一种基于嵌入式人机界面的矢量图显示方法,包括:
S1、加载预设的PVG图形,抽取所述PVG图形的文本信息,并对所述PVG图形中包含的各个状态图形进行缓存,预设的所述PVG图形包含预设部件的多个所述状态图形;
其中,所述加载预设的PVG图形具体为:
在预设部件的显示位置加装对应预设部件的PVG图形,并分别对所述PVG图形中的各个状态图形进行加载。
本实施例中,工程师预先在PC端创建了一张PVG图形(part vector graphic,部件矢量图形),也是一种通过特定文本进行描述的矢量化图形,其中包含图片的状态数量,以及每个状态的具体图形信息,使用status标签进行区分,并用状态编号id标识每个状态图形的显示条件信息。而后将PVG图形导入嵌入式设备。嵌入式设备在开机后,在预设部件的显示位置加装PVG图形,并分别对每个状态图进行加载,并且缓存起来,加载图形过程中还对文本标签进行了抽取。
S2、根据当前设备的运行状态和所述状态图形的显示条件信息,选择对应的所述状态图形和所述文本信息进行绘制并显示;
本实施例中,所述步骤S2具体为:
根据设备中所述PVG图形对应的所述预设部件当前的第一运行状态得到第一状态编号,根据所述第一状态编号和所述显示条件信息选择对应的第一状态图形和第一文本信息,调用系统的原生图形绘制显示函数对所述第一状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述第一文本信息进行绘制并显示;
本实施例中,以嵌入式设备中一种开关部件的PVG图形进行说明,该开关部件具备两种状态,为开启和关闭,分别对应状态编号为0和1。在开始时该部件的运行状态为关闭,因此,根据状态编号0和显示条件信息选择对应的状态图形,如图4所示。嵌入式系统调用系统的原生图形绘制显示函数对状态图形进行绘制和显示。同理,文本信息也是一样,调用根据状态编号和显示条件信息选择对应的文本信息并使用原生文本绘制显示函数进行绘制和显示。
S3、接收用户的操作请求,执行所述操作请求并对应改变设备状态,根据变化后的设备状态和所述状态图形的所述显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示;
本实施例中,所述步骤S3具体为:
接收用户的操作请求,执行所述操作请求并对应改变所述预设部件的运行状态为第二运行状态,得到第二状态编号,根据所述第二状态编号和显示条件信息从缓存中选取对应的第二状态图形和第二文本信息,调用系统的原生图形绘制显示函数对所述第二状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述第二文本信息进行绘制并显示;
本实施例中,当用户点击嵌入式面板,对开关进行了打开操作,则嵌入式系统执行用户的操作,同时,由于部件的状态由关闭转为开启,对应的状态编号由0变为1,因此,根据状态编号1和现实条件信息从缓存中获取对应关闭状态的状态图形以及文本信息,分别调用系统的原生图形绘制显示函数和原生文本绘制显示函数进行绘制和显示。
请参照图2,本发明的实施例二为:
一种基于嵌入式人机界面的矢量图显示终端1,包括处理器2、存储器3及存储在存储器3上并可在处理器2上运行的计算机程序,所述处理器2执行所述计算机程序时实现以上实施例一中的步骤。
综上所述,本发明提供的一种基于嵌入式人机界面的矢量图显示方法与终端,本发明加载保存有多个状态图形信息的PVG矢量图形,并缓存其中的状态图形,使得进行状态切换时,不需要如SVG图形般修改图形描述文本并重新加载,直接选择对应的状态图形进行显示即可,节省了大量系统资源;且本发明不需要安装SVG动态库,从而降低了需要安装的库文件大小,较大地节省了设备的存储空间;且直接调用系统原生的函数进行图形和文本的绘制和显示,避免了许多实用SVG动态库带来的不必要操作,减少了CPU占用,从而提高了整体的运行速度,使操作和画面更加流畅。
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等同变换,或直接或间接运用在相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (10)

  1. 一种基于嵌入式人机界面的矢量图显示方法,其特征在于,包括:
    S1、加载预设的PVG图形,抽取所述PVG图形的文本信息,并对所述PVG图形中包含的各个状态图形进行缓存,预设的所述PVG图形包含预设部件的多个所述状态图形;
    S2、根据当前设备的运行状态和所述状态图形的显示条件信息,选择对应的所述状态图形和所述文本信息进行绘制并显示;
    S3、接收用户的操作请求,执行所述操作请求并对应改变设备状态,根据变化后的设备状态和所述状态图形的所述显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示。
  2. 根据权利要求1所述的一种基于嵌入式人机界面的矢量图显示方法,其特征在于,所述加载预设的PVG图形具体为:
    在预设部件的显示位置加装对应预设部件的PVG图形,并分别对所述PVG图形中的各个状态图形进行加载。
  3. 根据权利要求1所述的一种基于嵌入式人机界面的矢量图显示方法,其特征在于,所述步骤S2中的选择对应的所述状态图形和所述文本信息进行绘制并显示具体为:
    选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示;
    所述步骤S3中的从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示具体为:
    从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示。
  4. 根据权利要求3所述的一种基于嵌入式人机界面的矢量图显示方法,其特征在于,所述系统原生函数包括原生图形绘制显示函数和原生文本绘制显示函数;
    选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示具体为:
    选择对应的所述状态图形和所述文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示;
    从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示具体为:
    从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示。
  5. 根据权利要求1所述的一种基于嵌入式人机界面的矢量图显示方法,其特征在于,所述显示条件信息包含各个所述状态图形对应的部件的状态编号;
    所述步骤S2具体为:
    根据设备中所述PVG图形对应的所述预设部件当前的第一运行状态得到第一状态编号,根据所述第一状态编号和所述显示条件信息选择对应的第一状态图形和第一文本信息进行绘制并显示;
    所述步骤S3具体为:
    接收用户的操作请求,执行所述操作请求并对应改变所述预设部件的运行状态为第二运行状态,得到第二状态编号,根据所述第二状态编号和显示条件信息从缓存中选取对应的第二状态图形和第二文本信息进行绘制并显示。
  6. 一种基于嵌入式人机界面的矢量图显示终端,包括处理器、存储器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现以下步骤:
    S1、加载预设的PVG图形,抽取所述PVG图形的文本信息,并对所述PVG图形中包含的各个状态图形进行缓存,预设的所述PVG图形包含预设部件的多个所述状态图形;
    S2、根据当前设备的运行状态和所述状态图形的显示条件信息,选择对应的所述状态图形和所述文本信息进行绘制并显示;
    S3、接收用户的操作请求,执行所述操作请求并对应改变设备状态,根据变化后的设备状态和所述状态图形的所述显示条件信息,从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示。
  7. 根据权利要求6所述的一种基于嵌入式人机界面的矢量图显示终端,其特征在于,所述加载预设的PVG图形具体为:
    在预设部件的显示位置加装对应预设部件的PVG图形,并分别对所述PVG图形中的各个状态图形进行加载。
  8. 根据权利要求6所述的一种基于嵌入式人机界面的矢量图显示终端,其特征在于,所述步骤S2中的选择对应的所述状态图形和所述文本信息进行绘制并显示具体为:
    选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示;
    所述步骤S3中的从缓存中选取对应设备当前状态的状态图形和文本信息进行绘制并显示具体为:
    从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示。
  9. 根据权利要求8所述的一种基于嵌入式人机界面的矢量图显示终端,其特征在于,所述系统原生函数包括原生图形绘制显示函数和原生文本绘制显示函数;
    选择对应的所述状态图形和所述文本信息,调用系统的原生函数进行绘制并显示具体为:
    选择对应的所述状态图形和所述文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示;
    从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生函数进行绘制并显示具体为:
    从缓存中选取对应设备当前状态的状态图形和文本信息,调用系统的原生图形绘制显示函数对所述状态图形进行绘制并显示,调用系统的原生文本绘制显示函数对所述文本信息进行绘制并显示。
  10. 根据权利要求6所述的一种基于嵌入式人机界面的矢量图显示终端,其特征在于,所述显示条件信息包含各个所述状态图形对应的部件的状态编号;
    所述步骤S2具体为:
    根据设备中所述PVG图形对应的所述预设部件当前的第一运行状态得到第一状态编号,根据所述第一状态编号和所述显示条件信息选择对应的第一状态图形和第一文本信息进行绘制并显示;
    所述步骤S3具体为:
    接收用户的操作请求,执行所述操作请求并对应改变所述预设部件的运行状态为第二运行状态,得到第二状态编号,根据所述第二状态编号和显示条件信息从缓存中选取对应的第二状态图形和第二文本信息进行绘制并显示。
PCT/CN2021/082890 2021-01-18 2021-03-25 一种基于嵌入式人机界面的矢量图显示方法与终端 WO2022151587A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110061510.XA CN112734880A (zh) 2021-01-18 2021-01-18 一种基于嵌入式人机界面的矢量图显示方法与终端
CN202110061510.X 2021-01-18

Publications (1)

Publication Number Publication Date
WO2022151587A1 true WO2022151587A1 (zh) 2022-07-21

Family

ID=75593397

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/082890 WO2022151587A1 (zh) 2021-01-18 2021-03-25 一种基于嵌入式人机界面的矢量图显示方法与终端

Country Status (2)

Country Link
CN (1) CN112734880A (zh)
WO (1) WO2022151587A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192945A (zh) * 2006-11-23 2008-06-04 中兴通讯股份有限公司 一种装置状态显示系统和方法
US20150033135A1 (en) * 2012-02-23 2015-01-29 Ajay JADHAV Persistent node framework
CN105302445A (zh) * 2015-11-12 2016-02-03 小米科技有限责任公司 图形用户界面绘制方法及装置
CN106843639A (zh) * 2016-12-26 2017-06-13 上海与德信息技术有限公司 图标的显示方法和图标的显示装置
CN109765793A (zh) * 2018-12-07 2019-05-17 深圳绿米联创科技有限公司 设备状态显示方法、装置、终端及存储介质
CN109857919A (zh) * 2019-01-17 2019-06-07 珠海市纳思特科技有限公司 一种svg图形绘制及数据展示交互系统和方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9916072B2 (en) * 2013-02-20 2018-03-13 Lg Electronics Inc. Application and notification window display management in a mobile terminal
CN109885272A (zh) * 2019-01-29 2019-06-14 福建鸿博光电科技有限公司 一种显示方法及终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192945A (zh) * 2006-11-23 2008-06-04 中兴通讯股份有限公司 一种装置状态显示系统和方法
US20150033135A1 (en) * 2012-02-23 2015-01-29 Ajay JADHAV Persistent node framework
CN105302445A (zh) * 2015-11-12 2016-02-03 小米科技有限责任公司 图形用户界面绘制方法及装置
CN106843639A (zh) * 2016-12-26 2017-06-13 上海与德信息技术有限公司 图标的显示方法和图标的显示装置
CN109765793A (zh) * 2018-12-07 2019-05-17 深圳绿米联创科技有限公司 设备状态显示方法、装置、终端及存储介质
CN109857919A (zh) * 2019-01-17 2019-06-07 珠海市纳思特科技有限公司 一种svg图形绘制及数据展示交互系统和方法

Also Published As

Publication number Publication date
CN112734880A (zh) 2021-04-30

Similar Documents

Publication Publication Date Title
TWI808393B (zh) 頁面處理方法、裝置、設備及儲存媒體
US7426734B2 (en) Facilitating presentation functionality through a programming interface media namespace
EP3111318B1 (en) Cross-platform rendering engine
AU734115B2 (en) Hardware accelerator for an object-oriented programming language
US20120137211A1 (en) Method and Apparatus for Specifying Mapping Parameters for User Interface Element Presentation in an Application
US6121981A (en) Method and system for generating arbitrary-shaped animation in the user interface of a computer
US8711148B2 (en) Method and system for generating and displaying an interactive dynamic selective view of multiply connected objects
US20120137233A1 (en) Method and Apparatus for Enabling Generation of Multiple Independent User Interface Elements from a Web Page
WO2020131756A1 (en) Method and apparatus for browser application to load first screen of web page
CN106294658B (zh) 网页快速展示方法和装置
US20060031818A1 (en) Hardware accelerator for an object-oriented programming language
US20100079459A1 (en) method and system for generating and displaying an interactive dynamic graph view of multiply connected objects
JP2005135384A (ja) コンピュータプラットフォームのためのプログラミングインターフェース
CN107967344B (zh) 网页动画效果的实现方法、系统、设备及存储介质
US20190080017A1 (en) Method, system, and device that invokes a web engine
EP4339808A1 (en) Page processing method and apparatus, electronic device, and readable storage medium
US20230403437A1 (en) Graphics engine and graphics processing method applicable to player
CN110443880B (zh) 图像渲染方法、装置、存储介质及电子设备
CN111737618A (zh) 用于Web端的矢量图显示方法、装置和计算机设备
CN110471700B (zh) 图形处理方法、装置、存储介质及电子设备
WO2022151587A1 (zh) 一种基于嵌入式人机界面的矢量图显示方法与终端
CN111352665A (zh) 页面加载方法、装置、设备及其存储介质
Cai et al. NetPadBrowser: An Offline Browser for Web-Based Dynamic Geometric Resources
JP2022113626A (ja) レンダリング方法、装置、電子機器及び記憶媒体
CN112130811A (zh) 数据处理方法与装置、存储介质、电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21918786

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21918786

Country of ref document: EP

Kind code of ref document: A1