CN103177463A - Method and device for drawing fillet - Google Patents
Method and device for drawing fillet Download PDFInfo
- Publication number
- CN103177463A CN103177463A CN2011104388864A CN201110438886A CN103177463A CN 103177463 A CN103177463 A CN 103177463A CN 2011104388864 A CN2011104388864 A CN 2011104388864A CN 201110438886 A CN201110438886 A CN 201110438886A CN 103177463 A CN103177463 A CN 103177463A
- Authority
- CN
- China
- Prior art keywords
- fillet
- transparency
- palace lattice
- lines
- value
- 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
Links
Images
Abstract
The invention discloses a method and a device for drawing a fillet and belongs to the computer field. The method for drawing the fillet comprises extracting sudokus of a corner at a boundary of two lines of the fillet to be drew; separating the sudokus of the corner into a plurality of inclined lines and obtaining preset inclined lines in a certain sequence according to the number of the sudokus; and performing transparency processing on the preset inclined lines and drawing out the fillet according to a preset value of the transparency of the sudokus. The fillet is drew by switching a common fillet into a rectangle sudokus, separating the rectangle into inclined lines and performing transparency gradual changing and a smooth fillet is obtained by utilizing the sudokus to enable a regular change of the transparency to be performed on the sudokus of the fillet.
Description
Technical field
The present invention relates to computer realm, particularly a kind of method and apparatus of drawing fillet.
Background technology
Along with the widespread use of computing machine, increasing designer utilizes the computer drawing figure.Often be designed into the drafting of fillet in the process of drawing image, that how fillet is drawn is more and more meticulousr, is the focus paid close attention to of people and the problems of being devoted to solve always.
The available technology adopting point is painted method and is drawn fillet, when drawing fillet, at first draw 4 straight flange lines in the direction up and down of a position, the boundary of two adjacent straight flange lines is non-intersect, then get ready at the boundary of two straight flange lines, getting ready in a certain order, is generally that the order according to 12321 is got ready on the central symmetry axis of two straight flange lines.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
The prior art fillet seems sufficiently oily, and obvious sawtooth sense is arranged, and when the radian of fillet was excessive, prior art can not be drawn out, and along with mobile phone screen is more and more meticulousr, serrate fillet has been difficult to satisfy user and designer's aesthetic requirement.
Summary of the invention
In order to solve the problem of fillet sawtooth, draw out round and smooth fillet, the embodiment of the present invention provides a kind of method and apparatus of drawing fillet.Described technical scheme is as follows:
A kind of method of drawing fillet, described method comprises:
Extract the palace lattice of corner at the boundary of two lines of fillet to be drawn;
The palace lattice of described corner are split into some oblique lines, obtain the oblique line of default number according to a definite sequence of palace lattice number;
According to the value of default palace lattice transparency, the oblique line of the described default number of obtaining is carried out transparency process, draw out fillet.
Wherein, described palace lattice with described corner split into some oblique lines, specifically comprise:
Split according to the vertical line direction of the axis of two lines of fillet described the to be drawn palace lattice to described corner, split into some the oblique lines of vertical line direction of axis of two lines of fillet described to be drawn.
Wherein, before described acquiring size according to palace lattice number was preset the oblique line of number, described method also comprised: the default number of obtaining oblique line according to the radian of the fillet of drawing.
Wherein, when the radian of the fillet of described drafting was n, default number was n, and n is natural number.
Wherein, the value of described default palace lattice transparency specifically comprises:
The value of the transparency of palace lattice with the direction of the axis of two lines of fillet described to be drawn axisymmetricly;
The beginning look of every oblique line is with the value of the transparency that finishes look identical, and the value of the transparency of described beginning look larger than the value of the transparency of Neutral colour.
The embodiment of the present invention also provides a kind of device of drawing fillet, and described device comprises:
Extraction module is used for extracting at the boundary of two lines of fillet to be drawn the palace lattice of corner;
Acquisition module, the palace lattice that are used for corner that described extraction module is extracted split into some oblique lines, obtain the oblique line of default number according to a definite sequence of palace lattice number;
Drafting module is used for the value according to default palace lattice transparency, and the oblique line of the default number that described acquisition module is obtained carries out transparency to be processed, and draws out fillet.
Wherein, described acquisition module specifically comprises:
Split cells is used for splitting according to the vertical line direction of the axis of two lines of fillet described the to be drawn palace lattice to described corner, splits into some the oblique lines of vertical line direction of axis of two lines of fillet to be drawn;
Acquiring unit is used for obtaining default bar oblique line according to a definite sequence of palace lattice number.
Wherein, described device also comprises presetting module, is used for the value of default palace lattice transparency, and the value of default palace lattice transparency specifically comprises:
The value of the transparency of palace lattice with the direction of the axis of two lines of fillet described to be drawn axisymmetricly;
The beginning look of every oblique line is with the value of the transparency that finishes look identical, and the value of the transparency of described beginning look larger than the value of the transparency of Neutral colour.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is: be converted to rectangle palace lattice by the fillet with routine, then rectangle split into oblique line, then fillet is drawn out in the gradual change of carrying out transparency.The present invention adopts the mode of palace lattice, and the transparency of the palace lattice at fillet place is carried out a regular variation, has realized level and smooth fillet.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, during the below will describe embodiment, the accompanying drawing of required use is done to introduce simply, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of the drafting fillet that provides in prior art;
Fig. 2 is the schematic diagram of the fillet drawn out in prior art;
Fig. 3 is the method flow diagram of the drafting fillet that provides in the embodiment of the present invention 1;
Fig. 4 is the method flow diagram of the drafting fillet that provides in the embodiment of the present invention 2;
Fig. 5 is the schematic diagram of the palace lattice that extract in the embodiment of the present invention 2;
Fig. 6 is the schematic diagram of the fillet drawn out in the embodiment of the present invention 2;
Fig. 7 is the structural representation of the device of the drafting fillet that provides in the embodiment of the present invention 3.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Referring to Fig. 3, the embodiment of the present invention provides a kind of method of drawing fillet, and described method comprises:
Step 101: the palace lattice that extract corner at the boundary of two lines of fillet to be drawn;
Step 102: the palace lattice of corner are split into some oblique lines, obtain the oblique line of default number according to a definite sequence of palace lattice number;
Step 103: according to the value of default palace lattice transparency, the oblique line of the default number obtained is carried out transparency process, draw out fillet.
The method that the embodiment of the present invention provides is converted to rectangle palace lattice by the fillet with routine, then rectangle is split into oblique line, then fillet is drawn out in the gradual change of carrying out transparency; Adopt the mode of palace lattice, the transparency of the palace lattice at fillet place is carried out a regular variation, realized level and smooth fillet.
Referring to Fig. 4, the embodiment of the present invention provides a kind of method of drawing fillet, and described method comprises:
Step 201: the palace lattice that extract corner at the boundary of two lines of fillet to be drawn;
Wherein, draw fillet in the position of the boundary of two lines of fillet to be drawn, two lines drawing in the embodiment of the present invention can be straight line, also can be curve, and the embodiment of the present invention describes as two straight lines as example take two lines.
Wherein, the palace lattice number that extracts corner is relevant to the radian of fillet to be drawn, the palace lattice number=radian that extracts * radian, and the palace lattice that extract are rectangle.The difference of the fillet radian of drawing, the palace lattice number that extracts is different, in practical application, the fillet radian of drafting is generally odd number, is 5 as the fillet radian, the fillet radian is 3 etc., the embodiment of the present invention describes as 5 as example take the fillet radian drawn, and the fillet radian is 5 o'clock, can extract 5 * 5 palace lattice, if the fillet radian of drawing is, can extract 3 * 3 palace lattice at 3 o'clock.
Step 202: the palace lattice that extract are carried out color filling and split, according to a definite sequence of the palace lattice number that extracts, obtain the oblique line of the default number of palace lattice number;
Particularly, the embodiment of the present invention is not done restriction to the mode of obtaining oblique line, can according to the order from big to small of the palace lattice number that extracts, obtain the oblique line of default number.The size of default number is relevant to the precision of the fillet of drafting, and default number is more, and the precision of the fillet of drawing out is higher, draws cost high; Default number is fewer, and the precision of the fillet of drawing out is lower, draws cost low.In practical application, can preset according to demand concrete number.The default number of the embodiment of the present invention is five, namely according to the order from big to small of the palace lattice number that extracts, obtains palace lattice number and comes five oblique lines of the first five.
For ease of explanation, the embodiment of the present invention marks 5 * 5 palace lattice that extract, and laterally is labeled as 12345, vertically is labeled as ABCDE, and this mark just for technical scheme of the present invention is described, is not the restriction to technical scheme.
According to the vertical line direction of the axis of two lines of fillet to be drawn, 5 * 5 palace lattice are split, 5 * 5 palace lattice are split into some the oblique lines of vertical line direction of axis of two lines of fillet to be drawn, after getting its Middle Palace lattice number and sorting from big to small, come five oblique lines of the first five, as shown in Figure 5, five oblique lines that extract are respectively article one oblique line: C1, D2, E3; Second oblique line B1, C2, D3, E4; Article three, oblique line: A1, B2, C3, D4, E5; Article four, oblique line: A2, B3, C4, D5; Article five, oblique line A3, B4, D5.Article one, the palace lattice number of oblique line and the 5th oblique line is identical, is 3; The palace lattice number of second oblique line and the 4th oblique line is identical, and the palace lattice number that is 4, the three oblique lines is maximum, is 5.
In practical application, when the radian of the fillet of drafting is n, the palace lattice number=n that extracts * n, default number is n, n is natural number.
Step 203: the value of the transparency corresponding according to default palace lattice, the palace lattice in five oblique lines that extract are carried out respectively transparency process, draw out fillet.
Wherein, transparency refers to the transparency of color, in the value of the transparency that default palace lattice are corresponding, every oblique line is all to realize to gradient color (beginning-in meta-end) by one 3, as for the 3rd oblique line, A1 is the beginning look, and C3 is Neutral colour, E5 finishes look with the transparency of beginning look identical for finishing look.In the embodiment of the present invention, the value of default palace lattice transparency is specifically as shown in table 1:
1 | 2 | 3 | 4 | 5 | |
A | 90% | 70% | 25% | 0% | 0% |
B | 100% | 100% | 100% | 45% | 0% |
C | 8% | 40% | 100% | 100% | 25% |
D | 0% | 5% | 40% | 100% | 70% |
E | 0% | 0% | 8% | 100% | 90% |
Table 1
Therefore, when drawing fillet, only need to draw some oblique lines, then its color that begins the palace lattice is carried out the processing of a transparency with the color that finishes the palace lattice, just can obtain a perfect fillet.
The method that the embodiment of the present invention provides is converted to rectangle palace lattice by the fillet with routine, then rectangle is split into oblique line, then fillet is drawn out in the gradual change of carrying out transparency; Adopt the mode of palace lattice, the transparency of the palace lattice at fillet place is carried out a regular variation, realized level and smooth fillet.
Referring to Fig. 7, the embodiment of the present invention provides a kind of device of drawing fillet, and described device comprises extraction module 301, acquisition module 302 and drafting module 303;
In the embodiment of the present invention, two lines of fillet to be drawn can be straight line, also can be curve, and the embodiment of the present invention describes as two straight lines as example take two lines.
The palace lattice number that extraction module extracts corner is relevant to the radian of fillet to be drawn, and radian is larger, and the palace lattice number that extracts is more, and the palace lattice that generally extract are rectangle, the palace lattice number=radian that extracts * radian.In practical application, fillet radian to be drawn is generally odd number, be 5 as the fillet radian, the fillet radian is 3 etc., the embodiment of the present invention describes as 5 as example take the fillet radian drawn, and the fillet radian is 5 o'clock, can extract 5 * 5 palace lattice, if the fillet radian of drawing is, can extract 3 * 3 palace lattice at 3 o'clock.
Wherein, the embodiment of the present invention is not done restriction to the mode of obtaining oblique line, can according to the order from big to small of the palace lattice number that extracts, obtain the oblique line of default number, thereby draw fillet according to these oblique lines.The size of default number is relevant to the precision of the fillet of drafting, and default number is more, and the precision of the fillet of drawing out is higher, draws cost higher; Default number is fewer, and the precision of the fillet of drawing out is lower, draws cost lower.In practical application, can preset according to demand concrete number.
Wherein, acquisition module 302 specifically comprises split cells and acquiring unit,
Split cells is used for splitting according to the vertical line direction of the axis of two lines of fillet the to be drawn palace lattice to corner, splits into some the oblique lines of vertical line direction of axis of two lines of fillet to be drawn;
Acquiring unit is used for obtaining according to a definite sequence of palace lattice number the oblique line of presetting number.
Preferably, acquiring unit can obtain according to the order from big to small of palace lattice number the oblique line of default number.
Wherein, transparency refers to the transparency of color, the oblique line of the default number obtained is carried out transparency process, and can process according to certain rule for the transparency of the oblique line that will preset number, and the rule of this transparency can set in advance.
Further, described device also comprises presetting module, is used for the value of default palace lattice transparency, and the value of default palace lattice transparency specifically comprises:
The value of the transparency of palace lattice with the direction of the axis of two lines of fillet to be drawn axisymmetricly;
The beginning look of every oblique line is with the value of the transparency that finishes look identical, and the value of the transparency of described beginning look larger than the value of the transparency of Neutral colour.
Therefore, the rule of transparency default according to presetting module, the oblique line of the default number that acquisition module is obtained out carries out transparency to be processed, and just can obtain a perfect fillet.
The device that the embodiment of the present invention provides is converted to rectangle palace lattice by the fillet with routine, then rectangle is split into oblique line, then fillet is drawn out in the gradual change of carrying out transparency; Adopt the mode of palace lattice, the transparency of the palace lattice at fillet place is carried out a regular variation, realized level and smooth fillet.
The device that the present embodiment provides specifically can belong to same design with embodiment of the method, and its specific implementation process sees embodiment of the method for details, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the relevant hardware of instruction to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (8)
1. a method of drawing fillet, is characterized in that, described method comprises:
Extract the palace lattice of corner at the boundary of two lines of fillet to be drawn;
The palace lattice of described corner are split into some oblique lines, obtain the oblique line of default number according to a definite sequence of palace lattice number;
According to the value of default palace lattice transparency, the oblique line of the described default number of obtaining is carried out transparency process, draw out fillet.
2. the method for claim 1, is characterized in that, described palace lattice with described corner split into some oblique lines, specifically comprise:
Split according to the vertical line direction of the axis of two lines of fillet described the to be drawn palace lattice to described corner, split into some the oblique lines of vertical line direction of axis of two lines of fillet described to be drawn.
3. the method for claim 1, is characterized in that, before described acquiring size according to palace lattice number was preset the oblique line of number, described method also comprised:
Obtain the default number of oblique line according to the radian of the fillet of drawing.
4. method as claimed in claim 3, is characterized in that, when the radian of the fillet of described drafting was n, default number was n, and described n is natural number.
5. the method for claim 1, is characterized in that, the value of described default palace lattice transparency specifically comprises:
The value of the transparency of palace lattice with the direction of the axis of two lines of fillet described to be drawn axisymmetricly;
The beginning look of every oblique line is with the value of the transparency that finishes look identical, and the value of the transparency of described beginning look larger than the value of the transparency of Neutral colour.
6. a device of drawing fillet, is characterized in that, described device comprises:
Extraction module is used for extracting at the boundary of two lines of fillet to be drawn the palace lattice of corner;
Acquisition module, the palace lattice that are used for corner that described extraction module is extracted split into some oblique lines, obtain the oblique line of default number according to a definite sequence of palace lattice number;
Drafting module is used for the value according to default palace lattice transparency, and the oblique line of the default number that described acquisition module is obtained carries out transparency to be processed, and draws out fillet.
7. device as claimed in claim 6, is characterized in that, described acquisition module specifically comprises:
Split cells is used for splitting according to the vertical line direction of the axis of two lines of fillet described the to be drawn palace lattice to described corner, splits into some the oblique lines of vertical line direction of axis of two lines of fillet to be drawn;
Acquiring unit is used for obtaining according to a definite sequence of palace lattice number the oblique line of presetting number.
8. device as claimed in claim 6, is characterized in that, described device also comprises presetting module, is used for the value of default palace lattice transparency, and the value of default palace lattice transparency specifically comprises:
The value of the transparency of palace lattice with the direction of the axis of two lines of fillet described to be drawn axisymmetricly;
The beginning look of every oblique line is with the value of the transparency that finishes look identical, and the value of the transparency of described beginning look larger than the value of the transparency of Neutral colour.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110438886.4A CN103177463B (en) | 2011-12-23 | 2011-12-23 | A kind of method and apparatus drawing fillet |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110438886.4A CN103177463B (en) | 2011-12-23 | 2011-12-23 | A kind of method and apparatus drawing fillet |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103177463A true CN103177463A (en) | 2013-06-26 |
CN103177463B CN103177463B (en) | 2016-01-20 |
Family
ID=48637291
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110438886.4A Active CN103177463B (en) | 2011-12-23 | 2011-12-23 | A kind of method and apparatus drawing fillet |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103177463B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106875328A (en) * | 2015-12-11 | 2017-06-20 | 北京新媒传信科技有限公司 | Image processing method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4908780A (en) * | 1988-10-14 | 1990-03-13 | Sun Microsystems, Inc. | Anti-aliasing raster operations utilizing sub-pixel crossing information to control pixel shading |
JPH1074076A (en) * | 1996-08-30 | 1998-03-17 | Canon Inc | Document processing method and apparatus therefor as well as memory medium |
WO2006129943A1 (en) * | 2005-06-03 | 2006-12-07 | Polidigm Co., Ltd. | Fast anti-aliasing method |
CN101404021A (en) * | 2008-10-21 | 2009-04-08 | 深圳市金蝶中间件有限公司 | Method for dynamically displaying rounded angle rectangle on web pages and web server |
-
2011
- 2011-12-23 CN CN201110438886.4A patent/CN103177463B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4908780A (en) * | 1988-10-14 | 1990-03-13 | Sun Microsystems, Inc. | Anti-aliasing raster operations utilizing sub-pixel crossing information to control pixel shading |
JPH1074076A (en) * | 1996-08-30 | 1998-03-17 | Canon Inc | Document processing method and apparatus therefor as well as memory medium |
WO2006129943A1 (en) * | 2005-06-03 | 2006-12-07 | Polidigm Co., Ltd. | Fast anti-aliasing method |
CN101404021A (en) * | 2008-10-21 | 2009-04-08 | 深圳市金蝶中间件有限公司 | Method for dynamically displaying rounded angle rectangle on web pages and web server |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106875328A (en) * | 2015-12-11 | 2017-06-20 | 北京新媒传信科技有限公司 | Image processing method and device |
CN106875328B (en) * | 2015-12-11 | 2020-05-12 | 北京新媒传信科技有限公司 | Image processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN103177463B (en) | 2016-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103093228B (en) | A kind of in natural scene image based on the Chinese detection method of connected domain | |
CN101976114B (en) | System and method for realizing information interaction between computer and pen and paper based on camera | |
CN102156865A (en) | Handwritten text line character segmentation method and identification method | |
CN104516867A (en) | Table reordering method and table reordering system | |
CN101770446A (en) | Method and system for identifying form in layout file | |
CN105654022A (en) | Method and device for extracting structured document information | |
CN101908216B (en) | Method and device for realizing vector fonts | |
CN104268615A (en) | Encoding method and decoding method for color two-dimensional code | |
CN102929394B (en) | A kind of Braille input method based on gesture identification | |
CN204602765U (en) | A kind of touch-type glass screen rack for cleaning | |
CN104035676B (en) | A kind of switching method and device of the page | |
CN103177463A (en) | Method and device for drawing fillet | |
CN104281850A (en) | Character area identification method and device | |
CN104915458A (en) | Automatic association method and system during application search by user, and mobile terminal | |
CN109447015A (en) | A kind of method and device handling form Image center selection word | |
CN103198134A (en) | Visual navigation method for academic literature | |
CN106156006A (en) | Tibetan language word component analyzing method, Tibetan collation method and corresponding intrument | |
CN102981767A (en) | HWR (Handwriting Recognition) method and HWR system of single Chinese character | |
CN105893514A (en) | Method and device for displaying data | |
CN102591845A (en) | Method and device for processing overlapping text | |
WO2015100691A1 (en) | Rapid input method convenient to modify for handwriting input device | |
CN202904592U (en) | Multifunctional card reader | |
CN205291584U (en) | Pressure keeping equipment | |
CN103500085A (en) | Picture beautifying scrawling software | |
CN204048647U (en) | A kind of novel Tea Service |
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 |