CN116433798A - Method for generating oblique line drawing edge pattern - Google Patents

Method for generating oblique line drawing edge pattern Download PDF

Info

Publication number
CN116433798A
CN116433798A CN202310421734.6A CN202310421734A CN116433798A CN 116433798 A CN116433798 A CN 116433798A CN 202310421734 A CN202310421734 A CN 202310421734A CN 116433798 A CN116433798 A CN 116433798A
Authority
CN
China
Prior art keywords
pattern
filling
diagonal
drawn
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310421734.6A
Other languages
Chinese (zh)
Inventor
杜辉
宋国策
石德斌
李平苍
甘俊
周文明
张良会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Railway Design Corp
Original Assignee
China Railway Design Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Railway Design Corp filed Critical China Railway Design Corp
Priority to CN202310421734.6A priority Critical patent/CN116433798A/en
Publication of CN116433798A publication Critical patent/CN116433798A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a generating method of a slash pattern, which comprises the steps of designing a filling pattern; establishing a pattern template; storing oblique line filling patterns according to the established pattern template; selecting a planar area to be drawn, carrying out edge drawing on the planar area to be drawn according to the oblique line filling pattern stored in the S3, and rasterizing the edge drawing; and deleting the selected planar area to obtain a final slash pattern. The method realizes the parameterization and standardization of the design of the oblique line drawing pattern. Meanwhile, the blank that the current drawing software cannot realize oblique line filling is filled, drawing and modifying efficiency is improved, and drawing quality is improved.

Description

