[go: up one dir, main page]

CN115686692A - Rendering method and system of desktop component, electronic device and storage medium - Google Patents

Rendering method and system of desktop component, electronic device and storage medium Download PDF

Info

Publication number
CN115686692A
CN115686692A CN202110843688.XA CN202110843688A CN115686692A CN 115686692 A CN115686692 A CN 115686692A CN 202110843688 A CN202110843688 A CN 202110843688A CN 115686692 A CN115686692 A CN 115686692A
Authority
CN
China
Prior art keywords
rendering
desktop component
layout
layout file
content
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
CN202110843688.XA
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.)
Shanghai Qwik Smart Technology Co Ltd
Original Assignee
Shanghai Qwik Smart Technology 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 Shanghai Qwik Smart Technology Co Ltd filed Critical Shanghai Qwik Smart Technology Co Ltd
Priority to CN202110843688.XA priority Critical patent/CN115686692A/en
Publication of CN115686692A publication Critical patent/CN115686692A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a rendering method and a system of a desktop component, electronic equipment and a storage medium, wherein the rendering method comprises the following steps: obtaining a layout file, wherein the layout file is generated according to a preset rule; analyzing the layout file according to the preset rule to generate rendering content; acquiring a screenshot of the rendered content; and sending the screenshot of the rendered content to the target desktop component. According to the method and the device, the layout file is read and analyzed, the rendering content is subjected to screenshot, the defect that the desktop component rendering limitation is large in the prior art is overcome, the desktop component can be flexibly and autonomously rendered and updated, the limitation of an operating system or a rendering development tool is avoided, the desktop component rendering development staff are facilitated, and the development efficiency is improved.

Description

