CN101093584A - Method and device for creating thick line - Google Patents

Method and device for creating thick line Download PDF

Info

Publication number
CN101093584A
CN101093584A CN 200710138052 CN200710138052A CN101093584A CN 101093584 A CN101093584 A CN 101093584A CN 200710138052 CN200710138052 CN 200710138052 CN 200710138052 A CN200710138052 A CN 200710138052A CN 101093584 A CN101093584 A CN 101093584A
Authority
CN
China
Prior art keywords
line
slope
live width
thick line
cap
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.)
Granted
Application number
CN 200710138052
Other languages
Chinese (zh)
Other versions
CN101093584B (en
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.)
ZTE Corp
Original Assignee
ZTE 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 ZTE Corp filed Critical ZTE Corp
Priority to CN2007101380525A priority Critical patent/CN101093584B/en
Publication of CN101093584A publication Critical patent/CN101093584A/en
Application granted granted Critical
Publication of CN101093584B publication Critical patent/CN101093584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

A method for generating thick line includes generating line width increment table, confirming slope section of thick line through quick displacement comparison according to coordinate value of thick line end point, seeking relevant line width increment in said table according obtained slope section and line width, adding line width with line width increment to obtain scan line length, using current point as center point to scan out a horizontal line, setting scan range to be half of scan line length to make symmetric scan and plotting out line cup.

Description

