CN114780095B - Off-screen rendering method and device, printing method, computing device and storage medium - Google Patents

Off-screen rendering method and device, printing method, computing device and storage medium Download PDF

Info

Publication number
CN114780095B
CN114780095B CN202210701479.6A CN202210701479A CN114780095B CN 114780095 B CN114780095 B CN 114780095B CN 202210701479 A CN202210701479 A CN 202210701479A CN 114780095 B CN114780095 B CN 114780095B
Authority
CN
China
Prior art keywords
rendering
data
source data
screen
virtual
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.)
Active
Application number
CN202210701479.6A
Other languages
Chinese (zh)
Other versions
CN114780095A (en
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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202210701479.6A priority Critical patent/CN114780095B/en
Publication of CN114780095A publication Critical patent/CN114780095A/en
Application granted granted Critical
Publication of CN114780095B publication Critical patent/CN114780095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Abstract

The embodiment of the invention discloses an off-screen rendering method, an off-screen rendering device, a printing method, computing equipment and a storage medium, belongs to the technical field of computers, and aims to solve the technical problem that the existing off-screen rendering method depends on a screen, wherein the off-screen rendering method comprises the following steps: acquiring source data, wherein the source data is data which is not subjected to rendering; determining the type of the source data; if the source data are of a complex type, creating a virtual screen in a first mode; creating a virtual rendering engine, and associating the virtual rendering engine with a virtual screen; loading source data to a virtual rendering engine; rendering the source data on a virtual screen through a virtual rendering engine to obtain rendered data; and storing the rendered data. Therefore, in the process of rendering data, the real screen is not needed, the data is rendered in the virtual screen by creating the virtual screen, and the rendered data is stored under the condition that the rendered data is not displayed so as to be called at any time, so that the data is really separated from the screen in the process of rendering the data.

Description

Off-screen rendering method and device, printing method, computing device and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to an off-screen rendering method and device, a printing method, computing equipment and a storage medium.
Background
Off-screen rendering refers to processing and storing actual rendering data of a graphic in a memory under the condition that the graphic is not displayed on a screen. The existing off-screen rendering method is that the source data is rendered and then drawn to a place outside a screen, and the rendered data cannot be seen on the screen, which can be realized on a specific operating system, but the method still needs the screen as a support. It can be seen that the existing off-screen rendering method can be realized only by depending on the screen. Therefore, in a non-screen scene, rendered data cannot be obtained by using the above scheme, so that a rendering result is blank when source data needs to be rendered. The source data is data that has not been rendered.
Therefore, it is desirable to provide an off-screen rendering method to solve the technical problem that the existing off-screen rendering method depends on the screen.
Disclosure of Invention
To this end, embodiments of the present invention provide an off-screen rendering method, apparatus, printing method, computing device and storage medium in an effort to solve or at least alleviate the above-identified problems.
According to an aspect of an embodiment of the present invention, there is provided an off-screen rendering method executed in a computing device, the computing device not being communicatively connected with a display device, the method including: acquiring source data, wherein the source data is data which is not subjected to rendering; determining the type of the source data; if the source data are of a complex type, creating a virtual screen in a first mode; creating a virtual rendering engine, and associating the virtual rendering engine with a virtual screen; loading source data to a virtual rendering engine; rendering the source data on a virtual screen through a virtual rendering engine to obtain rendered data; and storing the rendered data.
Optionally, the step of rendering the source data on a virtual screen through a virtual rendering engine to obtain rendered data includes: magnifying the pixels and size of the source data to a target multiple; and rendering the amplified source data on the virtual screen to obtain amplified rendering data.
Optionally, the step of storing the rendered data comprises: and reducing the amplified rendering data by the target multiple to obtain the rendering data subjected to reduction processing, and storing the rendering data.
Optionally, the off-screen rendering method provided by the present invention further includes the steps of: if the source data is of a simple type, creating a virtual screen through a second mode, wherein the complexity of the first mode is higher than that of the second mode; and rendering the source data on the created virtual screen to obtain rendered data.
Optionally, the first way comprises a qgraphics scene class, and the source data of the complex type comprises one or more of a table, a form, and a web page.
Optionally, the second manner includes a drawText function, the simple type source data includes one or more of a graph, a line segment, and a picture, and the content of the source data includes rendering coordinates, a width of the rendering, a height of the rendering, the content of the rendering, and a type identifier of the source data.
According to another aspect of the embodiments of the present invention, there is provided an off-screen rendering apparatus, executed in a computing device, the computing device not communicatively connected with a display device, the apparatus including: the system comprises an acquisition module, a rendering module and a display module, wherein the acquisition module is suitable for acquiring source data which is not subjected to rendering; the rendering module is suitable for determining the type of the source data, creating a virtual screen in a first mode if the source data is of a complex type, creating a virtual rendering engine, associating the virtual rendering engine with the virtual screen, loading the source data to the virtual rendering engine, and rendering the source data on the virtual screen through the virtual rendering engine to obtain rendered data; and the storage module is suitable for storing the rendered data.
According to another aspect of the embodiments of the present invention, there is provided a printing method, executed in a printing apparatus, the printing apparatus being in communication connection with a computing apparatus, the computing apparatus storing rendered data, the rendered data being obtained and stored by the above-mentioned off-screen rendering method, the method including: acquiring rendered data from the computing device through a printing plug-in the printing device; sending the obtained rendered data to printing equipment through a printer plug-in; and executing printing operation according to the rendered data.
According to yet another aspect of the invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method as described above.
According to another aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method as described above.
According to the method provided by the embodiment of the invention, when off-screen rendering is carried out, unrendered source data is firstly acquired, then the virtual screen is created according to the type of the source data, the acquired source data is rendered on the virtual screen, rendered data is obtained, and the rendered data is stored. Therefore, in the off-screen rendering method, a real screen is not needed in the process of rendering data, the data is rendered in the virtual screen by creating the virtual screen, and the rendering data is stored under the condition that the rendering data is not displayed so as to be called at any time when needed, so that the screen is truly separated in the data rendering process, and the application scene is wider.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the embodiments of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of an off-screen rendering method 200 according to one embodiment of the invention;
FIG. 3 illustrates a block diagram of an off-screen rendering apparatus 300 according to an embodiment of the present invention;
FIG. 4 shows a flow diagram of a printing method 400 according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the technical problem that the existing off-screen rendering method depends on a screen, the invention provides the off-screen rendering method, which is used for realizing the rendering of data by really separating from the screen. The method may be implemented as an application installed in the computing device 100. The method may also be implemented as a plug-in, integrated into the operating system of the computing device 100. The type of the operating system is not limited by the present invention, and the operating system may be a Linux operating system, for example.
The computing device 100 described above may be implemented as a server, such as an application server, a Web server, or the like; but may also be implemented as a desktop computer, a notebook computer, a processor chip, a tablet computer, etc., but is not limited thereto. FIG. 1 shows a block diagram of the physical components (i.e., hardware) of a computing device 100. In a basic configuration, computing device 100 includes at least one processing unit 102 and system memory 104. According to one aspect, depending on the configuration and type of computing device, system memory 104 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories.
According to one aspect, the system memory 104 includes an operating system 105, and when the off-screen rendering method provided by the present invention is implemented as a plug-in, the plug-in of the off-screen rendering function provided by the present invention is integrated in the operating system 105. When the off-screen rendering method provided by the present invention is implemented as the application 150, the system memory 104 further includes the application 150.
According to one aspect, the operating system 105, for example, is adapted to control the operation of the computing device 100. Moreover, examples are practiced in conjunction with a graphics library, other operating systems, or any other application program and are not limited to any particular application or system. This basic configuration is illustrated in fig. 1 by those components within dashed line 108. According to one aspect, the computing device 100 has additional features or functionality. For example, according to one aspect, computing device 100 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in FIG. 1 by removable storage device 109 and non-removable storage device 110.
As stated hereinabove, in accordance with one aspect, a number of program modules and data files are stored in system memory 104. When executed on processing unit 102, application 150 performs processes that include, but are not limited to, one or more of the stages of method 200 shown in FIG. 2. According to one aspect, the type of application is not limited, e.g., the application further includes: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided applications, web browser applications, and the like.
According to one aspect, examples may be practiced in a circuit comprising discrete electronic elements, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. For example, an example may be practiced via a system on a chip (SOC) in which each or many of the components shown in fig. 1 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or "burned") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functions described herein may be operated via application-specific logic integrated with other components of the computing device 100 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other technologies capable of performing logical operations (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum technologies. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuit or system.
According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output device(s) 114 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118, and other computing devices 118 may be printing devices 118-1, printing devices 118-1 such as printers. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports.
The term computer readable media as used herein includes computer storage media. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, or program modules. System memory 104, removable storage 109, and non-removable storage 110 are all examples of computer storage media (i.e., memory storage). Computer storage media may include Random Access Memory (RAM), Read Only Memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and that can be accessed by computing device 100. In accordance with one aspect, any such computer storage media may be part of computing device 100. Computer storage media does not include a carrier wave or other propagated data signal.
According to one aspect, communication media is embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more feature sets or that has been altered in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, Radio Frequency (RF), infrared, and other wireless media.
FIG. 2 shows a flow diagram of an off-screen rendering method 200 according to one embodiment of the invention. The method 200 is adapted to be executed in the computing device 100, the method 200 comprising step S210 to step S230.
The method 200 is that under the scene without a screen, data is rendered in a mode of creating a virtual screen, and the rendered data is stored under the condition of not displaying the rendered data so as to be called at any time when needed, so that the screen is really separated in the data rendering process.
Before rendering the data, step S210 is first performed to obtain source data. The source data is data which is not subjected to rendering, and the content of the source data comprises drawing coordinates, drawing width, drawing height and drawing content, so that the display position, the display size, the display content and the type identification of the source data in the screen can be determined based on the source data.
Examples of source data of web pages (html), text (text), line segments (line), rectangles (rect), ellipses (ellipse), and pictures (image) are given below:
and (2) valid add _ html (int x, int y, int width, int height, QString data), wherein// x, y represents coordinates, width represents width, height represents height, and data represents specific html data.
void add text (int x, int y, int width, int height, QString data)// x, y represents coordinate, width represents width, height represents height, data represents concrete text content
void add line (int x1, int y1, int x2, int y 2)// add line segment, x1, y1 denote coordinate start points, x2, y2 denote coordinate end points
void add _ rect (int x, int y, int width, int height), add rectangle, x, y representing coordinates, width representing width, height representing height.
void add _ oblique (int x, int y, int width, int height), add ellipse, x, y representing coordinates, width representing width, height representing height.
The method comprises the steps of adding a picture, adding a VOid add image (int x, int y, int width, int height and QString data), adding a picture, wherein x and y represent coordinates, width represents width, height represents height, and data represents picture data.
In the source data example, taking a webpage (html) source data as an example, int x and int y respectively represent rendering coordinates, int width and int height respectively represent rendering width and height, and QString represents complex source data, that is, an identifier of complex type source data. Of course, the present invention does not limit the specific implementation manner of the identifier, as long as the complex source data can be identified, and the QString described above is only an example. The data represents the drawn content. And the simple type source data, i.e., the simple source data (e.g., line) does not include QString, so that the complex type source data and the simple type source data are determined by whether QString exists in the source data.
It should be noted here that the source data includes two types, which are a complex type and a simple type, respectively, where the complex type corresponds to complex source data, and the simple type corresponds to simple source data, that is, the complexity of the complex type source data is higher than that of the simple type source data. The complex type source data comprises one or more of a table, a form and a webpage. The simple type source data includes one or more of a graph, a line segment, and a picture, where the graph is a simple graph such as a rectangle, a circle, and the like.
It is noted that each source data has a corresponding calling interface, and thus in some embodiments, the corresponding source data is obtained by calling the interface of each source data.
After the source data is acquired, step S220 is executed to create a virtual screen, and render the acquired source data on the virtual screen to obtain rendered data.
In some embodiments, step S220 specifically includes: the method comprises the steps of firstly determining the type of source data according to whether a special identifier (namely the identifier QString) exists in the acquired source data, if the special identifier exists in the source data, determining that the currently acquired source data is complex type source data, and if the special identifier does not exist in the source data, determining that the currently acquired source data is simple type source data.
If the complex type source data is acquired currently, a virtual screen is created through a first mode, the source data are rendered on the created virtual screen, and the rendered data are acquired, wherein the first mode can be selected according to an actual application scene. For example, the first way may be a qgraphics scene class. Then, if the currently acquired source data of the second type is specifically:
the virtual screen is created by calling the qgraphics scene class, where the virtual screen can be understood as a virtual canvas. After the virtual canvas is created, a virtual rendering engine, which may be understood as a brush, is created by calling a QWebEngineView class. And associating the created virtual rendering engine with the virtual screen. After the correlation, the source data is loaded to a virtual rendering engine, the pixel and the size of the source data are amplified to a target multiple through the virtual rendering engine, and the source data after the target multiple is rendered on a virtual screen, that is, the drawing content of the amplified source data is drawn on a canvas by using a drawing pen according to the drawing coordinate, the drawing width and the drawing height of the amplified source data, so that the amplified rendering data is obtained. The target multiple may be set according to an actual application scenario, which is not limited in the present invention, for example, the target multiple is 2 or 4.
If the simple type source data is acquired currently, a virtual screen is created through a second mode, and the source data is rendered on the created virtual screen to obtain rendered data, wherein the second mode can be selected according to an actual application scene. For example, the second way may be a drawText function. Then, if the currently acquired source data of the second type is specifically:
and creating a virtual screen by calling a drawText function, namely creating a virtual canvas by calling the drawText function, and drawing the drawing content of the source data on the created virtual canvas according to the drawing coordinate, the drawing width and the drawing height of the source data, so as to obtain the rendered data.
According to the method and the device, the rendering process is different for the source data with different complexities, and the complexity of the source data with the complex type is lower than that of the source data with the simple type, so that the rendering process is relatively simple, and the rendering efficiency can be improved.
After the rendering data is obtained, step S230 is executed to store the rendered data.
If the first type source data is currently acquired, step S230 specifically includes: the rendering data is obtained through the QImag class, and due to the fact that the QImag class has the problem of pixel loss in the process of obtaining the rendering data, the image is distorted, in order to prevent the situation, the source data can be amplified when the rendering data is obtained, and the size of the rendering data can be reduced by a target multiple when the rendering data is stored, so that the rendering data with the same size as the source data and pixels not lower than the source data can be obtained, the obtained rendering data is not true, and only the rendering data needs to be stored.
If the currently acquired source data is of the second type, step S230 specifically includes: the rendering data is saved via a QPicure class or a QPair class. The QPicure class is used for storing the rendering process and can also be understood as storing the drawing process, and the storing the drawing process can realize that the image is not distorted. The qpair class stores the rendered data. Therefore, the integrity of the rendering data can be ensured, and the rendering data can be displayed in a displayable place in a high-definition mode. Of course, the selection of the rendering process or the rendered data can be saved according to the actual application scene.
After the rendering data or the rendering process is stored, when the data is subsequently utilized, such as displaying, printing and the like, the rendering data is directly acquired and displayed on a screen, or the rendering data is acquired and directly printed, and printing is not needed after the rendering data is displayed on the screen.
Thus, off-screen data rendering is achieved. Step S210 to step S230 are performed whenever off-screen rendering is required.
Fig. 3 shows a block diagram of an off-screen rendering apparatus 300 according to an embodiment of the present invention. The apparatus 300 includes an acquisition module 310, a rendering module 320, and a storage module 330, coupled in sequence.
The obtaining module 310 is adapted to obtain source data, where the source data is data that has not been rendered.
The rendering module 320 is adapted to determine a type of the source data, create a virtual screen in a first manner if the source data is a complex type, create a virtual rendering engine, associate the virtual rendering engine with the virtual screen, load the source data to the virtual rendering engine, and render the source data on the virtual screen by the virtual rendering engine to obtain rendered data.
The storage module 330 is adapted to store the rendered data.
It should be noted that the operation principle of the off-screen rendering apparatus 300 is similar to that of the off-screen rendering method 200, and reference may be made to the description of the off-screen rendering method 200 for relevant points, which is not described herein again.
According to the off-screen rendering method, in the process of rendering data, a real screen is not needed, the data is rendered in the virtual screen by creating the virtual screen, and the rendering data is stored under the condition that the rendering data is not displayed so as to be called at any time, so that the screen is truly separated in the process of rendering data, and the application scenes are wider.
Taking printing a rectangular frame as an example, the existing printing method is explained: the front end sends the width and height data of the rectangle to be printed to a printer plug-in at the rear end, the printer plug-in needs to process the data into rendered effect data and send the rendered effect data to a printer, and the printer prints based on the rendered data. In the existing printing scheme, rendering needs to be performed on a screen to obtain rendering data, and then printing operation can be performed based on the rendering data, and if rendering is not performed on the screen, the rendered data cannot be obtained, and printing cannot be performed, that is, the existing printing scheme depends on the screen. In order to solve the problem that the existing printing scheme depends on a screen, the invention provides a printing method which realizes printing operation under the condition of completely separating from the screen.
FIG. 4 shows a flow diagram of a printing method 400 according to one embodiment of the invention. The method 400 is suitable for execution in a printing device 118-1, the printing device 118-1 being in communicative connection with a computing device 100, rendered data being stored in the computing device 100, the rendered data being obtained and stored by the off-screen rendering method 200. The method 400 includes steps S410 to S430.
First, in response to the operation of the user selecting the file to be printed in the user interface, step S410 is executed to obtain the rendered data from the computing device through the print plug-in the printing device. For example, the print plug-in obtains rendered data from the computing device via the communication interface. After the rendered data is acquired, step S420 is executed, the acquired rendered data is sent to the printing device through the printer plug-in, and finally, step S430 is executed, and the printing operation is executed according to the rendered data.
Therefore, under the condition that data rendering is not needed, data are directly printed, and due to the fact that data rendering is not needed, a display interface is not needed, namely a screen is not needed, and printing operation is achieved under the condition that the data are completely separated from the screen.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the off-screen rendering method and the printing method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system is apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. An off-screen rendering method executed in a computing device that is not communicatively connected to a display device, the method comprising:
acquiring source data which is not subjected to rendering;
determining a type of the source data;
if the source data is of a complex type, creating a virtual screen in a first mode, wherein the virtual screen is a virtual canvas;
creating a virtual rendering engine and associating the virtual rendering engine with the virtual screen;
loading the source data to the virtual rendering engine;
rendering the source data on the virtual screen through the virtual rendering engine to obtain rendered data;
and storing the rendered data.
2. The method of claim 1, wherein rendering the source data on the virtual screen by the virtual rendering engine, the step of obtaining the rendered data comprises:
magnifying the pixels and size of the source data to a target multiple;
rendering the amplified source data on the virtual screen to obtain amplified rendering data.
3. The method of claim 2, wherein storing the rendered data comprises:
and reducing the enlarged rendering data by the target multiple to obtain reduced rendering data, and storing the reduced rendering data.
4. The method of any of claims 1 to 3, further comprising the step of:
if the source data is of a simple type, creating a virtual screen through a second mode, wherein the complexity of the first mode is higher than that of the second mode;
and rendering the source data on the created virtual screen to obtain rendered data.
5. The method of any of claims 1 to 3, wherein the first way comprises a QGraphicsScene class and the source data for the complex type comprises one or more of a table, a form, a web page.
6. The method of claim 4, wherein the second manner comprises a drawText function, the simple type of source data comprises one or more of a graph, a line segment, and a picture, and the content of the source data comprises rendering coordinates, a width of the rendering, a height of the rendering, the content of the rendering, and a type identifier of the source data.
7. An off-screen rendering apparatus, for execution in a computing device that is not communicatively connected to a display device, the apparatus comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is suitable for acquiring source data which is not subjected to rendering;
the rendering module is suitable for determining the type of the source data, if the source data is a complex type, creating a virtual screen in a first mode, creating a virtual rendering engine, associating the virtual rendering engine with the virtual screen, loading the source data to the virtual rendering engine, and rendering the source data on the virtual screen through the virtual rendering engine to obtain rendered data;
and the storage module is suitable for storing the rendered data.
8. A printing method executed in a printing apparatus communicatively connected to a computing apparatus in which rendered data is stored, the rendered data being obtained and stored by the off-screen rendering method of any one of claims 1 to 6, the method comprising:
acquiring rendered data from the computing device through a printing plug-in the printing device;
sending the acquired rendered data to the printing equipment through a printer plug-in;
and executing printing operation according to the rendered data.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1 to 6 or the method of claim 8.
10. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1 to 6 or the method of claim 8.
CN202210701479.6A 2022-06-21 2022-06-21 Off-screen rendering method and device, printing method, computing device and storage medium Active CN114780095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210701479.6A CN114780095B (en) 2022-06-21 2022-06-21 Off-screen rendering method and device, printing method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210701479.6A CN114780095B (en) 2022-06-21 2022-06-21 Off-screen rendering method and device, printing method, computing device and storage medium

Publications (2)

Publication Number Publication Date
CN114780095A CN114780095A (en) 2022-07-22
CN114780095B true CN114780095B (en) 2022-09-27

Family

ID=82422174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210701479.6A Active CN114780095B (en) 2022-06-21 2022-06-21 Off-screen rendering method and device, printing method, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN114780095B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835580A (en) * 2021-03-10 2021-05-25 百度在线网络技术(北京)有限公司 Instruction processing method, device, equipment and storage medium
CN112947969A (en) * 2021-03-10 2021-06-11 支付宝(杭州)信息技术有限公司 Page off-screen rendering method, device, equipment and readable medium
CN114429511A (en) * 2021-12-31 2022-05-03 南方电网数字电网研究院有限公司 Fusion rendering method and device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10627908B2 (en) * 2015-03-27 2020-04-21 Lucasfilm Entertainment Company Ltd. Facilitate user manipulation of a virtual reality environment view using a computing device with touch sensitive surface
CN111222302A (en) * 2018-11-26 2020-06-02 北京京东尚科信息技术有限公司 Webpage rendering control method, control device and computer readable medium
CN110310356B (en) * 2019-06-26 2023-06-02 北京奇艺世纪科技有限公司 Scene rendering method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835580A (en) * 2021-03-10 2021-05-25 百度在线网络技术(北京)有限公司 Instruction processing method, device, equipment and storage medium
CN112947969A (en) * 2021-03-10 2021-06-11 支付宝(杭州)信息技术有限公司 Page off-screen rendering method, device, equipment and readable medium
CN114429511A (en) * 2021-12-31 2022-05-03 南方电网数字电网研究院有限公司 Fusion rendering method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114780095A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
US7257776B2 (en) Systems and methods for scaling a graphical user interface according to display dimensions and using a tiered sizing schema to define display objects
US10553001B2 (en) Master page overlay
CN1329870C (en) Block-based rotation of arbitrary-shaped images
CN112580640A (en) Invoice information processing method and device combining RPA and AI
CN112417899A (en) Character translation method, device, computer equipment and storage medium
US20080282148A1 (en) Processing method for increasing speed of opening a word processing document
CN114780095B (en) Off-screen rendering method and device, printing method, computing device and storage medium
JP3469492B2 (en) Font memory and font data reading method
CN114489552B (en) Remote display control system, remote control interface display method and computing equipment
CN113655973B (en) Page segmentation method and device, electronic equipment and storage medium
CN113096217B (en) Picture generation method and device, electronic equipment and storage medium
CN112114786A (en) Editor implementation method, computing device and readable storage medium
JP6676121B2 (en) Data input device and data input program
US8762830B2 (en) Rendering data in the correct z-order
CN111198858A (en) File processing method and device, computer storage medium and terminal
KR20210060808A (en) Document editing device to check whether the font applied to the document is a supported font and operating method thereof
US6281982B1 (en) Information processing apparatus, information processing method, storage medium, and printing system
CN116166364A (en) Window display method, device, computing equipment and storage medium
JP2018136709A (en) Data input device, data input program and data input system
CN104572606A (en) E-book processing method and device
US20040183806A1 (en) Method and apparatus for simulated direct frame buffer access for graphics adapters
CN112463280B (en) Image generation method, device, electronic equipment and computer readable storage medium
US20210279496A1 (en) Information processing apparatus and non-transitory computer readable medium
CN113885763A (en) Electronic book page display method, electronic equipment and computer storage medium
CN117075894A (en) List display method and device, computing equipment and readable storage medium

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
GR01 Patent grant
GR01 Patent grant