Image-text drawing method and device, electronic equipment and storage medium

A technology for graphics, text and storage objects, applied in the computer field, can solve the problems of redundant third-party framework functions, inability to reduce system power consumption, occupying memory space, etc., to improve management convenience, improve development efficiency, and reduce performance consumption. Effect

Pending Publication Date: 2019-06-28
武汉斗鱼鱼乐网络科技有限公司
View PDF5 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in the first implementation scheme, a large number of graphics and text drawing codes corresponding to various scenarios are repeated, resulting in problems of low development efficiency, code redundancy, and the inability to reduce system power consumption due to occupying a large amount of memory space.
In the second implementation scheme, the functions of the third-party framework are redundant, resulting in cumbersome use and the same problem that the system power consumption cannot be reduced.

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
  • Image-text drawing method and device, electronic equipment and storage medium
  • Image-text drawing method and device, electronic equipment and storage medium
  • Image-text drawing method and device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0028] The graphic-text drawing method provided in this embodiment is applicable to situations where graphic-text mixing is required. The method can be performed by a graphic-text mixing device, which can be implemented by software and / or hardware, and which can be integrated in electronic equipment, such as typically user terminal equipment, such as mobile phones, tablet computers or desktop computers Wait. see figure 1 , the method of this embodiment includes:

[0029] S110. Using the content to be drawn and the drawing attribute corresponding to the content to be drawn as input parameters, sequentially call the content-associated attribute and attribute-associated attribute of the initial character string object in a chained calling manner to obtain the target character string object, so as to establish each The content association relationship between the drawn contents, and the attribute association relationship between each to-be-drawn content and the drawing attribute...

Embodiment 2

[0044] On the basis of the first embodiment above, this embodiment further optimizes the function realization of the "image-text drawing attribute of the target character string object". The explanations of terms that are the same as or corresponding to the above-mentioned embodiments will not be repeated here. see image 3 The implementation method of the graphic and text drawing attribute in the graphic and text drawing method provided by this embodiment includes:

[0045] S210. Generate each target rich text storage object according to the character strings, content associations, and attribute associations in the target string object.

[0046] Wherein, the rich text storage object is pre-defined and is used to store the instantiated object DYRichTextRun of the rich text class. The target rich text storage object refers to a rich text storage object that stores rich text content (content to be drawn and drawing attributes). The target rich text storage object can be direc...

Embodiment 3

[0058] On the basis of the above-mentioned second embodiment, this embodiment further optimizes the function realization of the "graphic and text drawing function of the rich text management object". The explanations of terms that are the same as or corresponding to the above-mentioned embodiments will not be repeated here. see Figure 4 The implementation method of the graphic and text drawing function in the graphic and text drawing method provided in this embodiment includes:

[0059] S310. Obtain a child thread through the pre-created asynchronous queue.

[0060] Specifically, in the internal implementation of the graphic drawing function, firstly, a global concurrent queue is lazily loaded as an asynchronous queue. That is, it is automatically created when there is no such asynchronous queue, and it is directly used when the asynchronous queue already exists. The creation of an asynchronous queue will directly switch to a child thread to perform subsequent functional o...

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 embodiment of the invention discloses an image-text drawing method and device, electronic equipment and a storage medium. The method comprises the following steps of: taking to-be-drawn contents and drawing attributes corresponding to the to-be-drawn contents as input parameters; sequentially calling the content association attribute and the attribute association attribute of the initial character string object in a chain calling manner to obtain a target character string object so as to establish a content association relationship among the to-be-drawn contents and an attribute association relationship between each to-be-drawn content and a drawing attribute corresponding to the corresponding to-be-drawn content; taking the callback parameter as an input parameter, calling the image-text drawing attribute of the target character string object in a chain calling manner, and asynchronously drawing each piece of to-be-drawn content according to each drawing attribute to obtain an image-text drawing result; wherein the content association attribute, the attribute association attribute and the image-text drawing attribute are all code block types. According to the technical scheme,image-text drawing can be simply, conveniently and efficiently carried out, and the system performance is optimized.

Description

technical field [0001] The embodiments of the present invention relate to computer technology, and in particular to a method, device, electronic equipment, and storage medium for drawing pictures and texts. Background technique [0002] In the development process of mobile applications, scenarios such as chatting, commenting, barrage, and status posting will involve the mixed arrangement and display of pictures and text, that is, mixed arrangement of pictures and texts or drawing of pictures and texts. The text class that mixes and arranges pictures and text in graphic drawing is called rich text. [0003] In the process of graphics and text drawing, due to the uncertain quantity and size of text and pictures, the implementation logic of graphics and text drawing is complicated, and the system power consumption is high, especially when the number of mixed pictures and texts is huge. consumption is higher. [0004] The methods for realizing graphics and text rendering in th...

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
IPC IPC(8): G06T11/60
Inventor 张骏
Owner 武汉斗鱼鱼乐网络科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products