CN115756400A - Control drawing method, computing device and storage medium - Google Patents

Control drawing method, computing device and storage medium Download PDF

Info

Publication number
CN115756400A
CN115756400A CN202211193263.XA CN202211193263A CN115756400A CN 115756400 A CN115756400 A CN 115756400A CN 202211193263 A CN202211193263 A CN 202211193263A CN 115756400 A CN115756400 A CN 115756400A
Authority
CN
China
Prior art keywords
control
mask
fillet
radius
size
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
CN202211193263.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.)
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 CN202211193263.XA priority Critical patent/CN115756400A/en
Publication of CN115756400A publication Critical patent/CN115756400A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to the field of application development, in particular to a control drawing method, a computing device and a storage medium, and the method comprises the following steps: the invention discloses a control drawing method which is suitable for being executed in computing equipment and comprises the following steps: responding to a control drawing request, and determining the radius of a fillet and the size of a control according to the control drawing request; constructing a mask according to the radius of the fillet, wherein the mask comprises a sector; determining the shape of the control according to the sector of the mask and the size of the control; and drawing the control according to the control shape. The method constructs a mask comprising a sector, and determines the shape of the control according to the mask so as to draw the control.

Description

Control drawing method, computing device and storage medium
Technical Field
The invention relates to the field of application development, in particular to a control drawing method, computing equipment and a storage medium.
Background
With the development of computer technology, people increasingly realize the operation of computers through various controls. Controls refer to the encapsulation of data and methods. The controls may have their own properties and methods. And various operations can be triggered through the control to complete various works. Along with the demand of people for computer beauty and usability, the fillet control is more and more popular with users. A rounded corner control may be one in which the shape is square, but each corner is circular.
In the prior art, in order to draw the fillet control, a mask having the same shape and size as the fillet control to be displayed needs to be constructed according to the size and the fillet radius of each fillet control. The mask is used to mask an image in the graphics associated with the mask. When drawing the fillet control according to the shade, the material is rendered in the shade, and the material is not displayed outside the shade. The steps for constructing the mask are complex, and when the fillet control is drawn according to the mask, whether a large number of positions render the material or not needs to be calculated, so that time is consumed. Due to device limitations, jamming can result when zooming and displaying controls.
For this reason, a new control drawing method is needed.
Disclosure of Invention
To this end, the present invention provides a control drawing method in an attempt to solve, or at least alleviate, the problems presented above.
According to one aspect of the invention, a control drawing method is provided, which responds to a control drawing request, and determines a fillet radius and a control size according to the control drawing request; constructing a mask according to the radius of the fillet, wherein the mask comprises a sector area; determining the shape of the control according to the sector of the mask and the size of the control; and drawing the control according to the control shape.
Optionally, in a method according to the invention, the control comprises a fillet control and the fillet radius comprises a fillet radius of the fillet control.
Optionally, in the method according to the present invention, the computing device includes a control interface, and the determining the fillet radius and the size of the control according to the control drawing request includes: determining a control to be drawn according to the control drawing request; and determining the fillet radius of the control to be drawn and the size of the control according to the control interface.
Optionally, in a method according to the invention, constructing the mask according to a fillet radius comprises: determining the size of the shade and the radius of the sector according to the radius of the fillet; the mask is constructed according to the mask size and the radius of the sector.
Optionally, in the method according to the present invention, constructing the mask according to the mask size and the radius of the sector includes: constructing a square mask according to the size of the mask; and drawing the sector area in the square mask according to the radius of the sector area, wherein the radius of the sector area is the same as the side length of the square mask.
Optionally, in a method according to the present invention, determining a control shape according to the sector of the mask and the control size of the control includes: determining a square control according to the size of the control; and determining the round angle of the square control according to the sector area of the shade to obtain the shape of the round angle control, wherein the shape of the round angle control comprises a round rectangle.
Optionally, in the method according to the present invention, determining the rounded corner of the square control according to the sector of the mask comprises the steps of: aligning a mask with each corner of the square control; and in the overlapping area of the square control and the shade, the area belonging to the sector area is displayed, and the area not belonging to the sector area is not displayed.
Optionally, in a method according to the present invention, drawing the control according to the control shape includes: and drawing the texture of the control according to the shape of the control to obtain the control.
According to another aspect of the present invention, there is provided a computing device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the control rendering method according to the present invention.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform a control rendering method according to the present invention.
The invention discloses a control drawing method which is suitable for being executed in computing equipment and comprises the following steps: responding to a control drawing request, and determining the radius of a fillet and the size of a control according to the control drawing request; constructing a mask according to the radius of the fillet, wherein the mask comprises a sector area; determining the shape of the control according to the sector of the mask and the size of the control; and drawing the control according to the control shape. The method constructs a mask comprising a sector, and determines the shape of the control according to the mask so as to draw the control.
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 when read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 illustrates a flowchart of a control rendering method 100 according to an exemplary embodiment of the invention;
FIG. 2 illustrates a block diagram of a computing device 200, according to an exemplary embodiment of the invention.
FIG. 3 shows a schematic diagram of constructing a mask according to an exemplary embodiment of the present invention;
FIG. 4 illustrates a diagram for determining a control shape in accordance with an exemplary embodiment of the present invention;
FIG. 5 is a diagram illustrating drawing of a control according to an exemplary embodiment of the present 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 by 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. Like reference numerals generally refer to like parts or elements.
FIG. 1 shows a flowchart of a control drawing method 100 according to an exemplary embodiment of the present invention. A control drawing method in the invention is suitable for being executed in computing equipment. The computing device is described below with respect to fig. 2.
FIG. 2 illustrates a block diagram of a computing device, according to an exemplary embodiment of the invention.
In a basic configuration, computing device 200 includes at least one processing unit 220 and system memory 210. According to one aspect, depending on the configuration and type of computing device, system memory 210 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, system memory 210 includes an operating system 211.
According to one aspect, the operating system 211, for example, is suitable for controlling the operation of the computing device 200. Further, the 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. 2 by those components within dashed line 215. According to one aspect, computing device 200 has additional features or functionality. For example, according to one aspect, computing device 200 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape.
As stated hereinabove, according to one aspect, program modules 212 are stored in system memory 210. According to one aspect, the program modules 212 may include one or more application programs, the invention is not limited to the type of application program, for example, the application may also include: 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. 2 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 200 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 circuits or systems.
According to one aspect, computing device 200 may also have one or more input devices 231, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output device(s) 232 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 200 may include one or more communication connections 233 that allow communication with other computing devices 240. Examples of suitable communication connections 233 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports. Computing device 200 may be communicatively connected to other computing devices 240 via communication connection 233.
Embodiments of the present invention also provide a non-transitory readable storage medium storing instructions for causing the computing device to perform a method according to embodiments of the present invention. The readable media of the present embodiments include permanent and non-permanent, removable and non-removable media, and the storage of information may be accomplished by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of readable storage media include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory readable storage medium.
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 characteristics set or changed 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.
It should be noted that although the computing device described above shows only processing unit 220, system memory 210, input device 231, output device 232, and communication connection 233, in particular implementations, the device may include other components necessary for proper operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only the components necessary to implement the embodiments of the present disclosure, and need not include all of the components shown in the figures.
Turning now to fig. 1. As shown in fig. 1, step 110 is first executed to determine a fillet radius and a control size according to a control drawing request in response to the control drawing request.
According to one embodiment of the invention, the control comprises a fillet control, and the fillet radius comprises the fillet radius of the fillet control. The rounded corner control may be embodied as a control having a square or rectangular shape and a rounded corner. The invention is not limited to the specific shape of the fillet space. The corner of the fillet space is in the shape of an arc, and the radius of the arc is the radius of the fillet.
According to one embodiment of the invention, the computing equipment comprises a control interface, and when the radius of the fillet and the size of the control are determined according to the drawing request of the control, the control to be drawn is determined according to the drawing request of the control; and determining the fillet radius of the control to be drawn and the size of the control according to the control interface. And determining the control to be drawn according to the control drawing request, namely determining the name, the type and other information of the control to be drawn. The control drawing request specifies the control to be drawn, which may include information such as the name of the control. The control interface can be specifically realized as a DQuickItemViewport control for obtaining the fillet radius, the size of the control, the color of the control, the material of the control and the like. Such information may be set in advance or manually input by the user. The invention does not limit the concrete mode of acquiring the control information by the control interface.
Then, step 120 is performed to construct a mask according to the fillet radius, the mask comprising a sector. Specifically, the method comprises the following steps: determining the size of the shade and the radius of the sector according to the radius of the fillet; the mask is constructed according to the mask size and the radius of the sector. When the mask is constructed according to the size of the mask and the radius of the sector area, constructing a square mask according to the size of the mask; and drawing the sector area in the square mask according to the radius of the sector area, wherein the radius of the sector area is the same as the side length of the square mask.
According to an embodiment of the invention, in order to increase the drawing speed of the control and improve the drawing efficiency, the area for judging when the texture is drawn can be reduced by reducing the mask. When the texture is drawn, whether the texture is drawn or not needs to be judged for each part in the control, so that the texture is selectively drawn, the texture is made to present a specific shape, and the drawing of the fillet control is realized.
Therefore, the shape of the fillet material is determined by the mask. According to one embodiment of the invention, when the control is a rounded control, the control size includes the length and width of the rounded control. The mask may be implemented as a square mask, with the side length of the mask being less than the length and width of the fillet space. The side length of the shade is the fillet radius in the fillet control.
According to one embodiment of the invention, the mask includes a sector. The sector area is the fillet of fillet material. The sector is enclosed by a circular arc and two radiuses. Two radiuses of the sector area coincide with two adjacent edges of the shade, and the radius is the same as the side length of the shade. The other two sides of the shade are tangent to the circular arc of the sector.
Fig. 3 shows a schematic diagram of constructing a mask according to an exemplary embodiment of the present invention. As shown in FIG. 3, the mask is at a corner of the control. The side length of the shade is smaller than the length and the width of the control. The sector area of the shade is the fillet of the control. And (4) constructing a shade at other corners of the corresponding control, thus obtaining the control in the shape of a rounded rectangle.
Then, step 130 is executed to determine the shape of the control according to the sector of the mask and the size of the control. Specifically, the method comprises the following steps: determining a square control according to the size of the control; and determining the round angle of the square control according to the sector area of the shade to obtain the shape of the round angle control, wherein the shape of the round angle control comprises a round rectangle. When determining the round angle of the square control according to the sector area of the mask, aligning the mask with each corner of the square control; and in the overlapping area of the square control and the shade, the area belonging to the sector area is displayed, and the area not belonging to the sector area is not displayed.
And when the square control is determined according to the size of the control, determining the length and the width of the square control according to the length and the width of the control. The square control is a right angle control. The edges of the square control are the edges of the round-corner control, and then the square control is processed according to the shade to obtain the shape of the round-corner control. Specifically, the masks are arranged at four corners of the square control, the right angle of each mask is coincided with the right angle of the square control, and the adjacent edges of the masks are coincided with the length and the width of the square control. The sector area of the shade is the fillet of the control. And the transparency of the square control in the mask area is set, so that the shape of the control is determined. If the transparency of the sector area to the control is 1 in the mask area, the control is completely displayed. And in the non-sector area, the transparency of the control is 0, so that the control is not displayed.
FIG. 4 illustrates a schematic diagram of determining a control shape according to an exemplary embodiment of the invention. As shown in fig. 4, a square control is determined, and masks are placed at four corners of the square control: LT-Mask, RT-Mask, LB-Mask, RB-Mask. And determining the transparency of the masks to the control according to the sectors in the four masks to obtain the control in the shape of the rounded rectangle.
Finally, step 140 is executed to draw the control according to the control shape; specifically, the method comprises the following steps: and drawing the texture of the control according to the shape of the control to obtain the control. And drawing the texture of the control in the specified area of the rounded rectangle. The texture specifies the fill style of the control.
According to one embodiment of the invention, when the control is drawn, when the texture is drawn in the control, the texture can be filled in one corner of the rounded rectangle. And after filling, rotating and copying the filled corners, mapping textures, and realizing the drawing of other rounded corners so as to improve the drawing efficiency of the control.
According to one embodiment of the invention, after a control is drawn, the control shape and the mask of the control are saved so as to draw the control with the same fillet radius. The drawing and caching of the mask picture are realized through the Texture material rendering module, so that the mask material with the same radius only needs to be drawn once, and the resource occupation is reduced. The mask material is transmitted through a DQuickItemViewport control interface, and finally transferred to a uniform sampler2D mask in the shader to draw the mask.
FIG. 5 illustrates a diagram of control rendering according to an exemplary embodiment of the present invention. As shown in fig. 5, a rounded control in the shape of a plurality of rounded rectangles is drawn.
According to one embodiment of the invention, the invention may include a DQuickItemViewport control providing a fillet material control external interface including fillet radius size, composite color, source material, material offset, location and size, etc. Can be registered as a type of qml, and is convenient to use in a qml scene. Such information may be set in advance or manually input by the user. The invention does not limit the concrete mode of acquiring the control information by the control interface. The DQuickItemViewport is used for registering the qml element and transferring relevant parameters and controlling a rendering root node, and the function of the DQuickItemViewport mainly comprises two parts:
the Texture mask picture is manufactured and shared by the QSHaredData, so that the mask picture is drawn and cached, the mask material with the same radius only needs to be drawn once, and the resource occupation is reduced. The mask material is transmitted into a MaskEffectNode through the DQuickItemViewport, and finally, the mask material is transmitted into a uniform sampler2D mask in a shader.
And DQuickItemViewport inherited from QQuickItem, providing materials and manufacturing parameters required by the rounded rectangle, returning a root rendering node of the scene graph through the updatePaintNode, controlling a rendering result, and generating a scene graph root rendering node code by referring to the lower part. Meanwhile, the attributes anchors, layer, pos, size and the like of the QQuickItem are inherited. Fast design in the qml scenario is facilitated.
The system also comprises MaskEffectNode drawing nodes which provide scene node management functions and comprise interfaces of a geometric coordinate system, texture mapping management, texture mixing, texture filtering and the like.
TextureMateral is also included to provide management of texture rendering and control the way shaders work.
Also included are TextureMaterialshader classes, control vertex, fragment shader, CPU to shader data transfer, and the like. The TextureMaterialShader controls a final rendering result, and the color is output to a screen by GPU processing under the action of a shader program, and the main functions of the TextureMaterialShader are divided into the following two parts: the CPU transmits parameters to the GPU, transmits parameter codes to the fragment shader in a lower direction by referring to the bind () in the updateState function, binds the material to qt _ Texture and mask variables in the fragment shader, sets the value of the common parameter setUniformValue function, and mainly controls the transmission of the parameters.
And shader output, which is only subjected to radial transformation and data output and fragment shader variable sharing without much description because the vertex shader program is the default. The last output structure is controlled in the fragment shader, texture coordinate mapping is carried out on the texture of the mask material at the sitting corner to other three corners by aligning the texture of the mask material at the sitting corner, and finally four-arc transition is formed. The method avoids repeated drawing of the mask pictures with the same fillet radius, and the mask pictures share textures, so that fillet rectangular controls with the same radius can share the same mask material, the load of the processor caused by drawing of the mask material is reduced, a plurality of controls with the same fillet radius are frequently encountered in a use scene, and the rendering performance is improved by the texture sharing technology. Through the shader program, only the areas from four corners of the rectangle to the circular arc are required to be removed, and the value calculation of the whole source material is not required, so that the GPU resource occupation is reduced.
Furthermore, when the mask is drawn, the drawn mask can be used for pictures needing the same radius mask, so that the pictures with the same fillet radius mask are prevented from being drawn repeatedly, the mask pictures share textures, so that fillet rectangular controls with the same radius can share the same mask material, the load of the CPU (central processing unit) caused by the drawing of the mask material is reduced, a plurality of controls with the same fillet radius are frequently encountered in a use scene, and the rendering performance is improved by the texture sharing technology.
The invention discloses a control drawing method which is suitable for being executed in computing equipment and comprises the following steps: responding to a control drawing request, and determining the radius of a fillet and the size of a control according to the control drawing request; constructing a mask according to the radius of the fillet, wherein the mask comprises a sector; determining the shape of the control according to the sector of the mask and the size of the control; and drawing the control according to the control shape. The method constructs a mask comprising a sector, and determines the shape of the control according to the mask so as to draw the control.
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.
Those skilled in the art will appreciate that the modules or units or groups of 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 device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. Modules or units or groups in embodiments may be combined into one module or unit or group and may furthermore be divided into sub-modules or sub-units or sub-groups. All of the features disclosed in this specification, and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except for at least some of such features and/or processes or elements being mutually exclusive. Each feature disclosed in this specification may be replaced by an alternative feature serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments, not others, 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 with the necessary instructions for carrying out the method or the method elements thus forms a device for carrying out the method or the method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the means for performing the functions performed by the elements for the purpose of carrying out the invention.
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 floppy diskettes, CD-ROMs, hard drives, 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 control drawing method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media stores 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 computer readable media.
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 practitioners skilled in this art. The disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention.