Rendering method and system of desktop component, electronic device and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a rendering method and system of a desktop component, electronic equipment and a storage medium.
Background
With the intellectualization of the terminal equipment, the interface is not limited to displaying application icons, but desktop components with various types of functional information, namely widgets (widgets), can be displayed. Typically weather, calendars, movie recommendations, etc. The desktop component is actually a dynamic icon with a richer presentation form, which, like a normal icon, also corresponds to a certain Application (APP), for example a certain weather forecast APP. Of course, compared with a common static application Icon (Icon), the desktop component not only provides an entrance for the APP such as the weather forecast described above for the user of the terminal device, but also can display the information of the corresponding APP, and thus is very attractive.
Therefore, the final diversified display form of the desktop component is one of the main advantages, and various eyeball display effects are realized through different rendering modes. However, the update operation for rendering the desktop component in the prior art has the following disadvantages:
for the developer, if the rendering effect can be customized rapidly by the customized rendering software, the limitation is large, in other words, only the value of the parameter can be set, and the kind of the parameter cannot be changed. If autonomous coding development is performed, the development workload is large and the development process is cumbersome. Moreover, the method is also limited by the operating system of the terminal device, for example, not only the development process needs to be coded by using XCode (development environment) and the like, but also the development result needs to be submitted to the APP store corresponding to the operating system for registration after each development is completed, so that the rendering and updating of the desktop component can be realized once.
Disclosure of Invention
One purpose of the present invention is to provide a method for rendering a desktop component, which has the advantages that by acquiring and parsing a layout file generated according to a preset rule, a user-defined desktop component appearance can be flexibly and autonomously generated at a terminal without being limited by an operating system and application software; and using the screenshot for target desktop component display through screenshot operation of the rendered content.
Another object of the present invention is to provide a rendering method for desktop components, which is advantageous in that by setting different types of controls and setting corresponding properties for the controls, appearance styles of final desktop components can be built through the controls, and the different types of properties also facilitate developers to flexibly and autonomously define the appearance of the desktop components.
Another object of the present invention is to provide a method for rendering a desktop component, which has the advantages that by setting a container control, and corresponding attributes and three attribute values of a layout manner, nesting relationships between the controls can be conveniently and clearly determined through the container control, and by summarizing the three attribute values, spatial logical relationships between the controls can be clearer, so that developers can design layout files more conveniently, the development efficiency is higher, and the development is easier to operate.
Another object of the present invention is to provide a method for rendering a desktop component, which is advantageous in that a received layout file is parsed into a rendering instruction set for rendering the desktop component according to a preset rule, and a control is generated and a control attribute is adjusted according to the rendering instruction set, so that the generated control can be presented to a target desktop component according to a customized style.
Another object of the present invention is to provide a rendering method for a desktop component, which has an advantage that rendering contents are generated by obtaining and combining attribute information of a target desktop component, so that the generated rendering contents are adapted to the target desktop component that is finally required to be rendered, thereby improving rendering accuracy of the target desktop component.
Another object of the present invention is to provide a rendering method of a desktop component, which is advantageous in that the size of the generated rendering content is accurately adapted to the target desktop component by using the size of the target desktop component in the generating process of the rendering content, so as to ensure the final rendering effect.
Another object of the present invention is to provide a rendering method for a desktop component, which is advantageous in that the layout file is obtained and utilized through the judgment of the layout file, so that the generation and the obtaining of the layout file are performed asynchronously, and the flexibility of the rendering process is improved.
Another object of the present invention is to provide a rendering method for a desktop component, which has the advantages that by setting a screenshot as an interface of a target desktop component, previous rendering processing implementation logic is simplified, and occurrence probability of system errors such as memory overflow is greatly reduced in this process.
Another object of the present invention is to provide a rendering system of a desktop component, which has the advantages that through the reasonable utilization of an application program, the application program can flexibly receive a self-defined layout file, and the analysis and rendering content generation operations of the layout file are realized through a software development kit; the software development kit and the application program are matched for use, so that the method is not limited by an operating system and application software, and a user-defined desktop component appearance is flexibly and autonomously generated in the electronic equipment; and the decoupling of the rendering function is realized by setting a software development kit, and application programs applied to different terminals can be embedded.
Another object of the present application is to provide an electronic device, which is advantageous in that, by executing a rendering method of a desktop component by the electronic device, it is achieved that a customized desktop component appearance is generated flexibly and autonomously on the electronic device without being limited by an operating system and application software; and the memory occupation of the electronic equipment in the rendering process is saved through the screenshot operation of the rendering content, and the problems of memory overflow and the like are favorably avoided.
Another object of the present application is to provide a storage medium, on which a computer program is stored, which can be called and executed when needed, so as to achieve a flexible and autonomous generation of a customized desktop component appearance in the electronic device without limitation of an operating system and application software.
The first aspect of the present invention provides a rendering method of a desktop component, where the rendering method includes the steps of:
obtaining a layout file, wherein the layout file is generated according to a preset rule;
analyzing the layout file according to the preset rule to generate rendering content;
acquiring a screenshot of the rendered content;
and sending the screenshot of the rendering content to the target desktop component.
The second aspect of the invention provides a rendering system of a desktop component, which comprises an application program and a software development toolkit; the application program provides display content for the desktop component;
the application program acquires a layout file and sends the layout file to the software development kit; the layout file is generated according to a preset rule;
the software development kit analyzes the layout file according to the preset rule to generate rendering content; acquiring a screenshot of the rendering content, and sending the screenshot of the rendering content to the application program;
and the application program sends the screenshot of the rendered content to the desktop component.
A third aspect of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for rendering the desktop component when executing the computer program.
A fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the rendering method of a desktop component as described above.
Drawings
Fig. 1 is a flowchart of a rendering method of a desktop component according to embodiment 1 of the present invention.
Fig. 2 is a schematic diagram of a layout manner of a horizontal layout of a container control according to embodiment 1 of the present invention.
Fig. 3 is a schematic diagram of a layout manner of a vertical layout of a container control according to embodiment 1 of the present invention.
Fig. 4 is a flowchart of a rendering method of a desktop component according to embodiment 1 of the present invention.
Fig. 5 is a flowchart of a rendering method of a desktop component according to embodiment 1 of the present invention.
Fig. 6 is a flowchart of a rendering method of a desktop component according to embodiment 1 of the present invention.
Fig. 7 is a flowchart of a rendering method of a desktop component according to embodiment 1 of the present invention.
Fig. 8 is a module schematic diagram of a rendering system of a desktop component according to embodiment 2 of the present invention.
Fig. 9 is a block diagram of an electronic device according to embodiment 3 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
Referring to fig. 1, the present embodiment provides a rendering method of a desktop component, including the steps of:
s1, obtaining a layout file, and generating the layout file according to a preset rule.
And S2, analyzing the layout file according to a preset rule to generate rendering content.
And S3, acquiring a screenshot of the rendering content.
And S4, sending the screenshot of the rendered content to a target desktop component.
The embodiment describes a rendering method of desktop components based on a terminal side, and a target desktop component to be rendered is installed and displayed on the terminal. The terminal is a mobile phone, a tablet computer and the like. Rendering is a computer graphics image processing method, which means that an image is generated by software.
Desktop components are network-based visualization utilities. For example, it is common for a mobile phone weather desktop component to display real-time weather conditions of the day; the movie desktop component displays the latest movie messages, etc.
In step S1, a terminal, such as a mobile phone, obtains a layout file from a server, where the layout file is generated based on a preset rule, and the preset rule may be a predefined API (Application Programming Interface) document, that is, a predefined function set, so as to enable a developer to access a set of routines based on software and hardware without accessing source codes or understanding details of an internal working mechanism.
The layout file may specifically be a text file conforming to the API document specification, such as an XML (Extensible Markup Language) file or a Json (JavaScript Object Notation) file; because the method has the characteristics of text-based and lightweight data exchange formats, the method can be used across operating systems and software platforms, and therefore, no matter the operating system of the terminal equipment is an android system or an IOS (mobile operating system developed by apple Inc.), the format compatibility problem does not exist in the acquisition process.
And S2, analyzing the layout file according to the preset rule, namely the content defined in the API document, and generating rendering content. The rendering contents generated in step S2, that is, the display contents of the desktop component to be finally presented at the terminal, are cached in a mobile phone Memory, that is, a mobile phone Memory RAM (Random Access Memory) during the rendering process, and are finally displayed at the terminal after subsequent processing.
After the rendering content is determined, step S3 captures the rendering content generated in step S2 in the terminal memory, and since the rendering result obtained by parsing from the layout file often includes various pictures, graphics, character format appearances, nested constraint relationships, and the like at the same time, after the rendering result is captured, the rendering content can be accurately presented on the desktop component.
And S4, sending the screenshot obtained by rendering the content to a target desktop component, such as the weather desktop component or the movie desktop component, so that the rendering process of the desktop component is completed.
As a preferred embodiment, the preset rule includes a control type and a control attribute corresponding to the control type; wherein the control type represents a type of a control included in the rendered content.
The preset rule of this embodiment may be an API document, where control types and their corresponding attributes are defined, and the control types implement a final architecture of the desktop component to form a final rendering content. The following controls are included:
html controls represent root views, only one.
The attributes include: size, which represents the size of the desktop component on the design that is referenced when the layout file is developed. For example: < htmlsize = "329, 155" >, which means a desktop component with a length and width pixel value of 329 and 155, respectively.
space control is a control for occupying space, that is, in the process of rendering, space control is used for leaving white at a certain position of an image. The attribute comprises length, the attribute is used for controlling how many pixels are occupied by the space control, and the default value is 5. For example: < space length = "10"/>, which is an unnecessary filling attribute.
The label control is a control for displaying text information, the attribute comprises a color, the attribute is used for controlling the color of the text information, and the default is black. For example: the color of the displayed four characters is black, and the color of the displayed four characters is black. The attribute is an unnecessary fill-in attribute.
The label control also includes a fontSize attribute, which is used to control the size of the text, with a default value of 15. Also, the font size of < label fontSize = "18" > heat mapping of this week > represents "heat mapping of this week" is 18 font size, for example.
The label control also includes a fontwight attribute that controls the type of text display, with the default value being normal and the value bold selectable to represent non-bold and bold text, respectively.
The label control also comprises a textalign attribute which is used for controlling a text alignment mode and comprises three values, wherein left represents left alignment; center denotes horizontal center alignment and right denotes right alignment.
The label control also includes a size attribute that is used to surface the size of the current text control.
And the img control is used for displaying the picture. An attribute src is included which is used to set the source of the picture, e.g. a certain linked network picture.
In addition, the controls of the control type all contain general attributes, and the general attributes include:
the background color attribute represents the background color of the control;
a position attribute representing an absolute position of the control;
radius attribute, which represents the degree of rounding.
According to the method and the device, different types of controls are set, corresponding attributes are set for the controls, the final appearance style of the desktop component can be built through the controls, and the different types of attributes can also facilitate developers to flexibly and autonomously define the appearance of the desktop component.
As a preferred embodiment, the control type includes a container, and the control attribute corresponding to the container includes a layout mode; the layout modes include a horizontal layout, a vertical layout, and a stacked layout. When the layout mode of the container is horizontal layout, the controls inside the container are arranged according to the horizontal sequence; when the layout mode of the container is longitudinal layout, the controls inside the container are arranged according to a longitudinal sequence; when the layout mode of the container is a stacking layout, the controls in the container are arranged according to the stacking sequence.
Specifically, the container control div control represents a container, and some sub-controls can be placed inside the container control div control. The container control div includes a property layout, where the property is used to control a layout manner of the child controls, and includes three property values, namely horizontal, vertical and stack, which respectively represent that the child controls inside the container are in horizontal layout, vertical layout and stacked layout.
Referring to fig. 2, when the property values of the container controls are in a horizontal layout, the internal sub-controls are sequentially arranged from left to right, and referring to fig. 3, when the property values of the container controls are in a vertical layout, the internal sub-controls are sequentially arranged from top to bottom. When the attribute value of the container control is in a stacked layout, the internal sub-controls are sequentially arranged from bottom to top; of course, the attribute values are only used for limiting the final position relationship of the sub-controls inside the container, and the sequence of adding the sub-controls into the container one by one is not limited; for example, in the case of the horizontal layout, the substrates may be arranged in order from right to left.
According to the embodiment, the container control, the attribute and the attribute value of the corresponding layout mode are set, the nesting relation between the controls can be conveniently and clearly determined through the container control, and the spatial logic relation between the controls can be clearer through the summary of the attribute value, so that developers can design layout files more conveniently, the development efficiency is higher, and the development is easier to operate.
Referring to fig. 4, as a preferred embodiment, step S2 includes the following steps:
and S21, analyzing the layout file according to a preset rule to generate a rendering instruction set.
And S22, generating a control according to the rendering instruction set, and adjusting the control attribute of the control to generate rendering content.
The generation of the rendering instruction set is generated by a Software Development Kit (SDK), which is embedded and integrated in the application APP and opens an interface that requires the contents of the layout file to be given to the application it is integrated with. After the application program obtains the layout file from the server or other positions, the layout file is sent to the software development toolkit, and the interior of the software development toolkit can perform analysis rendering operation on the content of the layout file.
The layout file is a file in a standard format, and the software development kit calls a system interface to perform analysis to generate a rendering instruction set according to a preset rule after acquiring the file content, so that the information of each node is obtained, wherein the information comprises the control type, the control attribute and the like; such as the content, size, background color, and specific location of the label controls and text. And finally synthesizing the rendering content by generating various controls and adjusting the attributes corresponding to the controls.
According to the embodiment, the received layout file is analyzed into the rendering instruction set for rendering the desktop component through the preset rule, and the control is generated and the attribute of the control is adjusted through the rendering instruction set, so that the generated control can be presented to the target desktop component according to the customized style.
Referring to fig. 5, as a preferred embodiment, step S21 further includes the following steps:
and S21', acquiring the attribute information of the target desktop component.
Step S21, the layout file is analyzed according to preset rules, and the rendering content is generated by combining the attribute information of the target desktop component. Preferably, the attribute information of the target desktop component includes a size of the target desktop component.
The goal of rendering the target desktop component is to flexibly present rich information content; the position of the target desktop component on the terminal screen and the display size of each terminal are generally predictable, and the embodiment utilizes the characteristic of the target desktop component to obtain the attribute information of the target desktop component first, and fully combines and utilizes the attribute information of the target desktop component in the generation process of the rendered content, so that the generated rendered content can be more matched with the attribute of the target desktop component.
Specifically, in this embodiment, the rendering content is subjected to screenshot, and the screenshot is set in the target desktop component, so that the size of the target desktop component, such as the length and width pixel values at the current resolution, is obtained in advance, and accordingly the screenshot size in the screenshot operation process can be adapted accordingly, and finally the screenshot conforming to the display size of the target desktop component on the terminal screen is generated.
The embodiment provides the rendering method of the desktop component, which has the advantages that the rendering content is generated by acquiring and combining the attribute information of the target desktop component, so that the generated rendering content is adapted to the target desktop component which needs to be rendered finally, and the rendering precision of the target desktop component is improved. Specifically, the size of the generated rendering content is accurately matched with the size of the target desktop component by using the size of the target desktop component in the generation process of the rendering content, so that the final rendering effect is ensured.
Referring to fig. 6, as a preferred embodiment, step S1 specifically includes the steps of:
s11, judging whether a layout file exists or not;
and S12, if the layout file exists, obtaining the layout file.
In the step S1, the terminal acquires a layout file, which is usually realized by an application program associated with a target desktop component on the terminal, and the layout file may be designed by different developers and then uniformly stored in the cloud for different terminals to access and request, or may be stored in one or more local area network servers; it is even possible to store the layout file in another terminal or locally in the terminal.
The application program judges whether the layout file exists according to a preset path, and can also judge whether a generator, generation time and the like of the layout file meet requirements, and if the layout file meeting the requirements exists, the application program acquires the layout file. Therefore, the development process of the layout file by the developer is asynchronous with the acquisition of the layout file by the terminal, and the method has higher flexibility compared with the method of issuing the layout file by the server side according to the specification.
According to the embodiment, the layout files are acquired and utilized through judgment, asynchronous execution of the generation and acquisition processes of the layout files is realized, and the flexibility of rendering processing is improved.
Referring to fig. 7, as a preferred embodiment, the step S4 is followed by the steps of:
and S4', setting the screenshot of the rendered content as an interface of the target desktop component.
According to the method and the device, the layout file generated according to the preset rule is obtained and analyzed, and the screenshot is used for displaying the target desktop component by performing screenshot operation on the rendering content, so that the customized desktop component appearance can be flexibly and autonomously generated without the limitation of an operating system and application software on the terminal.
Example 2
Referring to fig. 8, the embodiment specifically provides a rendering system of a desktop component, where the rendering system includes an application 1 and a software development kit 2, and the application 1 provides display content for the desktop component.
The application program 1 acquires a layout file and sends the layout file to the software development kit 2; the layout file is generated according to a preset rule;
the software development kit 2 analyzes the layout file according to a preset rule to generate rendering content; acquiring a screenshot of the rendering content, and sending the screenshot of the rendering content to the application program 1;
and the application program 1 sends the screenshot of the rendered content to the target desktop component.
The embodiment describes a rendering method of desktop components based on a terminal side, and target desktop components needing rendering are installed and displayed on the terminal. The terminal is a mobile phone, a tablet computer and the like. The preset rule in this embodiment may be a set of customized API application program interfaces; the layout file may specifically be a text file conforming to the API application program interface, for example, an XML file or a Json file.
The application 1 is, for example, an APP installed in a terminal, and the APP acquires a layout file from any one of the predetermined or temporarily specified paths, and transmits the layout file to the software development kit 2 through an open interface.
The software development kit described above, namely the SDK; the method is embedded and integrated in the APP, but the decoupling relative to the APP is realized by integrating the processing function related to the rendering; the flexibility of the rendering operation is improved. After receiving a layout file sent by an application program, the SDK analyzes the layout file according to a preset rule and generates rendering content; and acquiring a screenshot of the rendering content, and sending the screenshot of the rendering content to the APP.
Finally, a screenshot of the rendered content is sent by the APP to the desktop component.
Specifically, for example, a user holds a mobile phone, during a rendering process of a movie desktop component, any developer designs and develops an XML-format layout file describing the movie desktop component according to preset rules, and the layout file is uploaded to a server through development equipment used by the developer; the APP related to the movie desktop component of the mobile phone terminal is searched from the server, acquires the layout file and sends the layout file to the SDK; after the SDK carries out analysis rendering operation, generating a control and the attribute thereof according to a preset rule, determining rendering content and carrying out screenshot; the screenshot is sent to the APP by the SDK and then used for filling and displaying in a display area of the mobile phone by the desktop component, and the whole rendering process is achieved.
According to the method and the device for generating the desktop component, the rendering system of the desktop component formed by the software development kit and the application program is arranged, the layout file generated according to the preset rule can be obtained and analyzed, the terminal is not limited by the operating system and the application software, and the self-defined desktop component appearance can be flexibly and autonomously generated.
Example 3
Referring to fig. 9, the present embodiment provides an electronic device 30, which includes a processor 31, a memory 32, and a computer program stored on the memory 32 and running on the processor 31, and when the processor 31 executes the computer program, the rendering method of the desktop component in embodiment 1 is implemented. The electronic device 30 shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
The electronic device 30 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, and a bus 33 connecting the various system components (including the memory 32 and the processor 31).
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM) 321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as a rendering method of a desktop component in embodiment 1 of the present invention, by executing the computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., a keyboard, a pointing device, etc.). Such communication may be through input/output (I/O) interfaces 35. Also, model-generating device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via network adapter 36. Network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. Other hardware and/or software modules may be used in conjunction with the model-generating device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, to name a few.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the steps in the rendering method of the desktop component in embodiment 1.
More specific examples that may be employed by the readable storage medium include, but are not limited to: a portable disk, hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code for causing a terminal device to execute the steps in the rendering method for implementing the desktop component in embodiment 1 when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (11)