Method for generating oblique line drawing edge pattern
Technical Field
The invention relates to the technical field of thematic drawing, in particular to a method for generating a diagonal drawing pattern.
Background
The prior thematic drawing technology cannot realize oblique line filling, oblique line drawing patterns cannot be manufactured on one platform at one time, particularly for geographic space boundaries, random switching cannot be realized, linear drawing is severely limited, region boundary one-key generation cannot be realized for polygonal boundary regions to be drawn, for example, when multiple provincial regions are drawn, single processing can be realized, therefore, when map drawing is performed, drawing efficiency is low, basic geographic information data need to be converted among a plurality of platforms, and modification is inconvenient. Therefore, the present application proposes a method for generating a diagonal pattern, which uses templating operation to implement uniform operation of diagonal pattern.
Disclosure of Invention
Therefore, the invention aims to provide a method for generating a diagonal pattern, which adopts a templated pattern and a filling form to realize one-key generation of the diagonal pattern during map drawing, so that the diagonal pattern is more convenient and faster to manufacture.
In order to achieve the above object, a method of generating a diagonal pattern according to the present invention includes:
s1, designing a filling pattern style; the design fill pattern style includes: line width, pitch, and angle;
s2, establishing a pattern template, namely establishing an oblique line filling area, and filling the established oblique line filling area by adopting a designed pattern style; wherein: establishing the diagonal filling area comprises drawing two parallel lines; intersecting the parallel lines drawn by S2 with two vertical reference lines and two horizontal reference lines respectively, and forming a 'well' -shaped segmentation on the drawn parallel lines; defining a central position of the 'well' shape as a diagonal filling area;
s3, storing oblique line filling patterns according to the pattern template established in the S2;
s4, selecting a planar area to be drawn, and carrying out edge drawing on the planar area to be drawn according to the established filling template and the pattern template; and rasterize the tracing.
S5, deleting the selected planar area to obtain a final oblique line drawing pattern. .
Further preferably, the line width of the preset filling pattern is 2 pixels to 15 pixels; the space between the filling lines is 1-5 times of line width; the angle of the filling line is 20-160 degrees with the included angle of the horizontal direction.
Further preferably, when the pre-stored pattern is used for filling the built diagonal filling area, the congruent patterns at the same azimuth angle of the diagonal filling area after the parallel lines drawn are divided in a 'well' -shape are ensured.
Further preferably, when the diagonal filling area is established, the method further comprises setting colors of two parallel lines, and storing the colors adopted when the two parallel lines are drawn into a pattern template for being applied to a final tracing style.
Further preferably, when the diagonal filling area is established, the following steps are adopted for drawing two parallel lines:
drawing a first horizontal line segment, and setting the line width to be 4 pixels;
copying the drawn first horizontal line segment as a second horizontal line segment, so that the distance between the two line segments is 16 pixels;
the first horizontal line segment and the second horizontal line segment are rotated by 45 degrees anticlockwise to form two final parallel lines.
Further preferably, when the planar area to be drawn is drawn according to the stored diagonal filling pattern, the planar area to be drawn is obtained according to a provincial range, and the planar area to be drawn is drawn and filled according to a pattern filling mode.
According to the generating method of the diagonal pattern, the parameterization and standardization of the design of the diagonal pattern are achieved by adopting the templated pattern and the filling form. Meanwhile, the blank that the current drawing software cannot realize oblique line filling is filled, drawing and modifying efficiency is improved, and drawing quality is improved.
Drawings
Fig. 1 is a flowchart of a method for generating a diagonal pattern according to the present invention.
FIG. 2 is a schematic diagram of a "well" division in the present invention when diagonal fill areas are created.
Fig. 3 is a diagonally filled region according to embodiment 2 of the present invention.
Fig. 4 is a diagonally filled region according to embodiment 3 of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and the detailed description.
Example 1
As shown in fig. 1, an embodiment of the present invention provides a method for generating a diagonal pattern, which includes the following steps:
s1, designing a filling pattern style; the filling pattern style comprises line width, interval and angle of preset filling patterns; when drawing is performed, the line width of the preset filling pattern adopts 2 pixels to 15 pixels; the space between the filling lines is 1-5 times of line width; the angle of the filling line is 20-160 degrees with the included angle of the horizontal direction.
S2, establishing a pattern template, namely establishing an oblique line filling area, and filling the established oblique line filling area by adopting a pre-stored pattern style; wherein: establishing the diagonal filling area comprises drawing two parallel lines; intersecting the parallel lines drawn by S2 with two vertical reference lines and two horizontal reference lines respectively, and forming a 'well' -shaped segmentation on the drawn parallel lines; defining a central position of the 'well' shape as a diagonal filling area;
when the oblique line filling area is established, the following steps are adopted for drawing two parallel lines:
drawing a first horizontal line segment, and setting the line width to be 4 pixels;
copying the drawn first horizontal line segment as a second horizontal line segment, so that the distance between the two line segments is 16 pixels;
the first horizontal line segment and the second horizontal line segment are rotated by 45 degrees anticlockwise to form two final parallel lines.
S3, storing oblique line filling patterns according to the pattern template established in the S2;
s4, selecting a planar area to be drawn, carrying out edge drawing on the planar area to be drawn according to the oblique line filling pattern stored in the S3, and carrying out rasterization on the edge drawing.
S5, deleting the selected planar area to obtain a final oblique line drawing pattern. And (3) acquiring a selected area corresponding to the drawn planar area filled with the drawn edges in the step (S4), deleting the drawn planar area according to the selected area A, reserving the rasterized oblique line drawing part and generating a final oblique line drawing pattern.
As shown in fig. 2, when the pre-stored pattern is used to fill the created diagonal filling area, it is ensured that the patterns at the same azimuth angle of the diagonal filling area are congruent after the parallel lines drawn are divided in a 'well' -shape.
Example 2
As shown in FIG. 3, when the included angle between the filling line and the horizontal direction is smaller than 90 degrees, the figures at the homonymy angles d, e and f are ensured to be congruent.
Example 3
As shown in fig. 4, when the included angle between the filling line and the horizontal direction is larger than 90 degrees, the figures at the homonymy angles a, b and c are ensured to be congruent.
Further, when the oblique line filling area is established, the method further comprises the steps of setting colors of two parallel lines, and storing the colors adopted when the two parallel lines are drawn into a pattern template for being applied to a final tracing style.
Further preferably, when the planar area to be drawn is traced according to the established filling template and the pattern template, the planar area to be drawn is obtained according to a provincial range, and the planar area to be drawn is traced and filled according to a pattern filling mode.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While still being apparent from variations or modifications that may be made by those skilled in the art are within the scope of the invention.

Claims (6)