Claims (10)

1. A control rendering method, adapted to be executed in a computing device, the method comprising:
responding to a control drawing request, and determining a fillet radius and a control size according to the control drawing request;
constructing a mask according to the fillet radius, the mask comprising a sector;
determining the shape of a control according to the sector area of the mask and the size of the control;
and drawing the control according to the control shape.
2. The method of claim 1, wherein the control comprises a fillet control, the fillet radius comprising a fillet radius of the fillet control.
3. The method of claim 1, wherein a control interface is included in the computing device, and wherein determining a fillet radius and a control size from the control rendering request comprises:
determining a control to be drawn according to the control drawing request;
and determining the fillet radius of the control to be drawn and the size of the control according to the control interface.
4. The method of claim 1 or 2, wherein said constructing a mask according to said fillet radius comprises:
determining the size of a shade and the radius of a sector according to the radius of the fillet;
and constructing a mask according to the mask size and the radius of the sector.
5. The method of claim 4, wherein said constructing a mask according to said mask size and a radius of a sector comprises:
constructing a square mask according to the size of the mask;
and drawing a sector area in the square mask according to the radius of the sector area, wherein the radius of the sector area is the same as the side length of the square mask.
6. The method of any of claims 1-5, wherein the determining a control shape from a sector of the mask and a control size of a control comprises:
determining a square control according to the size of the control;
and determining a fillet of the square control according to the sector area of the mask to obtain the shape of the fillet control, wherein the shape of the fillet control comprises a fillet rectangle.
7. The method of claim 6, wherein said determining rounded corners for square controls from sectors of the mask comprises the steps of:
aligning the mask with each corner of the square control;
and setting a square control and a mask superposition area, wherein areas belonging to the sector area are displayed, and areas not belonging to the sector area are not displayed.
8. The method of any one of claims 1-7, wherein said drawing a control according to the control shape comprises the steps of:
and drawing the texture of the control according to the control shape to obtain the control.
9. A computing device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-8.
10. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform the method of any of claims 1-8.
CN202211193263.XA 2022-09-28 2022-09-28 Control drawing method, computing device and storage medium Pending CN115756400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211193263.XA CN115756400A (en) 2022-09-28 2022-09-28 Control drawing method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211193263.XA CN115756400A (en) 2022-09-28 2022-09-28 Control drawing method, computing device and storage medium

Publications (1)

Publication Number Publication Date
CN115756400A true CN115756400A (en) 2023-03-07

Family

ID=85350552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211193263.XA Pending CN115756400A (en) 2022-09-28 2022-09-28 Control drawing method, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN115756400A (en)

Similar Documents

Publication Publication Date Title
US11954803B2 (en) Generation of a control stream for a tile
US8514222B2 (en) Device, system, and method of computer aided design (CAD)
JP3260090B2 (en) Computer controlled graphics display system and method for creating a display list in the system
US10019802B2 (en) Graphics processing unit
CN1329870C (en) Block-based rotation of arbitrary-shaped images
US10861229B2 (en) Assembling primitive data into multi-view primitive blocks in a graphics processing system
WO2010018551A1 (en) Device, system, and method of computer aided design (cad)
WO2010000126A1 (en) Method and system for generating interactive information
US20190311535A1 (en) Accessing Primitive Data Using Tessellated Primitive ID
CN110363856B (en) Hybrid hardware
US11928768B2 (en) Ordering of patch selection in tessellation operations
US20230385981A1 (en) Task Merging
JP6820160B2 (en) Programs and systems that render images
CN115756400A (en) Control drawing method, computing device and storage medium
EP4092628A1 (en) Tile region protection using multiple gpus
Sovakar et al. API design for adaptive subdivision schemes
GB2570172A (en) Conservative Rasterization Using Gradients
CN114896179B (en) Memory page copying method and device, computing equipment and readable storage medium
CN115934102B (en) Dynamic allocation method and device for general registers, computer equipment and storage medium
CN114281456A (en) Application window display method, computing device and storage medium
CN115757997A (en) Page display method, computing device and storage medium
CN114281457A (en) Application window display method, computing device and storage medium
CN114003987A (en) Object positioning method and device, electronic equipment and storage medium
CN116824104A (en) Plotting graph drawing method, terminal equipment and storage medium
CN117435100A (en) Element display method, device, computer equipment and 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