1. A rendering method of a desktop component, the rendering method comprising the steps of:
obtaining a layout file, wherein the layout file is generated according to a preset rule;
analyzing the layout file according to the preset rule to generate rendering content;
acquiring a screenshot of the rendering content;
and sending the screenshot of the rendering content to a target desktop component.
2. The rendering method of the desktop component as claimed in claim 1, wherein the preset rule includes a control type and a control attribute corresponding to the control type;
wherein the control type represents a type of a control included in the rendered content.
3. The rendering method of desktop components of claim 2, wherein the control type comprises a container, and the control property corresponding to the container comprises a layout mode; the layout mode comprises at least one of transverse layout, longitudinal layout and stacked layout;
when the layout mode of the container is the transverse layout, the controls in the container are arranged in a transverse sequence;
when the layout mode of the container is the longitudinal layout, the controls inside the container are arranged according to the longitudinal sequence;
and when the layout mode of the container is the stacking layout, the controls in the container are arranged according to the stacking sequence.
4. The rendering method of desktop components according to claim 2 or 3, wherein the step of parsing the layout file according to the preset rule to generate the rendering content comprises:
analyzing the layout file according to the preset rule to generate a rendering instruction set;
and generating a control according to the rendering instruction set, and adjusting the control attribute of the control to generate the rendering content.
5. The rendering method of desktop components according to claim 4, wherein the step of parsing the layout file according to the preset rule and generating the rendering content further comprises:
acquiring attribute information of a target desktop component;
the step of analyzing the layout file according to the preset rule to generate rendering content comprises the following steps:
and analyzing the layout file according to the preset rule, and generating rendering content by combining the attribute information of the target desktop component.
6. The rendering method of a desktop component of claim 5, the property information of the target desktop component comprising a size of the target desktop component.
7. The rendering method of a desktop component according to claim 1, wherein the step of obtaining the layout file specifically comprises:
judging whether a layout file exists or not;
and if so, acquiring the layout file.
8. The rendering method of a desktop component of claim 1, said step of sending a screenshot of said rendered content to said target desktop component further comprising, after: and setting the screenshot of the rendered content as an interface of the target desktop component.
9. A rendering system for a desktop component, the rendering system comprising an application and a software development kit; the application program provides display content for the desktop component;
the application program acquires a layout file and sends the layout file to the software development kit; the layout file is generated according to a preset rule;
the software development kit analyzes the layout file according to the preset rule to generate rendering content; acquiring a screenshot of the rendering content, and sending the screenshot of the rendering content to the application program;
and the application program sends the screenshot of the rendered content to the desktop component.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of rendering a desktop component of any of claims 1-8 when executing the computer program.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a rendering method of a desktop component according to any one of claims 1 to 8.
CN202110843688.XA 2021-07-26 2021-07-26 Rendering method and system of desktop component, electronic device and storage medium Pending CN115686692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110843688.XA CN115686692A (en) 2021-07-26 2021-07-26 Rendering method and system of desktop component, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110843688.XA CN115686692A (en) 2021-07-26 2021-07-26 Rendering method and system of desktop component, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115686692A true CN115686692A (en) 2023-02-03