1. A method of generating a diagonal pattern, comprising:
s1, designing a filling pattern style; the filling pattern style includes: line width, pitch, and angle;
s2, establishing a pattern template, namely establishing an oblique line filling area, and filling the established oblique line filling area by adopting a designed pattern style; wherein: establishing the diagonal fill area includes: drawing two parallel lines; intersecting the parallel lines drawn by S2 with two vertical reference lines and two horizontal reference lines respectively, and forming a 'well' -shaped segmentation on the drawn parallel lines; defining a central position of the 'well' shape as a diagonal filling area;
s3, storing oblique line filling patterns according to the pattern template established in the S2;
s4, selecting a planar area to be drawn, carrying out edge drawing on the planar area to be drawn according to the oblique line filling pattern stored in the S3, and carrying out rasterization on the edge drawing;
s5, deleting the selected planar area to obtain a final oblique line drawing pattern.
2. The method of generating a diagonal pattern according to claim 1, wherein the line width of the design filler pattern is 2 pixels to 15 pixels; the space between the filling lines is 1-5 times of line width; the angle of the filling line is 20-160 degrees with the included angle of the horizontal direction.
3. The method for generating a diagonal pattern according to claim 1, wherein when the created diagonal filling area is filled with the designed pattern, it is ensured that the patterns at the same azimuth angle of the diagonal filling area are congruent after the "well" division is formed on the drawn parallel lines.
4. The method of generating a diagonal line pattern according to claim 1, wherein the creating the diagonal fill area further comprises setting colors of two parallel lines, and wherein the colors used in drawing the two parallel lines are saved to a pattern template for application to a final diagonal line pattern.
5. The method for generating a diagonal line pattern according to claim 1, wherein when the diagonal line filling area is created, the steps of drawing two parallel lines are as follows:
drawing a first horizontal line segment, and setting the line width to be 4 pixels;
copying the drawn first horizontal line segment as a second horizontal line segment, so that the distance between the two line segments is 16 pixels;
the first horizontal line segment and the second horizontal line segment are rotated by 45 degrees anticlockwise to form two final parallel lines.
6. The method for generating a diagonal line pattern according to claim 1, wherein when the diagonal line filling pattern stored in the filling template and the pattern template established in S3 is used for performing the edge-drawing on the planar area to be drawn, the planar area to be drawn is obtained according to a provincial range, the planar area to be drawn is subjected to edge-drawing filling according to a pattern filling mode, and the effect after the edge-drawing is rasterized.
CN202310421734.6A 2023-04-19 2023-04-19 Method for generating oblique line drawing edge pattern Pending CN116433798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310421734.6A CN116433798A (en) 2023-04-19 2023-04-19 Method for generating oblique line drawing edge pattern

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310421734.6A CN116433798A (en) 2023-04-19 2023-04-19 Method for generating oblique line drawing edge pattern

Publications (1)

Publication Number Publication Date
CN116433798A true CN116433798A (en) 2023-07-14

Family

ID=87082994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310421734.6A Pending CN116433798A (en) 2023-04-19 2023-04-19 Method for generating oblique line drawing edge pattern

Country Status (1)

Country Link
CN (1) CN116433798A (en)

Similar Documents

Publication Publication Date Title
US10062192B2 (en) Fast high-fidelity flood-filling on vector artwork
US5831632A (en) Automatic graphical pattern placement
US7907788B2 (en) Resolution conversion method
CN109767479B (en) Dynamic boundary group sequence-based primitive filling method and system
JP3433828B2 (en) Method and apparatus for edge improvement of pixel images
CN110110028B (en) Method and system for displaying map according to user-defined area and oriented to OGC standard
KR20080009870A (en) Apparatus and method for rotation bitmap image
CN116433798A (en) Method for generating oblique line drawing edge pattern
CN110853063A (en) Image segmentation information processing method, device, equipment and storage medium
JP2010515131A (en) Method and system for generating boundaries in the process of rasterizing vector graphics, and method for manufacturing the system
JP3885044B2 (en) Apparatus, method, and computer program for generating one or more linear blends
CN109359381B (en) Laser path planning method based on voxels
CN116843861A (en) Three-dimensional model simplification method
CN108897912B (en) Hole decorative plate design and arrangement method based on circular piles
CN115761166A (en) Map construction method based on vector tiles and application thereof
CN110969567B (en) GPU line character rasterization translation coordinate system scanning method
US9217949B2 (en) Image variable magnification device and image variable magnification method
JP2005079392A (en) Method for generating image drawing data
CN115471585A (en) Method and system for pixelating vector graphics into image
CN114741188A (en) Graphic element processing method and device, electronic equipment and storage medium
CN108665514B (en) Font dividing method and font dividing device
CN111223142A (en) Vertex coordinate mapping method for GPU point rasterization point size odd-even configuration
CN117875261B (en) Verification method and device for rectangular inclusion rule in integrated circuit layout verification
JP4435141B2 (en) Character recognition device, character recognition method, and character recognition program
JP5499727B2 (en) Image processing apparatus, image processing method, image processing program, and seal manufacturing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination