CN100555333C - The method for drafting of figure and device - Google Patents

The method for drafting of figure and device Download PDF

Info

Publication number
CN100555333C
CN100555333C CNB2007100327615A CN200710032761A CN100555333C CN 100555333 C CN100555333 C CN 100555333C CN B2007100327615 A CNB2007100327615 A CN B2007100327615A CN 200710032761 A CN200710032761 A CN 200710032761A CN 100555333 C CN100555333 C CN 100555333C
Authority
CN
China
Prior art keywords
paintbrush
value
pen
index number
new
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.)
Expired - Fee Related
Application number
CNB2007100327615A
Other languages
Chinese (zh)
Other versions
CN101216946A (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.)
Vtron Technologies Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CNB2007100327615A priority Critical patent/CN100555333C/en
Publication of CN101216946A publication Critical patent/CN101216946A/en
Application granted granted Critical
Publication of CN100555333C publication Critical patent/CN100555333C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Position Input By Displaying (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of method for drafting and device of figure, it has the paintbrush of different paintbrush width, different paintbrush transparence values by employing, use the sampled point on the identical curve type connection paintbrush person's handwriting path, and the pairing transparency height of the paintbrush of paintbrush wider width, thereby the curves overlapped that the different paintbrush of use is drawn together, the module of boundary gelatinization of paintbrush track of the drafting after overlapping, thereby reach visual smooth effect.

Description

The method for drafting of figure and device
Technical field
The present invention relates to a kind of in computing machine the method for drafting and the device of figure.
Background technology
Universal day by day along with computer utility, computer drawing technology is also more prevalent, relate to the fine arts, design, education, field such as military affairs and meeting, generally, the computer drawing image is by identification paintbrush (mouse) some points mobile the time, these points are continuous in proper order according to the paintbrush track by straight-line segment, obtain a paintbrush broken line, under the abundant situation of sampling spot, this broken line promptly can be expressed the path of paintbrush roughly, still, because the grating characteristic of display device and the rounded coordinate system of bringing therefrom, the paintbrush track ubiquity sawtooth of drawing out, the problem of losing shape causes written handwriting unsmooth.
Summary of the invention
The object of the present invention is to provide a kind of method for drafting and device thereof of figure, to realize level and smooth written handwriting.
For achieving the above object, the present invention by the following technical solutions:
A kind of method for drafting of figure comprises step:
Sampled point on the identification paintbrush person's handwriting path;
Set current paintbrush index number, use wide, current paintbrush transparence value of current paintbrush pen and predetermined curve type to connect described sampled point, the pairing transparency height of the paintbrush that wherein said paintbrush pen is roomy;
Described current paintbrush index number is added 1 income value as new paintbrush index number, the value of wide the adding of described current paintbrush pen/deduct paintbrush step-length gained is wide as new paintbrush pen, described current paintbrush transparence value is deducted/adds the value of paintbrush transparence value step-length gained as new paintbrush transparence value, when described new paintbrush index number is less than or equal to predetermined paintbrush number, use described new wide, new paintbrush transparence value and the described predetermined curve type of paintbrush pen to connect described sampled point, the curves overlapped that the different paintbrush of use is drawn together.
A kind of drawing apparatus of figure comprises:
The sampled point collection module is used to collect the sampled point on the paintbrush person's handwriting path;
Paintbrush index number determination module is used to judge whether current paintbrush index number is less than or equal to predetermined paintbrush number;
Paintbrush person's handwriting drafting module, be used for when the judged result of described paintbrush index number determination module when being, the paintbrush pen that uses current paintbrush to have is wide, paintbrush transparence value and predetermined curve type connect described sampled point, the curves overlapped that the different paintbrush of use is drawn together, wherein, the pairing transparency height of the paintbrush that described paintbrush pen is roomy;
The paintbrush update module, the value that is used for wide the adding of paintbrush pen that current paintbrush is had/deduct paintbrush step-length gained is wide as new paintbrush pen, the paintbrush transparence value that current paintbrush had is deducted/adds the value of paintbrush transparence value step-length gained as new paintbrush transparence value, the paintbrush index number is added 1 back income value as new paintbrush index number, and will this new paintbrush index number transfer to described paintbrush index number determination module and judge.
Method for drafting and device according to figure of the present invention, its paintbrush that has different paintbrush width, different paintbrush transparence values by employing uses identical curve type to connect sampled point on the paintbrush person's handwriting path, because the width and the transparence value difference of the paintbrush during each the drafting, and the curve type that is adopted is identical, thereby the curves overlapped that the different paintbrush of use is drawn together, and the module of boundary gelatinization of the curve after overlapping is to reach level and smooth writing effect.
Description of drawings
Fig. 1 is the schematic flow sheet of embodiment one of the method for drafting of figure of the present invention;
Fig. 2 is the schematic flow sheet of embodiment two of the method for drafting of figure of the present invention;
Fig. 3 is the drawing apparatus embodiment synoptic diagram of figure of the present invention.
Embodiment
The method for drafting of figure of the present invention and device are in order to realize the written handwriting of smeared out boundary, to obtain level and smooth writing effect.
The method for drafting of figure of the present invention may further comprise the steps:
Collect the sampled point on the paintbrush person's handwriting path;
Set current paintbrush index number, use the sampled point on wide, current paintbrush transparence value of current paintbrush pen and the predetermined curve type connection paintbrush person's handwriting path;
Described current paintbrush index number is added 1 income value as new paintbrush index number, wide and the paintbrush transparence value of conversion paintbrush pen, obtain the wide and new paintbrush transparence value of new paintbrush pen, when described new paintbrush index number is less than or equal to predetermined paintbrush number, use described new wide, new paintbrush transparence value and the described predetermined curve type of paintbrush pen to connect described sampled point, wherein, the pairing paintbrush transparence value of the paintbrush that described paintbrush pen is roomy is little, the transparency height of the curve of being drawn.
Method for drafting according to figure of the present invention, after using the sampled point on the wide and current paintbrush transparence value connection of the current paintbrush pen paintbrush person's handwriting path, wide and paintbrush transparence value carries out conversion to the paintbrush pen of current paintbrush, and the new paintbrush pen after the use conversion is wide and the paintbrush transparence value connects described sampled point, thereby the pen of the paintbrush that is adopted during owing to each the drafting is wide and transparence value is different, and the transparence value of the wide bigger pairing paintbrush of paintbrush of paintbrush pen is low, the curve transparency height of drawing out, the feasible image of drawing out presents fuzzy boundary effect, thus make the figure drawing out level and smooth.
Wherein, above-mentioned paintbrush transparence value is more than or equal to 0 or smaller or equal to 255, when the paintbrush transparence value is 0, the transparency of the figure of drawing out is the highest, when the paintbrush transparence value was 255, the transparency of the figure of drawing out was minimum, promptly was equivalent to opaque.
Wherein, the described paintbrush pen of conversion method wide and the paintbrush transparence value can be: add that the value of paintbrush step-length gained is wide as described new paintbrush pen with described current paintbrush pen is wide, the value that described current paintbrush transparence value is deducted paintbrush transparence value step-length gained is as described new paintbrush transparence value.According to this paintbrush transform method, be to use earlier wide thin, the transparence value of pen higher (color is darker when making graphing, transparency is lower) predetermined curve connect employing point on the paintbrush person's handwriting path, use the wide broad of pen then, transparence value is lower (is that color is more shallow, transparency is higher) predetermined curve connect described sampled point, thereby the curves overlapped of being drawn before and after making, and because the roomy pairing transparency height of paintbrush of paintbrush pen, thereby make the graphic plotting curve after overlapping present fuzzy boundary effect, make curve plotting level and smooth.
Wherein, the described paintbrush pen of described variation method wide and the paintbrush transparence value can also be: a described current paintbrush reductions is gone the value of paintbrush step-length gained wide as described new paintbrush pen, the value that described current paintbrush transparence value is added paintbrush transparence value step-length gained is as described new paintbrush transparence value.In this case, when using method graphing of the present invention, elder generation uses the wide broad of pen, transparence value is lower (is that color is more shallow, transparency is higher) the predetermined curve type connect described sampled point, re-use the wide predetermined curve thin, that transparence value is lower (be color is dark, transparency lower) of pen and connect described sampled point, thereby the curves overlapped of being drawn before and after making, and because the roomy pairing transparency height of paintbrush of paintbrush pen, make the curve after overlapping present fuzzy boundary effect, make curve plotting level and smooth.
Wherein, when using the method for drafting graphing of figure of the present invention, can use any curve type to draw, described predetermined curve type can be any curve type, such as straight line, Bezier, SPL or the like.
Wherein, described predetermined paintbrush number can be for being greater than or equal to 2 arbitrary value, and be preferably 4, to obtain preferable drafting effect and can guarantee the speed of graphic plotting again.
Described paintbrush step-length and paintbrush transparence value step-length can freely be set as required, in employed statistical unit is under the situation of pixel, described paintbrush step-length can be 1 pixel, thereby it is too far away that smeared out boundary can not depart from the curved path of initial drawing in the person's handwriting of drawing out, both made the curve smoothing of being drawn, also the aesthetic property of influence curve not; Described paintbrush transparence value step-length also can freely be set according to user's needs, and be preferably 255 values divided by predetermined paintbrush number gained, thereby make the transparence value of the curve drawing out reach level and smooth transition effect, increase the aesthetic property of institute's graphing.
Embodiment one:
As shown in Figure 1, be the schematic flow sheet of embodiment one of the method for drafting of figure of the present invention, in the present embodiment, the method for drafting of figure of the present invention comprises step:
Step S101: the position coordinates of collecting the sampled point on paintbrush (mouse) the person's handwriting path, enter step S102, in paintbrush (mouse) drawing process, because it not is to write veritably that paintbrush (mouse) moves, therefore, can only in the paintbrush moving process, be identified in the sampled point on the paintbrush path, discern the position coordinates of these sampled points, and draw out the paintbrush track according to the position coordinates of these sampled points;
Step S102: set current paintbrush index number, and judge whether current paintbrush index number is less than or equal to predetermined paintbrush number, if, enter step S103, if not, then return step S101, wherein, the initial number of this index number can be 1;
Step S103: by the paintbrush pen of current paintbrush wide and paintbrush transparence value, use the predetermined curve type to connect described sampled point, enter step S104;
Step S104: the wide paintbrush step-length income value that adds of current paintbrush pen is wide as new paintbrush pen, current paintbrush transparence value is deducted paintbrush transparence value step-length income value as new paintbrush transparence value, and current index number added 1 income value as a new index number, enter step S102.
Method for drafting according to the invention described above figure, by having after a kind of paintbrush pen paintbrush wide and the paintbrush transparence value connects described sampled point, also the wide and transparence value of pen to paintbrush changes, and by the pen of the paintbrush after changing wide and paintbrush transparence value uses identical curve type to draw again, and the pen of employed paintbrush is wide and transparence value different when drawing at every turn, and the pairing transparence value of the wide bigger paintbrush of paintbrush pen is low, the transparency height of the curve of being drawn, repeatedly the curve of Hui Zhiing carries out overlapping, thereby the paintbrush track obscurity boundary of drawing out makes the paintbrush track present level and smooth writing effect.
Wherein, described predetermined curve type can be any curve type, such as straight line, Bezier, SPL or the like.
Among the described step S102, should predetermined paintbrush number can be for being greater than or equal to 2 arbitrary value, and be preferably 4, draw poor effect to prevent the paintbrush number more after a little while, and the paintbrush number speed of graphing is slower more for a long time, to obtain preferable drafting effect and can guarantee the speed of graphic plotting again.
Among the described step S103, when the paintbrush index number is initial number 1, wide and the current paintbrush transparence value of pairing current paintbrush pen can be wide radix value of pen and transparence value radix value, and wide radix value of this pen and transparence value radix value can freely be defined by the user, for example, for transparence value radix value, the user can be set to 255, make the paintbrush transparency minimum, be that initial paintbrush person's handwriting is opaque fully, perhaps this transparence value radix value is set to greater than 0 certain value less than 255, and promptly initial paintbrush person's handwriting has certain transparency.
Among the described step S104, described paintbrush step-length and paintbrush transparence value step-length can freely be set as required, in employed linear module is under the situation of pixel, described paintbrush step-length can be 1 pixel, thereby it is too far away that smeared out boundary can not depart from the curved path of initial drawing in the person's handwriting of drawing out, both can make the curve smoothing of being drawn, also the aesthetic property of influence curve not; Described paintbrush transparence value step-length also can freely be set according to user's needs, and be preferably 255 values divided by predetermined paintbrush number gained, thereby the transparence value of the curve drawing out can be distributed by step, reach level and smooth transition effect, increase the aesthetic property of institute's graphing.
Embodiment two:
As shown in Figure 2, be the schematic flow sheet of embodiment two of the method for drafting of figure of the present invention, in the present embodiment, the method for drafting of figure of the present invention comprises step:
Step S201: collect the position coordinates of the sampled point on paintbrush (mouse) the person's handwriting path, enter step S202;
Step S202: set but preceding paintbrush index number, and judge whether current paintbrush index number is less than or equal to predetermined paintbrush number, if, enter step S203, if not, then return step S201, wherein, the initial number of this index number can be 1;
Step S203: use wide, the current paintbrush transparence value of paintbrush pen of current paintbrush, use predetermined curve type to connect described sampled point, enter step S204;
Step S204: go paintbrush step-length income value wide the reductions of current paintbrush as new paintbrush pen, current paintbrush transparence value is added that paintbrush transparence value step-length income value is as new paintbrush transparence value, and current paintbrush index number added 1 income value as new paintbrush index number, enter step S202.
By as seen above-mentioned, in the present embodiment, be with the different of embodiment one, in step S204, when and paintbrush transparence value wide to the paintbrush pen of paintbrush change, be that wide execution reduces operation to the paintbrush pen, the paintbrush transparence value is carried out the operation that increases, thereby be that the drafting transparence value is low earlier when drawing person's handwriting, the paintbrush person's handwriting of paintbrush broad, be the higher paintbrush person's handwriting of transparency, it is higher to draw transparence value again, the paintbrush person's handwriting that paintbrush is thinner, the paintbrush person's handwriting that promptly transparency is lower, make the graphing that presents at last have fuzzy border, realize level and smooth drafting effect.
The other technologies feature of present embodiment is identical with embodiment one, does not repeat them here.
As shown in Figure 3, be the structural representation of embodiment of the drawing apparatus of figure of the present invention, as shown in the figure, the drawing apparatus of figure of the present invention comprises:
Sampled point collection module 301 is used to collect the sampled point on the paintbrush person's handwriting path;
Paintbrush index number determination module 302 is used to judge whether current paintbrush index number is less than or equal to predetermined paintbrush number;
Paintbrush person's handwriting drafting module 303, be used for when the judged result of described paintbrush index number determination module 302 when being, the paintbrush pen that uses current paintbrush to have is wide, paintbrush transparence value and predetermined curve type connect described sampled point, wherein, the pairing paintbrush transparence value of the paintbrush that the paintbrush pen is roomy is little, the curved transparency height of being drawn;
Paintbrush update module 304, the value that is used for wide the adding of paintbrush pen that current paintbrush is had/deduct paintbrush step-length gained is wide as new paintbrush pen, the paintbrush transparence value that current paintbrush had is deducted/adds the value of paintbrush transparence value step-length gained as new paintbrush transparence value, the paintbrush index number is added 1 back income value as new paintbrush index number, and will this new paintbrush index number transfer to described paintbrush index number determination module 302 and judge.
Drawing apparatus according to figure of the present invention, it adopts predetermined curve type curve plotting by the different paintbrushes that employing has different paintbrush width, different paintbrush transparence values, and the transparency height of the curve that the wide bigger paintbrush of paintbrush pen is drawn out, thereby the curvilinear path that drafting is come out presents fuzzy border, reaches visually level and smooth writing effect.
Wherein, described predetermined paintbrush number is 4, thereby can obtain graphic plotting effect preferably again with the fast speeds graphing.
Described paintbrush step-length is 1 pixel, thus in the person's handwriting drawing out smeared out boundary can not depart from the curved path of initial drawing too far away, both made the curve smoothing of being drawn, also the aesthetic property of influence curve not.
Described paintbrush transparence value step-length is 255 divided by paintbrush number income value, thereby makes the transparence value of the curve drawing out reach level and smooth transition effect, increases the aesthetic property of institute's graphing.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (8)

1, a kind of method for drafting of figure is characterized in that, comprises step:
Sampled point on the identification paintbrush person's handwriting path;
Set current paintbrush index number, use wide, current paintbrush transparence value of current paintbrush pen and predetermined curve type to connect described sampled point, wherein, the pairing transparency height of the paintbrush that described paintbrush pen is roomy;
Described current paintbrush index number is added 1 income value as new paintbrush index number, the value of wide the adding of described current paintbrush pen/deduct paintbrush step-length gained is wide as new paintbrush pen, described current paintbrush transparence value is deducted/adds the value of paintbrush transparence value step-length gained as new paintbrush transparence value, when described new paintbrush index number is less than or equal to predetermined paintbrush number, use described new wide, new paintbrush transparence value and the described predetermined curve type of paintbrush pen to connect described sampled point, the curves overlapped that the different paintbrush of use is drawn together.
2, the method for drafting of figure according to claim 1 is characterized in that: described paintbrush step-length is 1 pixel.
3, the method for drafting of figure according to claim 1 is characterized in that: described predetermined paintbrush number is 4.
4, according to the method for drafting of claim 1 or 2 or 3 described figures, it is characterized in that: described paintbrush transparence value step-length is 255 values divided by described predetermined paintbrush number gained.
5, a kind of drawing apparatus of figure is characterized in that, comprising:
The sampled point collection module is used to collect the sampled point on the paintbrush person's handwriting path;
Paintbrush index number determination module is used to judge whether current paintbrush index number is less than or equal to predetermined paintbrush number;
Paintbrush person's handwriting drafting module, be used for when the judged result of described paintbrush index number determination module when being, the paintbrush pen that uses current paintbrush to have is wide, paintbrush transparence value and predetermined curve type connect described sampled point, the curves overlapped that the different paintbrush of use is drawn together, wherein, the pairing transparency height of the paintbrush that described paintbrush pen is roomy;
The paintbrush update module, the value that is used for wide the adding of paintbrush pen that current paintbrush is had/deduct paintbrush step-length gained is wide as new paintbrush pen, the paintbrush transparence value that current paintbrush had is deducted/adds the value of paintbrush transparence value step-length gained as new paintbrush transparence value, the paintbrush index number is added 1 back income value as new paintbrush index number, and will this new paintbrush index number transfer to described paintbrush index number determination module and judge.
6, the drawing apparatus of figure according to claim 5 is characterized in that: described predetermined paintbrush number is 4.
7, the drawing apparatus of figure according to claim 5 is characterized in that: described paintbrush step-length is 1 pixel.
8, according to the drawing apparatus of claim 5 or 6 or 7 described figures, it is characterized in that: described paintbrush transparence value step-length is 255 divided by paintbrush number income value.
CNB2007100327615A 2007-12-26 2007-12-26 The method for drafting of figure and device Expired - Fee Related CN100555333C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100327615A CN100555333C (en) 2007-12-26 2007-12-26 The method for drafting of figure and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100327615A CN100555333C (en) 2007-12-26 2007-12-26 The method for drafting of figure and device

Publications (2)

Publication Number Publication Date
CN101216946A CN101216946A (en) 2008-07-09
CN100555333C true CN100555333C (en) 2009-10-28

Family

ID=39623374

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100327615A Expired - Fee Related CN100555333C (en) 2007-12-26 2007-12-26 The method for drafting of figure and device

Country Status (1)

Country Link
CN (1) CN100555333C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383050B (en) * 2008-10-14 2010-06-09 广东威创视讯科技股份有限公司 Writing method and device for handwriting
CN101609560B (en) * 2009-07-16 2011-09-14 广东威创视讯科技股份有限公司 Method for erasing handwriting
CN101770637B (en) * 2009-12-28 2012-02-08 广东威创视讯科技股份有限公司 Graph grabbing processing method and device
WO2015100715A1 (en) * 2014-01-02 2015-07-09 赵宇 Method and device for setting brush attribute

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001056268A1 (en) * 2000-01-27 2001-08-02 Channel Storm Ltd. Method for rapid smoothing of object edges in computer graphics
CN1203452C (en) * 2000-11-01 2005-05-25 三菱电机株式会社 Graphic describing device for processing describing data containing image target
CN1292384C (en) * 2001-12-07 2006-12-27 太瀚科技股份有限公司 Image processing system with hand-write input function and its executing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001056268A1 (en) * 2000-01-27 2001-08-02 Channel Storm Ltd. Method for rapid smoothing of object edges in computer graphics
CN1203452C (en) * 2000-11-01 2005-05-25 三菱电机株式会社 Graphic describing device for processing describing data containing image target
CN1292384C (en) * 2001-12-07 2006-12-27 太瀚科技股份有限公司 Image processing system with hand-write input function and its executing method

Also Published As

Publication number Publication date
CN101216946A (en) 2008-07-09

Similar Documents

Publication Publication Date Title
CN100552718C (en) The method of graphing and device
CN100555333C (en) The method for drafting of figure and device
CN102156865A (en) Handwritten text line character segmentation method and identification method
CN109407954A (en) A kind of method for deleting and system of handwriting trace
CN102576256A (en) Method and apparatus for drawing and erasing calligraphic ink objects on a display surface
CN109445676A (en) The method of the handwritten stroke information of user's input is deleted on handwriting equipment
CN101763234B (en) Method and device for simulating various screen resolutions
CN205139996U (en) Intelligence advertisement design system
US9542093B2 (en) Methods and apparatus for providing partial modification of a digital illustration
CN102117266B (en) Method and device for processing character pitch
CN103631824B (en) A kind of Webpage display process and device
CN106886304A (en) Data processing method, stylus applications client and electronic equipment
CN102402279B (en) Man-machine interaction method based on gesture and system
CN109509240A (en) A kind of smart machine display methods, readable storage medium storing program for executing and smart machine
CN103345389B (en) The operational approach of a kind of vector graphics being applied to webpage and device
CN203026000U (en) Braille point display
CN201654734U (en) Electronic drawing board
CN103226409A (en) Method for achieving electronic whiteboard function switching and based on shortcut key icons, and electronic whiteboard
CN103793082A (en) Brush type capacitive stylus and touch system thereof
CN103970462A (en) Touch method and touch system
CN105786314A (en) Window adjusting method and electronic device using same
CN105893514A (en) Method and device for displaying data
CN101383050B (en) Writing method and device for handwriting
CN102402789B (en) Image drawing method and device
CN103699629A (en) Method and device for processing chart

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091028

Termination date: 20161226