Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for drawing barrage using canvas

A canvas and barrage technology, applied in the field of image processing, can solve problems such as flickering in the barrage display area, achieve the effect of avoiding flickering and speeding up rendering efficiency

Active Publication Date: 2020-02-04
WUHAN DOUYU NETWORK TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, in the prior art, when using Canvas to draw a bullet chat, the bullet chat is drawn and displayed in a real-time manner, that is, for a certain bullet chat character to be displayed, the character in the bullet chat character to be displayed Draw to the bullet chat display area one by one for display. When there are repeated characters in the bullet chat characters to be displayed, repeated drawing will be performed for the repeated characters. When the bullet chat characters to be displayed exist, it is not the first time When the characters displayed in the bullet chatting display area, the characters will still be redrawn. Therefore, when the bullet chatting is drawn in this way, when the bullet chatting volume is large, the bullet chatting display area will flicker

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
  • A method and device for drawing barrage using canvas
  • A method and device for drawing barrage using canvas

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although 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 for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0049] An embodiment of the present invention provides a method for drawing bullet chatting using a canvas, which is applied in a browser, such as figure 1 As shown, the method includes:

[0050] Step 101: Obtain the character string of the barrage to be displayed.

[0051] Step 102: Decompose the bullet chatting character string to be displayed into individual characters.

[0052] Specifically, in this application, when the acqu...

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 relates to the technical field of image processing and particularly relates to a method and device for drawing bullet screens through utilization of canvas. The method comprises the steps of obtaining a to-be-displayed bullet screen character string; decomposing the to-be-displayed bullet screen character string into single characters; judging whether a character image of each character exists in preset character library canvas or not in sequence; if the character images of the characters exist, extracting the character images of the characters, if the character images of the characters do not exist, drawing the character images of the characters and extracting the drawn character images of the characters from the character library canvas; drawing the extracted character images to preset bullet screen object canvas in sequence and splicing all extracted character images, thereby obtaining a bullet screen image corresponding to the to-be-displayed bullet screen character string; and displaying the bullet screen image in a bullet screen display area. According to the method and the device, flicker is prevented from occurring in the bullet screen display area when the bullet screen quantity is high and the rendering efficiency of the bullet screens is improved.

Description

technical field [0001] The present invention relates to the technical field of image processing, in particular to a method and device for drawing barrage by using a canvas. Background technique [0002] Canvas is a canvas element in HTML. Canvas can not only support scripted browser-side drawing operations, but also respond to user operations, such as mouse clicks and keyboard keys, and can also be applied to animation production to draw 2D and 3D images. . In terms of browser support, all browsers that support HTML5 support Canvas. [0003] However, in the prior art, when using Canvas to draw a bullet chat, the bullet chat is drawn and displayed in a real-time manner, that is, for a certain bullet chat character to be displayed, the character in the bullet chat character to be displayed Draw to the bullet chat display area one by one for display. When there are repeated characters in the bullet chat characters to be displayed, repeated drawing will be performed for the re...

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 Patents(China)
IPC IPC(8): H04N21/431H04N21/81H04N21/435H04N21/4788
CPCH04N21/4312H04N21/435H04N21/4788H04N21/8146
Inventor 姚尧张文明陈少杰
Owner WUHAN DOUYU NETWORK TECH CO LTD