Family

ID=85043896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110843688.XA Pending CN115686692A (en) 2021-07-26 2021-07-26 Rendering method and system of desktop component, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115686692A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024222550A1 (en) * 2023-04-26 2024-10-31 华为技术有限公司 Display method and apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024222550A1 (en) * 2023-04-26 2024-10-31 华为技术有限公司 Display method and apparatus

Similar Documents

Publication Publication Date Title
CN111475163B (en) Method, device and equipment for generating code file of view template and storage medium
US10643023B2 (en) Programmatic native rendering of structured content
CN112631580B (en) Data processing method and device and computing equipment
US7856596B2 (en) Method and system for separation of content and layout definitions in a display description
US20150095759A1 (en) Rendering interpreter for visualizing data provided from restricted environment container
US20160342576A1 (en) Filtered stylesheets
CN109725901A (en) Development approach, device, equipment and the computer storage medium of front-end code
US11677807B2 (en) System and method to standardize and improve implementation efficiency of user interface content
ES3038252T3 (en) User interface generation
CN114675925B (en) Configuration image processing method and device, computer equipment and storage medium
CN111459501B (en) SVG-based Web configuration picture storage and display system, method and medium
CN113535175A (en) Application program front-end code generation method and device, electronic equipment and medium
US20240160410A1 (en) Application Development Platform, Micro-program Generation Method, and Device and Storage Medium
CN113449502A (en) Document generation method and system based on dynamic data
CN112965699A (en) Front-end page generation method, device, computer system and readable storage medium
WO2024056100A1 (en) Page rendering method and apparatus, device, storage medium, and computer program product
AU2016256364B2 (en) Rendering graphical assets natively on multiple screens of electronic devices
CN116009863B (en) Front-end page rendering method, device and storage medium
KR20090000199A (en) Web server application framework, web application processing method using the framework, and computer readable recording medium capable of implementing the same
CN116432624A (en) Micro-service API document generation method, device, equipment and storage medium
CN114254585B (en) Font generation method and device, electronic equipment and storage medium
CN115686692A (en) Rendering method and system of desktop component, electronic device and storage medium
CN113791783B (en) Control generation method, device, equipment and storage medium
US20130080879A1 (en) Methods and apparatus providing document elements formatting
CN113535151B (en) Code generation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination