Graphical building block programming method, device, electronic device and storage medium
By building graphical building blocks in Canvas canvas, the problems of low rendering performance and page lag caused by traditional SVG drawing are solved, and higher display frame rates and lower network resource consumption are achieved.
Patent Information
- Application Number
- CN202111658040.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-12-30
AI Technical Summary
When the number of graphical building blocks drawn by traditional SVG leads to low rendering performance, large system consumption, and may cause page stuttering.
The Canvas canvas is used to program graphical building blocks, and the initial graphical building blocks are generated through preset rendering rules, and the building block status is updated in real time according to the interactive actions, and the target graphical building blocks are finally converted into the target program code.
It improves the display frame rate on the web page, reduces network resource consumption due to too many building blocks, and ensures the smoothness of graphical building block programming.
Smart Images

Figure CN114327429B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graphical programming, and in particular to a graphical building block programming method, device, electronic equipment and storage medium. Background Art
[0002] Currently, traditional building block graphical programming building blocks (Blockly and Scratch) are drawn using SVG (Scalable Vector Graphics). A building block is drawn by one or more SVGs, and then the SVGs are combined with each other to form a workspace.
[0003] Since SVG is drawn and rendered using the standard Document Object Model (DOM) in the browser, too many SVGs will result in low rendering performance and high system consumption. In addition, they will be drawn at the same time as the HTML Element DOM on the page, which may cause the page to freeze if there are too many SVGs or too many refreshes. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present application provide a graphical building block programming method, device, electronic device and storage medium. The specific solutions are as follows:
[0005] In a first aspect, an embodiment of the present application provides a graphical building block programming method, the graphical building block programming method comprising:
[0006] Acquire declaration information of a building block to be constructed, wherein the declaration information of the building block to be constructed includes building block type information and building block content information corresponding to the building block to be constructed;
[0007] Create a Canvas canvas, and generate a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule, where each initial graphical building block corresponds to a type of operation information and a preset number of building block content information;
[0008] Obtaining interactive actions for each initial graphical building block;
[0009] updating the real-time status of each initial graphical building block according to the interactive action and the real-time update frequency of the Canvas canvas to form a target graphical building block;
[0010] The target graphical building blocks are converted into target program codes according to preset program conversion rules.
[0011] According to a specific implementation of the embodiment of the present application, the step of obtaining declaration information of the building block to be built includes:
[0012] Get user input instructions;
[0013] Parsing the user input instruction to obtain content information and type information of the user input instruction;
[0014] The user input instruction is associated with a preset DSL declaration according to the type information to obtain declaration information of a to-be-built building block indicating content information and type information of the user input instruction.
[0015] According to a specific implementation of the embodiment of the present application, the preset DSL declaration is a declarative programming language configured based on an XML tool or a JSON tool.
[0016] According to a specific implementation of the embodiment of the present application, the step of generating a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule includes:
[0017] Calling a first construction program according to the block type information of the declaration information of the to-be-constructed block to draw the block outer contour of the initial graphical block, wherein the block outer contour includes a block buckle design;
[0018] Calling the first construction program according to the building block content information of the declaration information of the building block to be constructed, so as to draw a display graphic of a preset area of the initial graphical building block;
[0019] The second construction program is called according to the building block buckle design to outline the shape combination of the corresponding initial graphic building block to complete the construction of the initial graphic building block.
[0020] According to a specific implementation of the embodiment of the present application, the building block type information includes a header building block type, an event building block type, an execution building block type, and an output building block type.
[0021] In a second aspect, an embodiment of the present application provides a graphical building block programming device, the graphical building block programming device comprising:
[0022] A first acquisition module is used to acquire declaration information of a building block to be constructed, wherein the declaration information of the building block to be constructed includes building block type information and building block content information;
[0023] A rendering module, used to create a Canvas canvas, and generate a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule, each initial graphical building block corresponds to a type of operation information and a preset number of building block content information;
[0024] A second acquisition module is used to acquire the interactive actions on each initial graphical building block;
[0025] An updating module, used for updating the real-time status of each initial graphical building block according to the interactive action and the real-time update frequency of the Canvas canvas to form a target graphical building block;
[0026] The conversion module is used to convert the target graphical building blocks into target program codes according to preset program conversion rules.
[0027] According to a specific implementation of the embodiment of the present application, the first acquisition module is specifically used to acquire a user input instruction; parse the user input instruction to obtain content information and type information of the user input instruction; associate the user input instruction with a preset DSL declaration according to the type information to obtain declaration information of a to-be-built building block indicating the content information and type information of the user input instruction.
[0028] According to a specific implementation of an embodiment of the present application, the rendering module is specifically used to call a first construction program according to the block type information of the declaration information of the building block to be built, so as to draw the block outer contour of the initial graphical building block, and the block outer contour includes a block snap-on design; call the first construction program according to the block content information of the declaration information of the building block to be built, so as to draw a display graphic of a preset area of the initial graphical building block; call the second construction program according to the block snap-on design to stroke the shape combination of the corresponding initial graphical building block to complete the construction of the initial graphical building block.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program runs on the processor, the graphical building block programming method described in the first aspect is executed.
[0030] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is run on a processor, the graphical building block programming method described in the first aspect is executed.
[0031] The embodiment of the present application provides a graphical building block programming method, device, electronic device and storage medium, the graphical building block programming method includes: obtaining declaration information of the building block to be constructed, the declaration information of the building block to be constructed includes the building block type information and building block content information corresponding to the building block to be constructed; creating a Canvas canvas, and generating a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule, each initial graphical building block corresponds to an operation type information and a preset number of building block content information; obtaining an interactive action for each initial graphical building block; updating the real-time status of each initial graphical building block according to the interactive action and the real-time update frequency of the Canvas canvas to form a target graphical building block; converting the target graphical building block into a target program code according to a preset program conversion rule. The graphical building block programming method of the embodiment of the present application constructs building blocks in the Canvas canvas, so that the building blocks drawn on the web page can be updated in real time, and the smoothness of the building blocks running on the web page is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.
[0033] Figure 1 A schematic diagram of a method flow of a graphical building block programming method provided by an embodiment of the present application is shown;
[0034] Figure 2 A schematic diagram of the interactive structure of a graphical building block programming method provided in an embodiment of the present application is shown;
[0035] Figure 3 A schematic diagram of a device module of a graphical building block programming device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0037] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0038] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0039] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0040] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.
[0041] refer to Figure 1 , is a method flow diagram of a graphical building block programming method provided in an embodiment of the present application. The graphical building block programming method provided in an embodiment of the present application is as follows: Figure 1 As shown, the graphical building block programming method includes:
[0042] Step S101, obtaining declaration information of a building block to be constructed, wherein the declaration information of the building block to be constructed includes building block type information and building block content information corresponding to the building block to be constructed;
[0043] In a specific embodiment, the building blocks are building blocks for graphical programming. The technician configures the commonly used programming languages into building blocks with solid graphics, so that the user can arrange and combine the building blocks according to the shapes of the building blocks and the logical languages indicated by the building blocks. When arranging and combining the building blocks, the user can associate the programming languages of the building blocks, thereby realizing program construction.
[0044] Specifically, the building block type information includes a header building block type, an event building block type, an execution building block type, an output building block type, and the like.
[0045] The header building block is a building block used to configure a program that displays the beginning of a file or a specified area.
[0046] The time building block is a building block used to configure the triggering of the execution of a specified script when a certain event occurs.
[0047] The execution building block is a building block used to configure and execute a specific script.
[0048] The output building block is a building block used to configure the output result of the program.
[0049] It should be noted that all types of graphical building blocks used in the prior art should be included in the feasible implementation scheme of this embodiment.
[0050] The building block content information includes parameter information with actual values, such as color, sound volume, image, area, and text.
[0051] The declaration information of the building blocks to be constructed may be declaration information constructed in a domain specific language (DSL) for graphical programming. Specifically, DSL programming is a declarative programming method. Based on the intermediate structure description language constructed by the DSL programming, user input information can be converted into a programming language capable of constructing building blocks.
[0052] According to a specific implementation of the embodiment of the present application, the step of obtaining declaration information of the building block to be constructed includes:
[0053] Get user input instructions;
[0054] Parsing the user input instruction to obtain content information and type information of the user input instruction;
[0055] The user input instruction is associated with a preset DSL declaration according to the type information to obtain declaration information of a to-be-built building block indicating content information and type information of the user input instruction.
[0056] In a specific embodiment, a user can input a command on a web page, and a graphical building block programming server on the web page will automatically receive the instruction input by the user and perform corresponding building block information association steps according to the instruction input by the user.
[0057] Specifically, Figure 2As shown, the graphical building block programming server of this embodiment includes a DSL parser and a BDP parser. When the server receives the user input instruction, it will associate with the DSL declaration program set in advance by the technician, and combine to generate the declaration information of the building block to be constructed.
[0058] Specifically, after receiving the declaration information of the building block to be constructed, the DSL parser will parse the building block to be constructed according to the DSL declaration program, and split the building blocks of different types to obtain a plurality of building block DSL declaration information corresponding to the initial graphical building blocks. The building block DSL declaration information corresponding to the different building blocks is as follows: Figure 2 The declaration information A of the building block to be built and the declaration information B of the building block to be built.
[0059] According to a specific implementation of the embodiment of the present application, the preset DSL declaration is a declarative programming language configured based on an XML tool or a JSON tool.
[0060] In a specific embodiment, the user input instruction is combined with a preset DSL declaration to generate corresponding declaration information of the building block to be constructed.
[0061] For example, the DSL description of the converted output building block can be:
[0062]
[0063]
[0064] Step S102, creating a Canvas canvas, and generating a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule, each initial graphical building block corresponds to a type of operation information and a preset number of building block content information;
[0065] In a specific embodiment, after receiving the declaration information of the building blocks to be constructed, the web-side graphical programming server in this embodiment will automatically create a corresponding Canvas canvas and draw the graphical building blocks in the above embodiment on the Canvas canvas.
[0066] Specifically, Canvas is an HTML element based on HTML5 in which images can be drawn using scripts.
[0067] Canvas is a drawable area defined by HTML code with height and width attributes. The Canvas area can be accessed based on JavaScript code, and graphics can be dynamically generated through a complete set of drawing functions.
[0068] The web-side graphical programming server of this embodiment is pre-set with a block drawing principle (BDP) parser corresponding to the Canvas canvas. Through the BDP parser, the declaration information of the building block to be constructed can be automatically converted into a graphical building block with shape, content and type.
[0069] Specifically, Figure 2 As shown, the BDP parser converts the declaration information A of the building block to be constructed into the initial graphical building block A, and converts the declaration information B of the building block to be constructed into the initial graphical building block B according to the preset rendering rules.
[0070] According to a specific implementation of the embodiment of the present application, the step of generating a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule includes:
[0071] Calling a first construction program according to the block type information of the declaration information of the to-be-constructed block to draw the block outer contour of the initial graphical block, wherein the block outer contour includes a block buckle design;
[0072] Calling the first construction program according to the building block content information of the declaration information of the building block to be constructed, so as to draw a display graphic of a preset area of the initial graphical building block;
[0073] The second construction program is called according to the building block buckle design to outline the shape combination of the corresponding initial graphic building block to complete the construction of the initial graphic building block.
[0074] In a specific embodiment, after parsing the declaration information of the building block to be constructed, the rect() construction program is called according to the building block type information in the declaration information, and the rect() construction program is used to draw the outline of the building block.
[0075] Specifically, the shape of the block buckle design is associated with the block type information. For example, the event block will pre-set a buckle structure that is combined with the execution block. The block buckle design of each type of block can be adaptively set according to the actual application scenario, which is not limited here.
[0076] In this embodiment, when the rect() construction program is used to draw the outline of the building block, the drawing of the building block buckle is automatically completed.
[0077] After the outline of the building block is constructed, rect() or the graphics included in the declaration information of the building block to be constructed will continue to be used to draw other built-in areas of the building block, such as using field, input, etc., and different graphics can be drawn according to the different requirements of each building block area.
[0078] By drawing graphics for different areas of the building blocks, the logical combination relationship between different building blocks can be indicated by color or pattern, and the user can use the building blocks to perform graphical programming according to the instructions of the graphics.
[0079] Specifically, after obtaining the building blocks with outlines, it is necessary to construct a program through path() or line to() to stroke the shape combinations of different building blocks. For the dragging judgment and snap judgment between building blocks, the corresponding judgment program can be executed according to the borders drawn by the path() and line to() construction programs.
[0080] Step S103, obtaining interactive actions on each initial graphical building block;
[0081] In a specific embodiment, through the creation of the Canvas canvas in the above embodiment and the rendering of each initial graphical building block, a complete workspace capable of graphical programming interaction can be obtained.
[0082] The user moves and combines the initial graphical building blocks in the complete workspace generated by the web page, and sends the interactive action instructions of movement and combination to the graphical programming server of the present embodiment to construct the application program.
[0083] Step S104, updating the real-time status of each initial graphical building block according to the interactive action and the real-time update frequency of the Canvas canvas to form a target graphical building block;
[0084] In a specific embodiment, since the refresh rate of Canvas is controllable, the graphical programming workspace composed of the Canvas can respond in real time to any interactive action on the building blocks, that is, when the user performs any interactive action in the Canvas, the program segment can be updated, which is more conducive to the user using graphical programming for language learning.
[0085] Step S105 , converting the target graphical building block into a target program code according to a preset program conversion rule.
[0086] In a specific embodiment, after the user embeds and associates the initial graphical building blocks, a target graphical building block with complete execution logic can be obtained. Based on the conversion rules between the building blocks and the programs, the execution program corresponding to the target graphical building block can be displayed in the program display area of the page.
[0087] Specifically, the preset program conversion rule can be implemented by using any conventional execution algorithm for converting graphical building blocks into program codes, and the program conversion rule is not specifically limited herein.
[0088] In this embodiment, through the setting of the Canvas canvas, the period of converting the graphical building blocks into program codes can be controlled by controlling the frame rate of the Canvas canvas, without relying on the drawing cycle of the entire DOM, thereby improving the running smoothness of the web page. In addition, any operation on the Canvas canvas will generate a new DSL declaration, and the BDP rendering rules will be updated in real time, so that the building blocks on the Canvas canvas can be in a unified format.
[0089] The graphical building block programming method provided in this embodiment improves the working area of the graphical building blocks and replaces the method of building the workspace based on SVG graphics with the method of building the workspace through Canvas canvas, thereby effectively improving the display frame rate of the web page and reducing the network resource consumption caused by the existence of too many building blocks on the web page.
[0090] refer to Figure 3 , is a schematic diagram of a graphical building block programming device 300 provided in an embodiment of the present application. The graphical building block programming device 300 provided in an embodiment of the present application, such as Figure 3 As shown, the graphical building block programming device 300 includes:
[0091] A first acquisition module 301 is used to acquire declaration information of a building block to be constructed, wherein the declaration information of the building block to be constructed includes building block type information and building block content information;
[0092] A rendering module 302 is used to create a Canvas canvas, and generate a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule, each initial graphical building block corresponds to a type of operation information and a preset number of building block content information;
[0093] The second acquisition module 303 is used to acquire the interactive actions on each initial graphical building block;
[0094] An updating module 304, configured to update the real-time status of each initial graphical building block according to the interactive action and the real-time update frequency of the Canvas canvas to form a target graphical building block;
[0095] The conversion module 305 is used to convert the target graphical building block into a target program code according to a preset program conversion rule.
[0096] According to a specific implementation of the embodiment of the present application, the first acquisition module 301 is specifically used to acquire a user input instruction; parse the user input instruction to obtain content information and type information of the user input instruction; associate the user input instruction with a preset DSL declaration according to the type information to obtain declaration information of a to-be-built building block indicating the content information and type information of the user input instruction.
[0097] According to a specific implementation of an embodiment of the present application, the rendering module 302 is specifically used to call a first construction program according to the block type information of the declaration information of the building block to be built, so as to draw the block outer contour of the initial graphical building block, and the block outer contour includes a block snap-on design; call the first construction program according to the block content information of the declaration information of the building block to be built, so as to draw a display graphic of a preset area of the initial graphical building block; call a second construction program according to the block snap-on design to stroke the shape combination of the corresponding initial graphical building block to complete the construction of the initial graphical building block.
[0098] In addition, an embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein the memory stores a computer program, and when the computer program runs on the processor, the graphical building block programming method in the above embodiment is executed.
[0099] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run on a processor, the graphical building block programming method in the above embodiment is executed.
[0100] In summary, the embodiments of the present application provide a graphical building block programming method, device, electronic device and storage medium. The present invention directly uses the Canvas canvas to draw building blocks, and draws all building blocks into one canvas at the same time without piecing together. The entire Canvas canvas is a complete workspace (WorkSpace), so the shortcomings of DOM drawing can be avoided, and it can be isolated from other HTML elements on the Web side, which will not cause the entire page to freeze, thereby improving the page frame rate and reducing the consumption of network resources.
[0101] In addition, the specific implementation process of the graphical building block programming device, electronic device and computer-readable storage medium mentioned in the above embodiments can refer to the specific implementation process of the above method embodiment, which will not be repeated here.
[0102] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0104] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0105] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A graphical building block programming method, characterized in that: The graphical building block programming method comprises: Acquire declaration information of a building block to be constructed, wherein the declaration information of the building block to be constructed includes building block type information and building block content information corresponding to the building block to be constructed; Create a Canvas canvas, and generate a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule, where each initial graphical building block corresponds to a type of operation information and a preset number of building block content information; Obtaining interactive actions for each initial graphical building block; updating the real-time status of each initial graphical building block according to the interactive action and the real-time update frequency of the Canvas canvas to form a target graphical building block; Converting the target graphical building blocks into target program codes according to preset program conversion rules; The step of generating a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule includes: Calling a first construction program according to the block type information of the declaration information of the to-be-constructed block to draw the block outer contour of the initial graphical block, wherein the block outer contour includes a block buckle design; Calling the first construction program according to the building block content information of the declaration information of the building block to be constructed, so as to draw a display graphic of a preset area of the initial graphical building block; The second construction program is called according to the building block buckle design to outline the shape combination of the corresponding initial graphic building block to complete the construction of the initial graphic building block.
2. The graphical building block programming method according to claim 1, characterized in that: The steps to obtain the declaration information of the building block to be built include: Get user input instructions; Parsing the user input instruction to obtain content information and type information of the user input instruction; The user input instruction is associated with a preset DSL declaration according to the type information to obtain declaration information of a to-be-built building block indicating content information and type information of the user input instruction.
3. The graphical building block programming method according to claim 2, characterized in that: The default DSL is declared as a declarative programming language based on XML tool or JSON tool configuration.
4. The graphical building block programming method according to claim 1, characterized in that: The building block type information includes a header building block type, an event building block type, an execution building block type, and an output building block type.
5. A graphical building block programming device, characterized in that: The graphical building block programming device comprises: A first acquisition module is used to acquire declaration information of a building block to be constructed, wherein the declaration information of the building block to be constructed includes building block type information and building block content information; A rendering module, used to create a Canvas canvas, and generate a preset number of initial graphical building blocks in the Canvas canvas based on a preset rendering rule, each initial graphical building block corresponds to a type of operation information and a preset number of building block content information; A second acquisition module is used to acquire the interactive actions on each initial graphical building block; An updating module, used for updating the real-time status of each initial graphical building block according to the interactive action and the real-time update frequency of the Canvas canvas to form a target graphical building block; A conversion module, used for converting the target graphical building block into a target program code according to a preset program conversion rule; The rendering module is specifically used to call a first construction program according to the block type information of the declaration information of the building block to be built, so as to draw the block outer contour of the initial graphical building block, and the block outer contour includes a block buckle design; call the first construction program according to the block content information of the declaration information of the building block to be built, so as to draw the display graphics of the preset area of the initial graphical building block; call the second construction program according to the block buckle design to stroke the shape combination of the corresponding initial graphical building block, so as to complete the construction of the initial graphical building block.
6. The device according to claim 5, characterized in that The first acquisition module is specifically used to acquire a user input instruction; parse the user input instruction to obtain content information and type information of the user input instruction; and associate the user input instruction with a preset DSL declaration according to the type information to obtain declaration information of a to-be-built building block indicating the content information and type information of the user input instruction.
7. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is run on the processor, the graphical building block programming method according to any one of claims 1 to 4 is executed.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is run on a processor, the graphical building block programming method according to any one of claims 1 to 4 is executed.
Citation Information
Patent Citations
Graphical building block programming method based on FGUI and terminal
CN113760261A