Wide line drawing method and device

A drawing device and wide-line technology, applied in the direction of drawing from basic elements, can solve problems such as performance degradation, large data volume, and slow speed of drawing wide lines, so as to reduce data volume, improve speed and fluency, and avoid repeated drawing Effect

Active Publication Date: 2017-04-05
GUANGDONG VTRON TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This is a general method for drawing thick lines. When the distance between two points is long, the performance is better, but when the points are relatively dense and the number is large, such as when the mouse moves to collect the drawing points of the line, the drawing points The number of is very large, this method needs to process a large amount of data, the performance will drop, resulting in slower speed when drawing wide lines

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
  • Wide line drawing method and device
  • Wide line drawing method and device
  • Wide line drawing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0021] see figure 1 As shown, a wide line drawing method includes the following steps:

[0022] Step S101, acquiring the coordinates of the first drawing point, and drawing a circular wide line according to the coordinates and line width of the first drawing point. For example, after acquiring the coordinates of the Nth drawing point, the circular wide line Cn can be drawn with the coordinates of the Nth drawing point as the center of the circle and the line width as the diameter. The line width is the number of pixels included in the width (LineWidth) of the currently drawn wide line.

[0023] Step S102, acquiring the coordinates of the second drawing point, and calculating the parameter information of the previous rectangle according to the coordinates of the first drawing point, the coordinates of the second drawing point and the line width. For example, after obtaining the coordinates of the N+1th drawing point, the values ​​of the length and width of the rectangle Ln an...

Embodiment 2

[0047] refer to figure 2 As shown, the wide line drawing method of the present invention is illustrated by taking three adjacent drawing points sampled by the mouse as an example below: P1, P2, and P3 represent three adjacent drawing points sampled by the mouse to the line , assuming that P1 is the first plot point, followed by P2, and then P3.

[0048] Get the coordinates of the first drawing point P1 of the current drawn wide line: draw the circle C1 with the coordinates of P1 as the center and LineWidth as the diameter. Get the coordinates of the second plot point P2. Calculate the distance d1 between the first drawing point P1 and the second drawing point P2, and construct a rectangle L1 with d1 as the width and LineWidth as the length. If the rectangle L1 is contained by the circle C1, the rectangle may not be drawn, that is, the rectangle may not be displayed; otherwise, the rectangle may be drawn, for example, filled with a polygon filling method, so that it is displ...

Embodiment 3

[0059] Corresponding to the wide line drawing method in the first embodiment above, this embodiment also provides a wide line drawing device, such as image 3 shown, including:

[0060] The first drawing module 101 is configured to obtain the coordinates of the first drawing point, and draw a circular wide line according to the coordinates and line width of the first drawing point;

[0061] The first calculation module 102 is configured to obtain the coordinates of the second drawing point, and calculate the parameter information of the previous rectangle according to the coordinates of the first drawing point, the coordinates of the second drawing point and the line width;

[0062] The second drawing module 103 is configured to draw corresponding wide lines according to the parameter information of the circular wide lines and the previous rectangle.

[0063] As a better embodiment, the wide line drawing device may include:

[0064] The second calculation module is used to 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 present invention provides a wide line drawing method and device. The method includes the following steps: acquiring the coordinates of the first drawing point, drawing a circular wide line according to the coordinates and line width of the first drawing point; acquiring the coordinates of the second drawing point , and calculate the parameter information of the previous rectangle according to the coordinates of the first drawing point, the coordinates of the second drawing point and the line width; draw the corresponding wide line according to the parameter information of the circular wide line and the previous rectangle. A wide line drawing method and device of the present invention avoids repeated drawing of already drawn line segments, reduces the amount of data to be processed, and improves the speed and fluency of wide line drawing.

Description

technical field [0001] The invention relates to the technical field of image display, in particular to a line width drawing method and a line width drawing device. Background technique [0002] At present, smart phones, browser components and other devices generally support OpenGLES2.0's non-fixed pipeline display technology for graphics and image rendering. OpenGLES does not support some standard OpenGL interfaces, or continues to restrict certain functions, so developers often need to design some algorithms to achieve complex functions when performing display. [0003] Since OpenGLES2.0 only supports the display of lines with a line width of one pixel, in practical applications it is often necessary to draw a thick line with a line width greater than one pixel. For example, when writing a line on a mobile phone or a tablet, the line width is relatively large. Since there is no related interface for drawing thick lines, it is necessary to design an algorithm to display thi...

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): G06T11/20
Inventor 陈泓坤
Owner GUANGDONG VTRON TECH CO LTD
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