Thick line generation method and device
Technical field
The present invention relates to field of Computer Graphics, GDI (Graphics Device Interface, Graphics Device Interface) basic figure generating algorithm, relate in particular to a kind of thick line generation method and device, it can generate thick line fast, is particularly useful for drawing fast of geographical figure in for example embedded geographical information systems, the navigational system.
Background technology
The present invention derives from " LBS (Location Based Service; location-based service) software platform " project, can be by wireless location technology and GIS (GeographicInformation System, Geographic Information System) combination of technology is told the geographic position graphical information that the user needs by the graphic display system of embedded user terminal (mobile phone etc.).
When showing the information in based target geographic position, need call the basic figure generating algorithm continually and carry out geographical graphic describing, therefore, and graphic describing algorithm efficiently, promptly the Fundamentals of Computer Graphics algorithm research is one of key of this software platform research.Nearly all there is the slow-footed problem of geographical graphic describing in embedding GIS equipment on the market, and figure generating algorithm rapidly and efficiently can greatly be improved the system performance and the efficient of geographic information services undoubtedly, improves user satisfaction and product competitiveness.
In geographical graphic describing process, often need the short and thick lines of picture width greater than a pixel, represent road, sign, profile, building, river etc.The thick line technique of painting commonly used is drawn in order to reach meticulous; used more operand to calculate the outline polygon and then the employing polygon filling algorithm of thick line; wherein need considerable floating-point multiplication and division, square, evolution, rounding operation; in graphics workstation or PC system owing to system's dominant frequency height, the support of hardware floating point processor, GPU is arranged; and general application does not need frequent a large amount of reasons such as thick line of drawing, and can embody the speed of drawing faster usually.And during the geographical figure of drawing continually in embedded graph system that a large amount of fine rules, thick line form, the hardware configuration condition in medium-to-high grade graphics system has not existed, and therefore also just can't realize the speed of drawing faster.
In order to address the above problem, need design the high speed generation method of thick straight line according to the characteristics of embedded system hardware configuration, however this kind generation method that still is unrealized at present.Though the history that the research of Fundamentals of Computer Graphics algorithm has had surplus in the of 40 year, its development is quite ripe, is difficult to make the achievement of novelty again, and the small progress of basic algorithm will be considerable improves graphics system efficient.Research, improvement and optimization basic figure generating algorithm have very important meaning.
Summary of the invention
Consider the above-mentioned problems in the prior art and propose the present invention, for this reason, the present invention aims to provide a kind of thick line generation method and device, it can be realized quick filling, reduce floating-point operation and rounding operation, thereby generate thick line fast, and the application characteristic can be to the map making profile time is done some practical through engineering approaches and is handled.
According to the present invention, provide a kind of thick line generation method.
This thick line generation method comprises: step 1, generate the live width increment list in advance, and wherein, comprise pre-regularly four the interval corresponding live width increments of slope of live width in the width increment list; Step 2 is relatively determined the slope interval of thick line by rapid traverse according to the coordinate figure of thick line end points; Step 3 according to the slope interval and the live width that obtain, is searched corresponding live width increment in the width increment list in step 2, live width and the addition of live width increment are obtained length of scanning line L; Step 4 when calculating point of generation with " 2 points-symmetry " line algorithm, is that mid point scans a level or vertical line with current point at every turn, symmetrical scanning, and swash width is half of length of scanning line L; Step 5, the Plotted line cap.
Wherein, in step 1, come the molded breadth increment according to the intermediate value of slope.Particularly, come the molded breadth increment according to the equal error intermediate value, wherein, the slope value of equal error intermediate value during for the interval middle of the slope of obtaining by slope value.Come the molded breadth increment according to the equiprobability intermediate value, wherein, the slope value of equiprobability intermediate value during for the interval middle of the slope of obtaining by isogonism.In addition, when generating the live width increment list, carry out the live width incremental computations one time every 4 pixels.
Four above-mentioned slope intervals are: (0,1/4), (1/4,1/2), (1/2,3/4), (3/4,1), and further comprise in the live width increment list and the interval corresponding SLOPE value of four slopes.
Correspondingly, in step 3, in the live width increment list, search its corresponding SLOPE value, then,, from the live width increment list, search the live width increment of correspondence according to 1/4th value of live width and the SLOPE value of searching according to the slope interval of determining.
In step 4, begin setting-out simultaneously from two of sweep trace, once draw two points, through L/2 the whole piece sweep trace that draws.And in step 5, when the Plotted line cap, once draw four points.In addition, when the Plotted line cap, when the absolute value of thick line slope less than 1 the time, generate the left line cap and the right line cap of thick line, when the absolute value of thick line slope greater than 1 the time, generate the reach the standard grade cap and the cap that rolls off the production line of thick line.
According to the present invention, also provide a kind of thick line generating apparatus.This device comprises: live width increment list generation module, be used to generate the live width increment list, and wherein, comprise pre-regularly four the interval corresponding live width increments of slope of live width in the width increment list; The interval determination module of slope is used for relatively determining by rapid traverse according to the coordinate figure of thick line end points the slope interval of thick line; Length of scanning line determination module is used for searching corresponding live width increment according to definite slope interval and the live width of the interval determination module of slope in the width increment list, and live width and the addition of live width increment are obtained length of scanning line L; The setting-out module is used for calculating when generating a point with " 2 points-symmetry " line algorithm at every turn, is that mid point scans a level or vertical line with current point, symmetrical scanning, and swash width is half of length of scanning line L; Line cap drafting module is used for the Plotted line cap.
Wherein, live width increment list generation module comes the molded breadth increment according to the intermediate value of slope, and when generating the live width increment list, carries out the live width incremental computations one time every 4 pixels.
In addition, its corresponding SLOPE value is searched in the slope interval that length of scanning line determination module is determined according to the interval determination module of slope in the live width increment list, then, according to 1/4th value of live width and the SLOPE value of searching, from the live width increment list, search the live width increment of correspondence.The setting-out module begins setting-out simultaneously from two of sweep trace, once draws two points, through L/2 the whole piece sweep trace that draws.Line cap drafting module when the Plotted line cap, when the absolute value of thick line slope less than 1 the time, generate the left line cap and the right line cap of thick line, when the absolute value of thick line slope greater than 1 the time, generate the reach the standard grade cap and the cap that rolls off the production line of thick line.
By the present invention, provide little and thick line good connecting effect of a kind of operand to generate scheme fast, by using the efficient that the present invention can improve graphics system.
Other features and advantages of the present invention will be set forth in the following description, and, partly from instructions, become apparent, perhaps understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the instructions of being write, claims and accompanying drawing.
Description of drawings
Accompanying drawing is used to provide further understanding of the present invention, and constitutes the part of instructions, is used from explanation the present invention with embodiments of the invention one, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 draws the thick line design sketch for point becomes scanning Beam Method (thick line generating algorithm commonly used does not generally all adopt this method);
Fig. 2 is the synoptic diagram of exemplary scanning line length computing method;
Fig. 3 is the process flow diagram according to the thick line generation method of the embodiment of the invention;
Fig. 4 is the synoptic diagram according to the line cap tracing step of the embodiment of the invention;
Fig. 5 is the block diagram according to the thick line generating apparatus of apparatus of the present invention embodiment;
Fig. 6 shows the connection design sketch of line cap;
Fig. 7 shows the design sketch when using the present invention to draw thick line generation polygon; And
Fig. 8 shows the defective of line cap discharge drawing method of the present invention.
Embodiment
The embodiment of the invention provides a kind of thick line to generate method and apparatus, and it can generate fast and connect effect thick line preferably, belongs to the part of embedded geographical information service equipment basic figure generating algorithm research.
Below in conjunction with accompanying drawing the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein only is used for description and interpretation the present invention, and be not used in qualification the present invention.
Method embodiment
According to the embodiment of the invention, a kind of thick line generation method is provided, its use " 2 points-symmetry " Line generating algorithm generates the axle center of thick line, do not need to calculate the thick line profile, directly use the sweep trace suitable to draw (length of sweep trace draws by the delta algorithm of tabling look-up), reached quickish formation speed with live width.In whole thick line generative process, only to have used the adding of integer number, subtracted, displacement and internal memory have been tabled look-up computing, operand is very little.This method has also solved the problem of the broken line joint line cap connection processing that exists in the thick line drawing process, proposed a kind of line cap technique of painting of novelty, and not only operand is little, and has reached reasonable connection effect.
At first, Fig. 1 draws the thick line design sketch for point becomes scanning Beam Method (thick line generating algorithm commonly used does not generally all adopt this method).It is on the basis of 2 points-symmetrical Bresenham Line generating algorithm, point of every generation, just substitute with picture vertical (the thick line slope is less than 1) or the operation of level (the thick line slope is greater than 1) sweep trace drawing point operation, what draw like this is the thick line of a parallelogram, if draw suitable line cap (termination) again, can also when drawing broken line, show good continuity.Result when not having the setting-out cap as shown in Figure 1.
Point becomes the length that at first will calculate sweep trace when scanning Beam Method is used, and typical calculation method has as shown in Figure 2 been used the sizable floating-point operation of operand.
Method of the present invention adopts the delta algorithm of tabling look-up to replace computing method shown in Figure 2, order L = w × 1 + ( dy / dx ) 2 = w × 1 + m 2 = w + Δw , Adopt a kind of approximate processing method of practical through engineering approaches, calculate width increment Delta w=L-w earlier according to different slope interval and live width, these good as calculated width increment sizes leave in the width increment list, just can index the width increment size fast by the live width and the slope of straight line during use.Because L=w+ Δ w, so just can replace calculating the complex calculation of L by the method for looking into the width increment list, method of the present invention can be only with the displacement of integer, relatively come the Δ w value of the corresponding thick line that quick indexing goes out.
Based on above description, next, as shown in Figure 3, comprise according to the thick line generation method of the embodiment of the invention:
Step S302 generates live width increment list (following table 1 and table 2) in advance, wherein, comprises pre-regularly four the interval corresponding live width increments of slope of live width in the width increment list;
Step S304, (dx dy) relatively determines the slope interval of thick line by rapid traverse according to the coordinate figure of thick line end points;
Step S306 according to the slope interval and the live width that obtain, searches corresponding live width increment in the width increment list in step S304, live width w and live width increment Delta w addition are obtained length of scanning line L (L=w+ Δ w);
Step S308 when calculating point of generation with " 2 points-symmetry " line algorithm, is that mid point scans a level or vertical line with current point at every turn, symmetrical scanning, and swash width is half of length of scanning line L;
Step S310, the Plotted line cap.
Below will further describe each details of above-mentioned processing.
Table 1 has represented that live width is 1 o'clock a live width increment, four slope intervals (0,1/4), (1/4,1/2), (1/2 when showing live width W=1,3/4), the result of calculation of width increment Delta w (further comprising in the live width increment list and the interval corresponding SLOPE value of four slopes) in (3/4,1).
L = w × 1 + ( dy / dx ) 2 = w × 1 + m 2 = 1 × 1 + m 2 = 1 + Δw , In table 1, intermediate value according to slope m accurately calculates Δ w, wherein, the slope value when the equal error intermediate value is meant and gets the interval middle of slope by slope value is calculated Δ w, and the slope value when the equiprobability intermediate value is meant according to the interval middle of the slope of obtaining by isogonism is calculated Δ w.Because pixel of the every variation of live width all will be calculated the live width increment in four slope intervals, the live width increment list of producing so just may be very big, live width increment maximal value when considering a pixel is 0.325, live width might as well be done a live width incremental computations when 4 pixels, so just can make increment list by (w/4) * (4* Δ mW) and the value of SLOPE, and the value by w/4 and SLOPE is found Δ w=AddWith[w>>2 fast] [SLOPE], L=w+ Δ w.Handle the error of bringing as can be seen like this from the table 2 that completes and make live width not lose continuity, that is to say that maximum has the error of a pixel.
Table 1
Slope m Δ w equal error intermediate value Δ w equiprobability intermediate value Selected intermediate value Δ mW 4*ΔmW SLOPE
(0,1/4) 0.0153 -0.015 +0.015 0.0075 -0.023 +0.0075 0.0153 -0.015 +0.015 0.061 0
(1/4,1/2) 0.0744 -0.04 +0.015 0.0676 -0.05 +0.037 0.0744 -0.04 +0.015 0.2975 1
(1/2,3/4) 0.184 -0.07 +0.04 0.1792 -0.07 +0.06 0.184 -0.07 +0.04 0.736 2
(3/4,1) 0.332 -0.08 +0.07 0.325 -0.09 +0.075 0.332 -0.08 +0.07 1.32 3
Other Can obtain respective algorithms by symmetrical mapping, have equivalence
Table 2 shows the actual live width increment list (unit: pixel) that uses in the method (algorithm).Live width increment when this table has been stored from 1 to 80 pixel of live width.
Table 2
W/4SLOPE 0 1 2 3
0 0 0 0 0
1 0 0 1 1
2 0 0 2 3
3 0 1 2 4
4 0 1 3 5
5 0 2 4 7
6 0 2 5 8
7 0 2 6 9
8 0 2 6 10
9 1 3 7 12
10 1 4 8 13
11 1 4 8 15
12 1 4 9 16
13 1 4 10 17
14 1 4 10 18
15 1 4 11 20
16 1 5 12 21
17 1 5 13 22
18 1 5 13 24
19 1 5 14 25
In step S304, the coordinate difference dx, the dy that calculate according to the rectilinear end point obtain the value of the interval SLOPE of slope by the method for rapid traverse comparison, and the SLOPE value is placed among the ROM, shown in following C language macro definition:
#define SLOPE_ROM(dx,dy,ROM) \
If (dx>(dy<<1) ‖ dx==(dy<<1))/* slope<=1/2*/
{ \
If (dx>(dy<<2)) ROM=0; / * slope<1/4*/
else ROM=1; \
} \
else \
{ \
If (((dy<<1)+dy)<(dx<<2)) ROM=2; / * 1/2<slope<3/4*/
else ROM=3; \
In step S306, in the live width increment list, search its corresponding SLOPE value according to the slope interval of determining, then,, from the live width increment list, search the live width increment of correspondence according to 1/4th value (w/4) of live width and the SLOPE value of searching.For example, associative list 2, the line slope that requires picture are 0.8, width is the thick line of 23 pixels, obtain live width earlier about 4 integer multiple 23/4=5, determine slope interval value m=0.8 ∈ (3/4,1) again, so SLOPE=3.W/4=5 is capable in table, and it is 7 that the SLOPE=3 row can be found the live width increment, and sweep length is L=w+ Δ w=23+7=30 just so, is 29.454 and use accurate formula result of calculation.By above look-up method, maximum error is 8% *W, when drawing geographical figure because often the live width of drawing is generally less than 30 pixels, and the live width precision of drawing not need draught machine, graphical tool high like that, such error is an acceptable.
In step S308, because symmetry can begin setting-out simultaneously from two of sweep trace, once draw two points, through L/2 the whole piece sweep trace that draws.Because 2 points-symmetry algorithm once can generate 4 points, per like this step is scanned 8 points that in fact can draw, and 8 extraordinarily quick-acting fruits are arranged.The actual scanning line length can have the error of a pixel because of the parity of L, certainly, does not use symmetrical scanning can eliminate this error.When " 2 points-symmetry " when setting-out has generated the thick line axle center, the scanning of thick line generates and has also finished like this.
In step S310, the Plotted line cap is last step that generates thick line.The realization of algorithm is to be finished by a loop statement, considers the symmetry of line cap shaped, draws two line caps again simultaneously, once can sign in 4 points.Slope is greater than the pattern 2 that adopted accompanying drawing 4 at 1 o'clock, and slope divides stepx=1 (Fig. 4 (1)), stepx=-1 (Fig. 4 (2)), stepy=1 (Fig. 3 (3)), several situations of stepy=-1 (Fig. 4 (4)) to handle less than 1 o'clock pattern 1 with Fig. 4.That is, the thick line slope absolute value generated the left line cap and the right line cap of thick line section less than 1 o'clock; The thick line slope absolute value generated the reach the standard grade cap and the cap that rolls off the production line of thick line section greater than 1 o'clock.
Device embodiment
According to the embodiment of the invention, provide a kind of thick line generating apparatus.
As shown in Figure 5, this device comprises: live width increment list generation module 502, be used to generate the live width increment list, and wherein, comprise pre-regularly four the interval corresponding live width increments of slope of live width in the width increment list; The interval determination module 504 of slope is used for relatively determining by rapid traverse according to the coordinate figure of thick line end points the slope interval of thick line; Length of scanning line determination module 506 is used for searching corresponding live width increment according to definite slope interval and the live width of the interval determination module of slope in the width increment list, and live width and the addition of live width increment are obtained length of scanning line L; Setting-out module 508 is used for calculating when generating a point with " 2 points-symmetry " line algorithm at every turn, is that mid point scans a level or vertical line with current point, symmetrical scanning, and swash width is to sweep 0 to retouch half of line length L; Line cap drafting module 510 is used for the Plotted line cap.
Wherein, live width increment list generation module 502 comes the molded breadth increment according to the intermediate value of slope, and when generating the live width increment list, carries out the live width incremental computations one time every 4 pixels.
In addition, its corresponding SLOPE value is searched in the slope interval that length of scanning line determination module 506 is determined according to the interval determination module of slope in the live width increment list, then, according to 1/4th value of live width and the SLOPE value of searching, from the live width increment list, search the live width increment of correspondence.Setting-out module 508 begins setting-out simultaneously from two of sweep trace, once draws two points, through L/2 the whole piece sweep trace that draws.Line cap drafting module 510 when the Plotted line cap, when the absolute value of thick line slope less than 1 the time, generate the left line cap and the right line cap of thick line, when the absolute value of thick line slope greater than 1 the time, generate the reach the standard grade cap and the cap that rolls off the production line of thick line.
A plurality of details of describing among the above method embodiment are equally applicable to this device embodiment, for fear of unnecessary repetition, have omitted being repeated in this description same section.
In addition, Fig. 6 shows the connection design sketch of the line cap of the embodiment of the invention, and wherein, the termination of thick line needs smooth connection when generating broken line and polygon; Fig. 7 shows the design sketch when using the present invention to draw thick line generation polygon, can satisfy the effect requirements of geographical graphic describing in actual applications.
Following table 3 show the present invention with prior art in the comparison of drawing aspect long thick line generation operation time.Earlier to produce at random 100, article 000, average length is that 500 pixels, width are that the thick line of 10 pixels is drawn, use GDI function MoveToEx, the LineTo of Microsoft to draw the time of using and be 16090-70=16020ms, use the scanning Beam Method of tabling look-up of the present invention to draw the time of using and be 4150-70=4080ms, speed-up ratio is 16020/4080=3.9265.Write down the algorithm speed test result in the table 3, surveyed altogether 10 times.Test environment is Pentium 4, x86 Family 6 Model 8 Stepping 3, GenuineIntel, Win2000.
Table 3
Measure number of times 1 2 3 4 5 6 7 8 9 10 On average
Produce random number 70 70 70 70 70 70 70 70 70 70 70
The Lineto of Microsoft 15120 16530 16420 16930 16530 16020 15920 15630 16120 15720 16090
Look-up table 428 4170 4090 4070 4150 4150 4130 4180 4140 4150 4150
To be the present invention generate comparison aspect operation time with prior art drawing short and thick line polygon with table 4.Draw the general employed thick line section of geographical figure live width usually less than 10 pixels, and because the display screen of portable mobile unit is little, be no more than 480 * 640 pixels, again because will approach graph outline, therefore all be relatively shorter thick broken line, so the little short broken line great ratio in the thick line of map is drawn of width.The pentagon that table 4 has write down different live widths generates the result who compares test, and pentagon is repeated to generate 10000 times, and the average length of side of pentagon is about 60 pixels, and each numerical value in the table all is to measure to be averaged the result 10 times.Test environment is Pentium 4, x86 Family 6 Model 8 Stepping3, Genuine Intel, Win2000.
Table 4
The live width pixel count 3 5 7 10 15 20
The GDI of Microsoft 2880 2979.4 3100.6 3118.6 3372 3257.9
Look-up table 156 184.5 243.5 386.3 517.1 757.2
Speed-up ratio 17.9487 16.1485 12.7335 8.0730 6.5210 4.3026
Fig. 8 shows the defective of line cap discharge drawing method of the present invention.The online cap of this method junction can produce rough burr because of the thick line line width is different, and effect is the poorest when horizontal line and 45 degree lines are crossing, and Fig. 8 has represented effect in this case.Because the live width that actual geographical graphic describing uses in using on embedded device generally can not surpass 15 pixels, therefore can accept.
Like this,, realized the quick generation of thick line, thereby improved the efficient of graphics system by the present invention.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. a thick line generation method is characterized in that, comprising:
Step 1 generates the live width increment list in advance, wherein, comprises pre-regularly four the interval corresponding live width increments of slope of live width in the described width increment list;
Step 2 is relatively determined the slope interval of thick line by rapid traverse according to the coordinate figure of thick line end points;
Step 3 according to the slope interval and the live width that obtain, is searched corresponding live width increment in described width increment list in described step 2, live width and the addition of live width increment are obtained length of scanning line L;
Step 4 when calculating point of generation with " 2 points-symmetry " line algorithm, is that mid point scans a level or vertical line with current point at every turn, symmetrical scanning, and swash width is half of described length of scanning line L; And
Step 5, the Plotted line cap.
2. thick line generation method according to claim 1 is characterized in that, in described step 1, calculates described width increment according to the intermediate value of slope.
3. thick line generation method according to claim 2 is characterized in that, calculates described width increment according to the equal error intermediate value, wherein, and the slope value of described equal error intermediate value during for the interval middle of the slope of obtaining by slope value.
4. thick line generation method according to claim 2 is characterized in that, calculates described width increment according to the equiprobability intermediate value, wherein, and the slope value of described equiprobability intermediate value during for the interval middle of the slope of obtaining by isogonism.
5. thick line generation method according to claim 1 is characterized in that, in described step 1, when generating described live width increment list, carries out the live width incremental computations one time every 4 pixels.
6. according to each described thick line generation method in the claim 1 to 5, it is characterized in that, in described live width increment list, described four slope intervals are: (0,1/4), (1/4,1/2), (1/2,3/4), (3/4,1), and further comprise in the described live width increment list and the interval corresponding SLOPE value of described four slopes.
7. thick line generation method according to claim 6, it is characterized in that, in described step 3, in described live width increment list, search its corresponding SLOPE value according to the described slope interval of determining, then, according to 1/4th value of described live width and the described SLOPE value of searching, from described live width increment list, search the live width increment of correspondence.
8. thick line generation method according to claim 1 is characterized in that, in described step 4, begins setting-out simultaneously from two of sweep trace, once draws two points, through L/2 the whole piece sweep trace that draws.
9. thick line generation method according to claim 1 is characterized in that, in described step 5, when the Plotted line cap, once draws four points.
10. thick line generation method according to claim 1 is characterized in that, in described step 5, when the Plotted line cap, when the absolute value of thick line slope less than 1 the time, generate the left line cap and the right line cap of thick line, when the absolute value of thick line slope greater than 1 the time, generate the reach the standard grade cap and the cap that rolls off the production line of thick line.
11. a thick line generating apparatus is characterized in that, comprising:
Live width increment list generation module is used to generate the live width increment list, wherein, comprises pre-regularly four the interval corresponding live width increments of slope of live width in the described width increment list; The interval determination module of slope is used for relatively determining by rapid traverse according to the coordinate figure of thick line end points the slope interval of thick line;
Length of scanning line determination module is used for searching corresponding live width increment according to definite slope interval and the live width of the interval determination module of described slope in described width increment list, and live width and the addition of live width increment are obtained length of scanning line L;
The setting-out module is used for calculating when generating a point with " 2 points-symmetry " line algorithm at every turn, is that mid point scans a level or vertical line with current point, symmetrical scanning, and swash width is half of described length of scanning line L; And
Line cap drafting module is used for the Plotted line cap.
12. thick line generating apparatus according to claim 11, it is characterized in that, described live width increment list generation module calculates described width increment according to the intermediate value of slope, and when generating described live width increment list, carries out the live width incremental computations one time every 4 pixels.
13. thick line generating apparatus according to claim 11, it is characterized in that, its corresponding SLOPE value is searched in the described slope interval that described length of scanning line determination module is determined according to the interval determination module of described slope in described live width increment list, then, according to 1/4th value of described live width and the described SLOPE value of searching, from described live width increment list, search the live width increment of correspondence.
14. thick line generating apparatus according to claim 11 is characterized in that, described setting-out module begins setting-out simultaneously from two of sweep trace, once draws two points, through L/2 the whole piece sweep trace that draws; Described line cap drafting module when the Plotted line cap, when the absolute value of thick line slope less than 1 the time, generate the left line cap and the right line cap of thick line, when the absolute value of thick line slope greater than 1 the time, generate the reach the standard grade cap and the cap that rolls off the production line of thick line.
CN2007101380525A 2007-08-02 2007-08-02 Method and device for creating thick line Active CN101093584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101380525A CN101093584B (en) 2007-08-02 2007-08-02 Method and device for creating thick line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101380525A CN101093584B (en) 2007-08-02 2007-08-02 Method and device for creating thick line

Publications (2)

Publication Number Publication Date
CN101093584A true CN101093584A (en) 2007-12-26
CN101093584B CN101093584B (en) 2010-06-16

Family

ID=38991824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101380525A Active CN101093584B (en) 2007-08-02 2007-08-02 Method and device for creating thick line

Country Status (1)

Country Link
CN (1) CN101093584B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484481A (en) * 2014-12-26 2015-04-01 携程计算机技术(上海)有限公司 Data matching method, device and system of ticket order
CN112710256A (en) * 2020-12-19 2021-04-27 重庆大学 Electromechanical performance test system and method for scanning grating micro-mirror
CN113470143A (en) * 2021-06-29 2021-10-01 阿波罗智能技术(北京)有限公司 Electronic map drawing method, device and equipment and automatic driving vehicle

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1504962A (en) * 2002-11-29 2004-06-16 矽统科技股份有限公司 Straight line painting apparatus and method thereof
FR2869146B1 (en) * 2004-04-20 2006-09-15 Thales Sa METHOD FOR GRAPHIC GENERATION OF ROUND ENDED LINES

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484481A (en) * 2014-12-26 2015-04-01 携程计算机技术(上海)有限公司 Data matching method, device and system of ticket order
CN104484481B (en) * 2014-12-26 2018-01-02 上海携程商务有限公司 Data matching method, the apparatus and system of ticketing service order
CN112710256A (en) * 2020-12-19 2021-04-27 重庆大学 Electromechanical performance test system and method for scanning grating micro-mirror
CN113470143A (en) * 2021-06-29 2021-10-01 阿波罗智能技术(北京)有限公司 Electronic map drawing method, device and equipment and automatic driving vehicle
CN113470143B (en) * 2021-06-29 2024-04-05 阿波罗智能技术(北京)有限公司 Electronic map drawing method, device, equipment and automatic driving vehicle

Also Published As

Publication number Publication date
CN101093584B (en) 2010-06-16

Similar Documents

Publication Publication Date Title
CN103383682B (en) A kind of Geocoding, position enquiring system and method
Avelar et al. Generating topologically correct schematic maps
KR20140073480A (en) Rendering a text image following a line
CN101093584B (en) Method and device for creating thick line
CN111879300A (en) Method for monitoring collapse erosion development based on three-dimensional laser scanning technology
CN110533739B (en) Map forming method of map grid
CN109710994B (en) Airport obstacle limiting surface overrun analysis method based on digital earth
CN106023317B (en) A kind of weighted Voronoi diagrams drawing generating method for big data test
CN112857315A (en) Steel pipe column verticality measuring method based on three-dimensional laser scanning
CN116756836B (en) Tunnel super-undermining volume calculation method, electronic equipment and storage medium
CN113066176B (en) Map data processing method, device, equipment and storage medium
CN110493853A (en) A kind of sort method of high-speed rail private network base station
CN101408987A (en) Method for generating deuce-symmetrical straight line
CN115170751A (en) Water system section drawing method and device
CN115062557A (en) Method and device for converting section data of one-dimensional hydrodynamic model into terrain data of two-dimensional hydrodynamic model
CN103810450B (en) Method and system for accurate area positioning of radio frequency identification
CN113066179B (en) Map data processing method, device, equipment and storage medium
CN110619675B (en) OsgEarth-based surface vector data loading method
CN111127589B (en) Vector map circular dotted line symbol drawing method considering line width consistency
Doytsher et al. Rubber-sheeting algorithm for cadastral maps
CN113066150A (en) Map data processing method, device, equipment and storage medium
CN111426329A (en) Road generation method and device, computer equipment and storage medium
CN110751657A (en) Image three-dimensional fractal dimension calculation method based on triangular coverage
CN117351152B (en) Roadway rough surface three-dimensional point cloud unfolding method based on coordinate transformation
CN113064954B (en) Map data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20071226

Assignee: SHENZHEN ZTE MICROELECTRONICS TECHNOLOGY CO., LTD.

Assignor: ZTE Corporation

Contract record no.: 2015440020319

Denomination of invention: Method and device for creating thick line

Granted publication date: 20100616

License type: Common License

Record date: 20151123

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model