Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Canvas code generation method and device, electronic equipment and storage medium

A technology of code generation and code, applied in the field of Canvas in the field of Internet technology, can solve the problem of low efficiency of Canvas code generation, and achieve the effect of improving generation efficiency

Active Publication Date: 2017-10-24
BEIJING WEIYING TIMES TECH CO LTD
View PDF8 Cites 22 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a Canvas code generation method, device, electronic equipment, and storage medium to solve the problem of low Canvas code generation efficiency in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Canvas code generation method and device, electronic equipment and storage medium
  • Canvas code generation method and device, electronic equipment and storage medium
  • Canvas code generation method and device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] In order to provide an implementation plan for improving the efficiency of Canvas code generation, embodiments of the present invention provide a Canvas code generation method, device, electronic equipment, and storage medium. The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that, The preferred embodiments described here are only used to illustrate and explain the present invention, not to limit the present invention. And in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0045] The embodiment of the present invention provides a Canvas code generation method, such as figure 1 shown, including:

[0046] Step 11, obtaining the SVG (Scalable Vector Graphics, scalable vector graphics) file used to generate the code.

[0047]Step 12, based on the tag name, tag type and attribute informati...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a canvas code generation method, comprising: acquiring an SVG (scalable vector graphics) file for generating a code; generating JSON-format intermediate data including elements and their hierarchical relationship based on tag names, tag types and attribute information of the elements in the SVG file; traversing the intermediate data according to sequences from outside to inside and front to rear in the hierarchical relationship of the elements, and determining a canvas code unit corresponding to the attribute information of each element; combining the determined canvas code units according to the sequences to obtain a canvas code corresponding to the SVG file. Therefore, canvas codes are generated automatically, and canvas code generating efficiency is improved.

Description

technical field [0001] The present invention relates to the technical field of Canvas in the Internet technical field, and in particular to a Canvas code generation method, device, electronic equipment and storage medium. Background technique [0002] In Internet technology applications, it is often necessary to display some graphics in the interface presented to the user. To achieve this purpose, UI designers provide user interface prototype design drawings, and front-end engineers are responsible for converting prototype design drawings into codes to restore the design. [0003] Front-end engineers can use webpage canvas technology when converting code, that is, Canvas technology supported by HTML5 (Hyper Text Markup Language, Hypertext Markup Language). When in use, the Canvas API (Application Programming Interface, application programming interface) can be invoked with the scripting language Java script supported by the browser, as a code means for the front-end enginee...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44G06F9/45
CPCG06F8/38G06F8/425
Inventor 谢杨玲
Owner BEIJING WEIYING TIMES TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products