CN104008558A - Bezier curve rasterization processing method and system - Google Patents

Bezier curve rasterization processing method and system Download PDF

Info

Publication number
CN104008558A
CN104008558A CN201310058020.XA CN201310058020A CN104008558A CN 104008558 A CN104008558 A CN 104008558A CN 201310058020 A CN201310058020 A CN 201310058020A CN 104008558 A CN104008558 A CN 104008558A
Authority
CN
China
Prior art keywords
bezier
fractionation
line segment
split
current
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
CN201310058020.XA
Other languages
Chinese (zh)
Other versions
CN104008558B (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.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner Technology Co Ltd
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 Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN201310058020.XA priority Critical patent/CN104008558B/en
Publication of CN104008558A publication Critical patent/CN104008558A/en
Application granted granted Critical
Publication of CN104008558B publication Critical patent/CN104008558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a Bezier curve rasterization processing method and system. The method includes the following steps: setting a preset condition of a splitting-time minimum number of the Bezier curve; according to the preset condition, calculating a minimum number of splitting times n of a current Bezier curve; and according to a splitting algorithm of a basic Bezier curve, carrying out n times of splitting on the current Bezier curve and finally carrying out linear rasterization processing and storing. Through the method, the minimum number of splitting times n of the current Bezier curve is obtained and n times of splitting are carried out so that a plurality of measurement calculations in the splitting process are prevented. The Bezier curve rasterization processing method and system reduce a large quantity of calculations and improves the splitting speed of the curve so that Bezier curve rasterization processing can be completed simply and rapidly.

Description

Bezier grating processing method and system
Technical field
The present invention relates to computer image processing technology field, relate in particular to a kind of Bezier grating processing method and system.
Background technology
Along with the high speed development of large scale integrated circuit, personal consumption terminal has possessed powerful processing power and has been equipped with sharpness screen, and user interface is dazzled beautiful graphical interfaces till now from original simple function menu.The complicated needed processing power of graphical application is central processing unit (central processor unit, be called for short CPU) unaffordable, this time, 2D Graphics Processing Unit (2-Dimension Graphic Unit, be called for short 2D GPU) and 3D Graphics Processing Unit (3-Dimension Graphic Unit, abbreviation 3D GPU) just produced.
Bezier (B é zier curve), claims again Bezier curve or Bezier surface, is the mathematic curve that is applied to X-Y scheme application program.Bezier rasterization process technology is the important technology in the 2D GPU implementation procedure based on vector graphics algorithm standard rules (OpenVG standard).
Bezier rasterization process technology, is mainly to adopt line approximation, according to the fractionation algorithm of basic Bezier, curve is split, until every the curve splitting out can be approximately straight line.Existing decision method is corresponding each new curve splitting, and all will current curves be measured and be judged, determine whether to carry out next step and split, thereby operand is larger, and speed is slow, realizes cost also high.
Summary of the invention
Based on the problems referred to above, the invention provides a kind of Bezier grating processing method, comprise the steps:
Initialization arranges, and fractionation number of times minimum value pre-conditioned of Bezier is set;
In the time reading in graphic data base each data block, judge that vector line segment corresponding to the current data block reading is straight line or Bezier; If judge, described vector line segment is Bezier, analyzes the coordinate data at summit and the reference mark of Bezier, calculates distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve;
According to described pre-conditioned, the minimum of calculating described current Bezier splits frequency n;
According to the fractionation algorithm of basic Bezier, described current Bezier is carried out to n time and split, calculate many straight line vector line segments and be stored in line segment buffer zone;
After the data block in described graphic data base is all read, the straight line in described line segment buffer zone is carried out to linear grating processing storage.
Therein in an embodiment, pre-conditioned the comprising the steps: of the described fractionation number of times minimum value that Bezier is set
According to the fine and smooth degree requirement of image, parameters V;
Fractionation number of times minimum value pre-conditioned of described Bezier is set: the minimum of Bezier splits frequency n for meeting relational expression n>=(log 2((x+y)/V)+1)/2 minimum value.
Therein in an embodiment, vector line segment corresponding to the current data block reading of described judgement is after straight line or Bezier, also comprises the steps:
If judge, described vector line segment is straight line, directly the described current data block reading is stored in described line segment buffer zone.
In an embodiment, the fractionation algorithm of the basic Bezier of described basis, carries out n time to current Bezier and splits, and comprises the following steps therein:
According to the fractionation algorithm of basic Bezier, in the time that every Bezier is split, all Bezier is split as to 2 new curves, adopt recursive algorithm successively to split, reach end fractured operation n time until split number of times.
In an embodiment, described graphic data base is windows TrueType font database and/or flash graphic data base therein.
Correspondingly, the invention provides a kind of Bezier rasterization process system, comprise initialization module, read module, computing module, fractionation module and memory module, wherein:
Described initialization module, for initialization setting, arranges fractionation number of times minimum value pre-conditioned of Bezier;
Described read module, in the time reading the each data block of graphic data base, judges that vector line segment corresponding to the current data block reading is straight line or Bezier; If judge, described vector line segment is Bezier, analyzes the coordinate data at summit and the reference mark of Bezier, calculates distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve;
Described computing module, for according to described pre-conditioned, calculates the minimum fractionation frequency n of described current Bezier;
Described fractionation module, for according to the fractionation algorithm of basic Bezier, carries out n time to described current Bezier and splits, and calculates many straight line vector line segments and is stored in line segment buffer zone;
Described memory module, for after the data block of described graphic data base is all read, carries out linear grating processing storage to the straight line in described line segment buffer zone.
In an embodiment, described initialization module comprises default submodule therein, wherein:
Described default submodule, for according to the fine and smooth degree requirement of image, parameters V;
Fractionation number of times minimum value pre-conditioned of described Bezier is set: the minimum of Bezier splits frequency n for meeting relational expression n>=(log 2((x+y)/V)+1)/2 minimum value.
In an embodiment, described read module comprises judgement submodule therein, wherein:
Described judgement submodule, if for judging that described vector line segment is straight line, is directly stored in the described current data block reading in described line segment buffer zone.
In an embodiment, described fractionation module comprises fractionation submodule therein, wherein:
Described fractionation submodule, for according to the fractionation algorithm of basic Bezier, in the time that every Bezier is split, all Bezier is split as to 2 new curves, adopt recursive algorithm successively to split, reach end fractured operation n time until split number of times.
Beneficial effect of the present invention: Bezier grating processing method provided by the invention and system, described method is pre-conditioned by setting, read the data block in graphic data base, the minimum that directly calculates current Bezier according to pre-conditioned and related data splits frequency n; Then, directly carry out n curve according to the fractionation algorithm of Bezier and split, in split process, without current curves being measured and being judged, determine whether to carry out next step and split, thereby avoided the repeatedly operation result of measurement in split process; Finally the curve after splitting is carried out to linear grating processing, can complete quickly and easily Bezier rasterization process.The method has reduced a large amount of computings, has promoted curve and has split speed, thereby greatly accelerated the speed of Bezier rasterisation.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of an embodiment of Bezier grating processing method of the present invention;
Fig. 2 is the system architecture schematic diagram of an embodiment of Bezier rasterization process system of the present invention;
Fig. 3 is pre-conditioned in Bezier grating processing method of the present invention and system in Fig. 1 and Fig. 2: the minimum of Bezier splits the satisfied relational expression n>=(log of frequency n 2((x+y)/V)+1)/2 derivation principle figure.
Embodiment
Below in conjunction with Figure of description, the Bezier grating processing method in the embodiment of the present invention and the embodiment of system are described.
Embodiment mono-
The Bezier grating processing method that the embodiment of the present invention provides, comprises the steps:
Initialization arranges, and fractionation number of times minimum value pre-conditioned of Bezier is set;
In the time reading in graphic data base each data block, judge that vector line segment corresponding to the current data block reading is straight line or Bezier; If judge, described vector line segment is Bezier, analyzes the coordinate data at summit and the reference mark of Bezier, calculates distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve;
According to described pre-conditioned, the minimum of calculating described current Bezier splits frequency n;
According to the fractionation algorithm of basic Bezier, described current Bezier is carried out to n time and split, calculate many straight line vector line segments and be stored in line segment buffer zone;
After the data block in described graphic data base is all read, the straight line in described line segment buffer zone is carried out to linear grating processing storage.
Embodiment bis-
The Bezier grating processing method that the embodiment of the present invention provides, as shown in Figure 1, comprises the steps:
S100, initialization setting, arrange fractionation number of times minimum value pre-conditioned of Bezier.
S200, read the data block in graphic data base, judge whether vector line segment corresponding to the current data block reading is Bezier; If vector line segment corresponding to data block reading current is Bezier, skips to step S210; If vector line segment corresponding to data block reading current is not Bei Saier curve, skips to step S220.
If the data block in described graphic data base, with through all running through, skips to step S500.
The all corresponding data block of each image in described image data base, in the time reading in graphic data base each data block, judges according to the mark of each data block vector line segment straight line or the Bezier that described data block is corresponding.
S300, according to described pre-conditioned, calculate described current Bezier minimum split frequency n;
After described current Bezier carries out splitting for n time, the vector line segment obtaining all can be approximately straight line.
The fractionation algorithm of S400, the basic Bezier of basis, carries out n time to described current Bezier and splits, and calculates many straight line vector line segments and is stored in line segment buffer zone.
After completing steps S400, skip to step S200, read the corresponding data block of next figure in described graphic data base.
S500, after the data block in described graphic data base is all read, the straight line in described line segment buffer zone is carried out to linear grating processing storage.
After the corresponding data block of all figures is all read, to being stored in all original straight line in described line segment buffer zone and carrying out linear grating processing through splitting many straight line vector line segments that obtain.
Preferably, as an embodiment, pre-conditioned the comprising the steps: of the described fractionation number of times minimum value that Bezier is set
S110, according to the fine and smooth degree requirement of image, parameters V;
Described V parameter is the threshold value that judgment curves can be approximately straight line, and the value of V is less, and image border is more smooth.
Illustrate: as shown in Figure 3, according to the fractionation algorithm of Bezier, curve { P 0 0, P 0 1, P 0 2split into { P 0 0, P 1 0, P 2 0and { P 2 0, P 1 1, P 0 2, and have following relation:
P 1 0=1/2*P 0 0+1/2*P 0 1
P 1 1=1/2*P 0 1+1/2*P 0 2
P 2 0=1/2*P 1 0+1/2*P 1 1
Constantly repeat above fractured operation, a Bezier can split out the Bezier without several " less ", until every the curve splitting out can be approximately straight line.
The key of above-mentioned fractured operation is how to judge whether current curves can be approximated to be straight line, and conventional decision method is calculation level P 2 0to straight-line segment { P 0 0, P 0 2distance B, in the time that D is less than certain predefined value V, can think segment of curve { P 0 0, P 2 0, P 0 2be equal to straight-line segment { P 0 0, P 0 2, now split.
S120, fractionation number of times minimum value pre-conditioned of described Bezier is set: the minimum of Bezier splits frequency n for meeting relational expression n>=(log 2((x+y)/V)+1)/2 minimum value.
Described relational expression n>=(log 2((x+y)/V)+1)/2 specific algorithm and its derivation as follows:
As shown in Figure 3, triangle P 0 0p 0 1p 0 2with triangle P 1 0p 0 1p 1 1be to have identical angle theta, its contained side length of side becomes the relation of 2:1 mutually, so they are similar triangles.
Straight line P 0 1p 2 0with straight line P 0 0p 0 2joining is P m, because triangle P 0 0p 0 1p 0 2with triangle P 1 0p 0 1p 1 1similar triangles, and P 2 0line segment P 0 1p 1 1mid point, so and P mline segment P 0 0p 0 2mid point.Because the Length Ratio of these two triangle contained sides is 2:1, so P 0 1to P mdistance equal 2 times of P 2 0to P mdistance; P 0 1to line segment { P 0 0, P 0 2distance equal 2 times of P 2 0to line segment { P 0 0, P 0 2distance.Note L0 is P 0 1to P mdistance, H0 is P 0 1to line segment { P 0 0, P 0 2distance, D0 is P 2 0to line segment { P 0 0, P 0 2distance, easily obtain L0>=H0=2*D0.
Segment of curve { P 0 0, P 2 0, P 0 2after once splitting, produce 2 new Bezier section { P 0 0, P 1 0, P 2 0and { P 2 0, P 1 1, P 0 2.Investigate segment of curve { P 0 0, P 1 0, P 2 0, note P nline segment { P 0 0, P 2 0mid point, L1 is P 1 0to P ndistance, H1 is P 1 0to line segment { P 0 0, P 2 0distance, D1 is P jto P ndistance.Because triangle P 0 0p 0 1p mwith triangle P 1 0p 0 1p 2 0that contained side ratio is the similar triangles of 2:1, L1=1/2*(1/2*L0)=1/4*L0.To segment of curve { P 2 0, P 1 1, P 0 2there is an identical conclusion.
After n time splits, as long as V >=Dn splits and just can complete.By analogizing above, Ln>=2*Dn, so as V>=1/2*Ln=1/2 2n* when D0, split and just can complete.
Make x=|P 0 1.x-P m.x|, y=|P 0 1.y-P m.y|, L0 2=x 2+ y 2.Get L=x+y; Due to L>L0>=2*D0, so V>=2 2n-1* L, can ensure V>=1/2 2n* D0 sets up, i.e. V>=1/2 2n-1* (x+y).
Finally, draw and split number of times computing formula: n>=(log 2((x+y)/V)+1)/2.
As long as calculate the minimum n value that meets this formula, just can obtain the fractionation number of times of original Bezier, determine whether carrying out once splitting thereby avoided doing test after each fractionation.
Preferably, as an embodiment, describedly judge that whether vector line segment corresponding to the current data block reading be after Bezier, also comprises the steps:
S210, analyze the summit of Bezier and the coordinate data at reference mark in data block, calculate distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve;
If figure is Bezier, its corresponding coordinate data that has comprised summit and reference mark according to piece, according to the coordinate data at described summit and reference mark, obtains distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve.
S220, directly the described current data block reading is stored in described line segment buffer zone, is back to step S200, read the corresponding data block of next figure in described graphic data base.
If all data blocks in described graphic data base are all read, skip to step S500.
Preferably, as an embodiment, the fractionation algorithm of the basic Bezier of described basis, carries out n time to current Bezier and splits, and comprises the following steps:
The fractionation algorithm of S410, the basic Bezier of basis, in the time that every Bezier is split, is all split as Bezier 2 new curves, adopts recursive algorithm successively to split, and reaches end fractured operation n time until split number of times.
Preferably, as an embodiment, described graphic data base is windows TrueType font database and/or flash graphic data base.
Described graphic data base includes but not limited to windows TrueType font database and flash graphic data base.
Based on same inventive concept, the embodiment of the present invention also provides a kind of Bezier rasterization process system 1, and as shown in Figure 2, comprise initialization module 11, read module 12, computing module 13, split module 14 and memory module 15, wherein:
Described initialization module 11, for initialization setting, arranges fractionation number of times minimum value pre-conditioned of Bezier.
Described read module 12, in the time reading the each data block of graphic data base, judges that vector line segment corresponding to the current data block reading is straight line or Bezier; If judge, described vector line segment is Bezier, analyzes the coordinate data at summit and the reference mark of Bezier, calculates distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve, and is sent to computing module.
The all corresponding data block of each image in described image data base, in the time reading in graphic data base each data block, according to the mark of each data block, judges vector line segment straight line or Bezier that described data block is corresponding.
If figure is Bezier, its corresponding coordinate data that has comprised summit and reference mark according to piece, according to the coordinate data at described summit and reference mark, obtains distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve.
Illustrate, as shown in Figure 3:
The lateral separation on two summits of current Bei Saier curve: x=|P 0 1.x-P m.x|, fore-and-aft distance: y=|P 0 1.y-P m.y|.
Described computing module 13, for according to described pre-conditioned, calculates the minimum fractionation frequency n of described current Bezier.
Described computing module reads the V parameter arranging in described initialization module, and described the read module x and the y value that calculate, splits frequency n according to the minimum of the described current Bezier of pre-conditioned calculating.
Described fractionation module 14, for according to the fractionation algorithm of basic Bezier, carries out n time to described current Bezier and splits, and calculates many straight line vector line segments, and described straight line vector line segment is stored in described memory module line segment buffer zone.
Described memory module 15, for after the data block of described graphic data base is all read, carries out linear grating processing storage to the straight line vector line segment of the storage in described line segment buffer zone.
Preferably, as an embodiment, described initialization module 11 comprises default submodule 111, wherein:
Described default submodule 111, for according to the fine and smooth degree requirement of image, parameters V;
Described V parameter is the threshold value that judgment curves can be approximately straight line.
Illustrate: as shown in Figure 3, according to the fractionation algorithm of Bezier, curve { P 0 0, P 0 1, P 0 2split into { P 0 0, P 1 0, P 2 0and { P 2 0, P 1 1, P 0 2, and have following relation:
P 1 0=1/2*P 0 0+1/2*P 0 1
P 1 1=1/2*P 0 1+1/2*P 0 2
P 2 0=1/2*P 1 0+1/2*P 1 1
Constantly repeat above fractured operation, a Bezier can split out the Bezier without several " less ", until every the curve splitting out can be approximately straight line.
The key of above-mentioned fractured operation is how to judge whether current curves can be approximated to be straight line, and conventional decision method is calculation level P 2 0to straight-line segment { P 0 0, P 0 2distance B, in the time that D is less than certain predefined value V, can think segment of curve { P 0 0, P 2 0, P 0 2be equal to straight-line segment { P 0 0, P 0 2, now split.
Fractionation number of times minimum value pre-conditioned of described Bezier is set: the minimum of Bezier splits frequency n for meeting relational expression n>=(log 2((x+y)/V)+1)/2 minimum value.
Described relational expression n>=(log 2((x+y) V)+1) 2 specific algorithm and its derivation as follows:
As shown in Figure 3, triangle P 0 0p 0 1p 0 2with triangle P 1 0p 0 1p 1 1be to have identical angle theta, its contained side length of side becomes the relation of 2:1 mutually, so they are similar triangles.
Straight line P 0 1p 2 0with straight line P 0 0p 0 2joining is P m, because triangle P 0 0p 0 1p 0 2with triangle P 1 0p 0 1p 1 1similar triangles, and P 2 0line segment P 0 1p 1 1mid point, so and P mline segment P 0 0p 0 2mid point.Because the Length Ratio of these two triangle contained sides is 2:1, so P 0 1to P mdistance equal 2 times of P 2 0to P mdistance; P 0 1to line segment { P 0 0, P 0 2distance equal 2 times of P 2 0to line segment { P 0 0, P 0 2distance.Note L0 is P 0 1to P mdistance, H0 is P 0 1to line segment { P 0 0, P 0 2distance, D0 is P 2 0to line segment { P 0 0, P 0 2distance, easily obtain L0>=H0=2*D0.
Segment of curve { P 0 0, P 2 0, P 0 2after once splitting, produce 2 new Bezier section { P 0 0, P 1 0, P 2 0and { P 2 0, P 1 1, P 0 2.Investigate segment of curve { P 0 0, P 1 0, P 2 0, note P nline segment { P 0 0, P 2 0mid point, L1 is P 1 0to P ndistance, H1 is P 1 0to line segment { P 0 0, P 2 0distance, D1 is P jto P ndistance.Because triangle P 0 0p 0 1p mwith triangle P 1 0p 0 1p 2 0that contained side ratio is the similar triangles of 2:1, L1=1/2*(1/2*L0)=1/4*L0.To segment of curve { P 2 0, P 1 1, P 0 2there is an identical conclusion.
After n time splits, as long as V >=Dn splits and just can complete.By analogizing above, Ln>=2*Dn, so as V>=1/2*Ln=1/2 2n* when D0, split and just can complete.
Make x=|P 0 1.x-P m.x|, y=|P 0 1.y-P m.y|, L0 2=x 2+ y 2.Get L=x+y; Due to L>L0>=2*D0, so V>=2 2n-1* L, can ensure V>=1/2 2n* D0 sets up, i.e. V>=1/2 2n-1* (x+y).
Finally, draw and split number of times computing formula: n>=(log 2((x+y)/V)+1)/2.
As long as calculate the minimum n value that meets this formula, just can obtain the fractionation number of times of original Bezier, determine whether carrying out once splitting thereby avoided doing test after each fractionation.
Preferably, as an embodiment, described read module 12 comprises and judges submodule 121, wherein:
Described judgement submodule 121, for according to the mark of the data block that reads, if judge the described current data block reading accordingly vector line segment be straight line, directly the described current data block reading is stored in described line segment buffer zone.
Preferably, as an embodiment, described fractionation module 14 comprises fractionation submodule 141, wherein:
Described fractionation submodule 141, for according to the fractionation algorithm of basic Bezier, in the time that every Bezier is split, all Bezier is split as to 2 new curves, adopt recursive algorithm successively to split, reach end fractured operation n time until split number of times.
According to the fractionation algorithm of basic Bezier, in the time that every Bezier is split, first former Bezier is split as to 2 new curves, then adopt recursion method, described 2 new curves are carried out to n-1 time and split, finish fractured operation until the fractionation number of times of former Bezier reaches n time.
Preferably, as an embodiment, described graphic data base includes but not limited to windows TrueType font database and flash graphic data base.
Described graphic data base includes but not limited to windows TrueType font database and flash graphic data base.
Bezier grating processing method and system that the embodiment of the present invention provides, wherein, method comprises fractionation number of times minimum value pre-conditioned that Bezier is set, in the time reading in graphic data base each data block, judge that vector line segment corresponding to the current data block reading is straight line or Bezier; If judge, described vector line segment is Bezier, analyzes the coordinate data at summit and the reference mark of Bezier, calculates distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve; According to described pre-conditioned, the minimum of calculating described current Bezier splits frequency n; According to the fractionation algorithm of basic Bezier, described current Bezier is carried out to n time and split, calculate many straight line vector line segments and be stored in line segment buffer zone; After the data block in described graphic data base is all read, the straight line in described line segment buffer zone is carried out to linear grating processing storage.
By said method, the minimum that directly obtains current Bezier splits frequency n, carries out n time and splits, and has avoided the repeatedly operation result of measurement in Bei Saier curve split process.Bezier grating processing method and system that the embodiment of the present invention provides, reduced a large amount of computings, promoted curve and split speed, can complete quickly and easily Bezier rasterization process.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (9)

1. a Bezier grating processing method, is characterized in that, comprises the steps:
Initialization arranges, and fractionation number of times minimum value pre-conditioned of Bezier is set;
In the time reading in graphic data base each data block, judge that vector line segment corresponding to the current data block reading is straight line or Bezier; If judge, described vector line segment is Bezier, analyzes the coordinate data at summit and the reference mark of Bezier, calculates distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve;
According to described pre-conditioned, the minimum of calculating described current Bezier splits frequency n;
According to the fractionation algorithm of basic Bezier, described current Bezier is carried out to n time and split, calculate many straight line vector line segments and be stored in line segment buffer zone;
After the data block in described graphic data base is all read, the straight line in described line segment buffer zone is carried out to linear grating processing storage.
2. Bezier grating processing method according to claim 1, is characterized in that, pre-conditioned the comprising the steps: of the described fractionation number of times minimum value that Bezier is set
According to the fine and smooth degree requirement of image, parameters V;
Fractionation number of times minimum value pre-conditioned of described Bezier is set: the minimum of Bezier splits frequency n for meeting relational expression n>=(log 2((x+y)/V)+1)/2 minimum value.
3. Bezier grating processing method according to claim 1, is characterized in that, vector line segment corresponding to the current data block reading of described judgement is after straight line or Bezier, also comprises the steps:
If judge, described vector line segment is straight line, directly the described current data block reading is stored in described line segment buffer zone.
4. Bezier grating processing method according to claim 1, is characterized in that, the fractionation algorithm of the basic Bezier of described basis carries out n time to current Bezier and splits, and comprises the following steps:
According to the fractionation algorithm of basic Bezier, in the time that every Bezier is split, all Bezier is split as to 2 new curves, adopt recursive algorithm successively to split, reach end fractured operation n time until split number of times.
5. Bezier grating processing method according to claim 1, is characterized in that,
Described graphic data base is windows TrueType font database and/or flash graphic data base.
6. a Bezier rasterization process system, is characterized in that, comprises initialization module, read module, computing module, fractionation module and memory module, wherein:
Described initialization module, for initialization setting, arranges fractionation number of times minimum value pre-conditioned of Bezier;
Described read module, in the time reading the each data block of graphic data base, judges that vector line segment corresponding to the current data block reading is straight line or Bezier; If judge, described vector line segment is Bezier, analyzes the coordinate data at summit and the reference mark of Bezier, calculates distance x and the y value of the vertical and horizontal on two summits of current Bei Saier curve;
Described computing module, for according to described pre-conditioned, calculates the minimum fractionation frequency n of described current Bezier;
Described fractionation module, for according to the fractionation algorithm of basic Bezier, carries out n time to described current Bezier and splits, and calculates many straight line vector line segments and is stored in line segment buffer zone;
Described memory module, for after the data block of described graphic data base is all read, carries out linear grating processing storage to the straight line in described line segment buffer zone.
7. Bezier rasterization process system according to claim 6, is characterized in that, described initialization module comprises default submodule, wherein:
Described default submodule, for according to the fine and smooth degree requirement of image, parameters V;
Fractionation number of times minimum value pre-conditioned of described Bezier is set: the minimum of Bezier splits frequency n for meeting relational expression n>=(log 2((x+y)/V)+1)/2 minimum value.
8. Bezier rasterization process system according to claim 6, is characterized in that, described read module comprises judgement submodule, wherein:
Described judgement submodule, if for judging that described vector line segment is straight line, is directly stored in the described current data block reading in described line segment buffer zone.
9. Bezier rasterization process system according to claim 6, is characterized in that, described fractionation module comprises fractionation submodule, wherein:
Described fractionation submodule, for according to the fractionation algorithm of basic Bezier, in the time that every Bezier is split, all Bezier is split as to 2 new curves, adopt recursive algorithm successively to split, reach end fractured operation n time until split number of times.
CN201310058020.XA 2013-02-25 2013-02-25 Bezier curve rasterization processing method and system Active CN104008558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310058020.XA CN104008558B (en) 2013-02-25 2013-02-25 Bezier curve rasterization processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310058020.XA CN104008558B (en) 2013-02-25 2013-02-25 Bezier curve rasterization processing method and system

Publications (2)

Publication Number Publication Date
CN104008558A true CN104008558A (en) 2014-08-27
CN104008558B CN104008558B (en) 2017-02-08

Family

ID=51369198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310058020.XA Active CN104008558B (en) 2013-02-25 2013-02-25 Bezier curve rasterization processing method and system

Country Status (1)

Country Link
CN (1) CN104008558B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107369191A (en) * 2017-08-15 2017-11-21 国网湖南省电力公司 Power grid meteorological disaster prediction color spot figure modification method, system and device
CN109145857A (en) * 2018-09-04 2019-01-04 深圳清沣溪科技有限公司 A method of extracting curve data from curvilinear figure
CN110347357A (en) * 2019-07-15 2019-10-18 北大方正集团有限公司 Print processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050007369A1 (en) * 2003-07-07 2005-01-13 Jiangen Cao Graphic engine for approximating a quadratic Bezier curve in a resource-constrained device
CN101071508A (en) * 2006-05-11 2007-11-14 株式会社东芝 Image processing apparatus, image processing method, and image processing program
CN102099832A (en) * 2008-07-18 2011-06-15 微软公司 Gpu bezier path rasterization
CN102567945A (en) * 2010-12-21 2012-07-11 北大方正集团有限公司 Method and device for rasterization treatment of page digital image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050007369A1 (en) * 2003-07-07 2005-01-13 Jiangen Cao Graphic engine for approximating a quadratic Bezier curve in a resource-constrained device
CN101071508A (en) * 2006-05-11 2007-11-14 株式会社东芝 Image processing apparatus, image processing method, and image processing program
CN102099832A (en) * 2008-07-18 2011-06-15 微软公司 Gpu bezier path rasterization
CN102567945A (en) * 2010-12-21 2012-07-11 北大方正集团有限公司 Method and device for rasterization treatment of page digital image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
樊松: "TrueType字体自动达标机软件设计", 《辽宁科技大学学报》 *
洪波: "移动Flash渲染关键技术的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107369191A (en) * 2017-08-15 2017-11-21 国网湖南省电力公司 Power grid meteorological disaster prediction color spot figure modification method, system and device
CN107369191B (en) * 2017-08-15 2021-01-15 国网湖南省电力有限公司 Method, system and device for correcting power grid meteorological disaster prediction color spot pattern
CN109145857A (en) * 2018-09-04 2019-01-04 深圳清沣溪科技有限公司 A method of extracting curve data from curvilinear figure
CN109145857B (en) * 2018-09-04 2024-02-09 深圳十沣科技有限公司 Method for extracting curve data from curve graph
CN110347357A (en) * 2019-07-15 2019-10-18 北大方正集团有限公司 Print processing method and device

Also Published As

Publication number Publication date
CN104008558B (en) 2017-02-08

Similar Documents

Publication Publication Date Title
CN108053028B (en) Data fixed-point processing method and device, electronic equipment and computer storage medium
CN103164865B (en) A kind of method and apparatus that handwriting input is beautified
US10176627B2 (en) Tree-based graphics primitive rendering
CN103177709A (en) Method and device for displaying characters
CN101211462A (en) Vector graph acceleration method and multimedia player
CN112329096B (en) Three-dimensional roadway model generation method and device and electronic equipment
TWI769138B (en) Graphics processing method, pipeline circuit and computer program
CN111260750B (en) Processing method and device for openFL drawing vector graphics and electronic equipment
CN104008558A (en) Bezier curve rasterization processing method and system
CN113012259B (en) Method for filling concave polygon based on triangulation algorithm
CN111091620A (en) Map dynamic road network processing method and system based on graphics and computer equipment
CN114782582A (en) Method for drawing curve in graph and related equipment
CN110147139B (en) Computer execution method, clock data processing system and computer readable storage medium
CN111091487B (en) TLM microstructure for GPU hardware line primitive raster scanning algorithm
CN115423919B (en) Image rendering method, device, equipment and storage medium
CN103310409A (en) Quick triangle partitioning method of Tile-based rendering architecture central processing unit (CPU)
KR101646945B1 (en) Apparatus, method and computer program for generating mesh for vector graphics based on graphic processing unit
CN111325810A (en) Color matching method and device and electronic equipment
CN115249303A (en) Layout drawing method, device, equipment and storage medium based on drawing segmentation
CN104008560A (en) Image processing lsi and image processing program
US10593111B2 (en) Method and apparatus for performing high throughput tessellation
KR20130101332A (en) Conversion system and method for 3d object represented by triangle mesh to 3d object represented by dosurface
JP5083551B2 (en) Data processing apparatus, outline data generation apparatus, data processing program, outline data generation program
JP2011210159A5 (en) Image processing method, image processing apparatus, and program
JP2007140976A (en) Cross section display program and cross section display device

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