A primitive filling method and system based on a dynamic boundary group sequence

A primitive and boundary technology, applied in the field of primitive filling based on dynamic boundary group sequence, can solve the problems of inability to accurately locate the boundary, low algorithm efficiency, large space overhead, etc., and achieve optimal loading and display time, Improved accuracy and improved fill out-of-bounds issues

Active Publication Date: 2019-05-17
NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantage of the injection filling method is that it cannot accurately locate the boundary, and the efficiency is not high; the recursive level of the seed filling algorithm increases with the increase of the

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 primitive filling method and system based on a dynamic boundary group sequence

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] The present invention is based on the primitive filling method of dynamic boundary group sequence, comprising:

[0042] Get the coordinates of the starting point of the primitive to be filled;

[0043] Use the scan line to scan the area where the primitives to be filled row by row or column by column from the starting point, and stop scanning until there is no boundary point of the primitives to be filled in the scanned row or column;

[0044] Obtain the coordinates of the intersection position of the scanning line and the boundary of the primitive to be filled in real time, and push them into the preset boundary group sequence stack in turn;

[0045] For each intersection point in the boundary group sequence stack, combine them according to the order of entering the stack, and obtain at least one filled line segment with the combination of intersection points as the two endpoints;

[0046] Fill the coordinate area and / or fill points covered by each filled line segment...

Embodiment approach

[0053] When the starting point of filling is the vertex or the lowest point of the primitive to be filled, the scan line is a scan line whose vertical coordinate is y, and each row of the region where the primitive to be filled is scanned successively by using the scan line. In this implementation manner, the overall filling order of the primitives to be filled in the present invention is from top to bottom or from bottom to top.

[0054] When the starting point of filling is the left vertex or the right vertex of the primitive to be filled, the scan line is a scan line whose abscissa is x, and each column in the region where the primitive to be filled is scanned successively by using the scan line. In this implementation manner, the overall filling order of the primitives to be filled in the present invention is from left to right or from right to left.

[0055] It also includes: obtaining the pixel value of the starting point of the primitive to be filled; when using the sca...

Embodiment 2

[0063] refer to figure 1 As shown, the present embodiment is based on the method of dynamic boundary group sequence filling primitives, including steps:

[0064] S1, get the coordinates of the filling starting point, including:

[0065] S101, using the mouse to click any point inside the graphic element to be filled, and obtaining the coordinates of the point;

[0066] S102, starting from the selected point coordinates, traversing from bottom to top to obtain the first upper boundary point of the graphics element to be filled in the corresponding column;

[0067] S103, starting from the first upper boundary point, according to the traversal method from left to right, bottom-up, traversing until a certain line no longer detects the boundary point, then the left end boundary point of the previous line of the line is used as filling scan The starting point of , that is, the starting point of scanning line filling, obtains the coordinates of this point;

[0068] S2, starting fr...

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 primitive filling method and system based on a dynamic boundary group sequence. The primitive filling method comprises the following steps of obtaining the coordinates of a starting point of a primitive to be filled; scanning the area where the to-be-filled primitives are located row/column by row from the row/column where the starting point is located by using the scanning line, and stopping scanning until boundary points of the to-be-filled primitives do not exist in the scanned row/column; obtaining intersection point position coordinates of scanning lines and boundaries of to-be-filled primitives, marking boundary attributes of the scanning lines, and sequentially pressing the scanning lines and the boundaries of the to-be-filled primitives into a preset boundary group sequence stack; combining the intersection points in the boundary group sequence stack according to the sequence of entering the stack and boundary attributes to generate a single filling point and/or at least one filling line segment taking two adjacent intersection points as two end points; and filling a coordinate area covered by each filling point or filling line segment with a preset color. According to the method, the accuracy of the primitive boundary can be improved, a large number of recursion problems in a traditional filling method are avoided, the stack space is saved, and the primitive filling efficiency is improved.

Description

technical field [0001] The invention relates to the technical field of graph element drawing in power system visualization engineering, in particular to a graph element filling method and system based on a dynamic boundary group sequence. Background technique [0002] Primitive filling refers to the process of filling the internal pixels of an irregular primitive with a specified filling color. It is widely used in the field of drawing primitives in power systems, and is also an important classification in graphic display. [0003] With the rapid development of the electric power industry, the drawing requirements of system graphics elements are getting higher and higher. As an important branch of drawing, the color filling of primitives urgently needs a complete solution to locate the internal area of ​​primitives and fill primitives efficiently and accurately. [0004] The traditional filling method is roughly divided into two types. One is the injection method, also know...

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/40
Inventor 曾强季玮
Owner NANJING GUODIAN NANZI POWER GRID AUTOMATION 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