CN102651139B - Paint brush realizing method and device - Google Patents

Paint brush realizing method and device Download PDF

Info

Publication number
CN102651139B
CN102651139B CN201210133849.7A CN201210133849A CN102651139B CN 102651139 B CN102651139 B CN 102651139B CN 201210133849 A CN201210133849 A CN 201210133849A CN 102651139 B CN102651139 B CN 102651139B
Authority
CN
China
Prior art keywords
paintbrush
mouse
reference orientation
width
divergent
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
CN201210133849.7A
Other languages
Chinese (zh)
Other versions
CN102651139A (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 Group Co 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 CN201210133849.7A priority Critical patent/CN102651139B/en
Publication of CN102651139A publication Critical patent/CN102651139A/en
Application granted granted Critical
Publication of CN102651139B publication Critical patent/CN102651139B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a paint brush realizing method and a paint brush realizing device. The method comprises the following steps of adjusting a painting window according to preset paint brush parameters by starting from changing the angle of the painting window; operating the paint brush to obtain the paint brush effect and realizing the paint brush function. According to the method and device provided by the invention, only the adjustment of the painting window and the response of painting operation of a mouse are referred to, the process is simple, the amount of calculation is small, the application range is wide; and moreover, the anti-aliased effect of the paint brush is reserved and the linearity is smooth.

Description

Paintbrush implementation method and device
Technical field
The present invention relates to computer drawing technology field, particularly relate to a kind of paintbrush implementation method and device.
Background technology
At present, the shape library that can realize paintbrush function only has GDI+ (Graphics Device Interface, Graphics Device Interface), other shape library, such as gtk (GIMP Tool Kit), qt, cairo, directly do not provide paintbrush function, can carry out retouching pixel operation according to factors such as the angle of paintbrush, directions and realize paintbrush function, but this implementation is complicated, calculated amount is large, and is difficult to realize counterbalance effect.
Summary of the invention
Based on above-mentioned situation, the present invention proposes a kind of paintbrush implementation method and device, adopt simple effective method to realize paintbrush function, and be applicable to various shape library.
A kind of paintbrush implementation method, comprises step:
The width of paintbrush and the angle of inclination of relative reference orientation are set;
The multiple comparing paintbrush width according to paintbrush width carries out convergent-divergent to drawing window in upright reference orientation, carries out reverse rotation according to the angle of inclination of the relative reference orientation of paintbrush to drawing window;
The drafting operation of monitoring mouse, the multiple comparing paintbrush width according to paintbrush width carries out convergent-divergent to the coordinate of mouse in upright reference orientation, rotates mouse coordinates according to the angle of inclination of paintbrush relative to reference orientation;
The drafting responding mouse according to convergent-divergent and postrotational mouse coordinates on convergent-divergent and postrotational drawing window operates.
A kind of paintbrush implement device, comprising:
Paintbrush parameter setting module, for the angle of inclination of the width and relative reference orientation that arrange paintbrush;
Drawing window adjusting module, carries out convergent-divergent to drawing window for the multiple comparing paintbrush width according to paintbrush width in upright reference orientation, carries out reverse rotation according to the angle of inclination of the relative reference orientation of paintbrush to drawing window;
Mouse coordinates adjusting module, carries out convergent-divergent for the multiple comparing paintbrush width according to paintbrush width to the coordinate of mouse in upright reference orientation, rotates according to the angle of inclination of paintbrush relative to reference orientation to mouse coordinates;
Mouse action respond module, operates for the drafting responding mouse according to convergent-divergent and postrotational mouse coordinates on convergent-divergent and postrotational drawing window.
Paintbrush implementation method of the present invention and device, from the angle of conversion drawing window, according to the paintbrush parameter adjustment drawing window preset, make paintbrush operate and obtain paintbrush effect, realize paintbrush function.Because the response of operation is drawn in the adjustment and mouse that only relate to drawing window, process is simple, and calculated amount is little, applied widely, and remains the anti-aliasing effect of paintbrush, linear smoothing.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of paintbrush implementation method of the present invention;
Fig. 2 is the structural representation of paintbrush implement device of the present invention.
Embodiment
The present invention avoids the thinking changing paintbrush, realizes paintbrush function from the angle of conversion drawing window.The present invention is explained in detail below in conjunction with accompanying drawing and embodiment.
Paintbrush implementation method of the present invention, as shown in Figure 1, comprises step:
Step 1, the width of paintbrush and the angle of inclination of relative reference orientation are set;
Step 2, the multiple comparing paintbrush width according to paintbrush width carry out convergent-divergent to drawing window in upright reference orientation, carry out reverse rotation according to the angle of inclination of the relative reference orientation of paintbrush to drawing window;
The drafting operation of step 3, monitoring mouse, the multiple comparing paintbrush width according to paintbrush width carries out convergent-divergent to the coordinate of mouse in upright reference orientation, rotates mouse coordinates according to the angle of inclination of paintbrush relative to reference orientation;
Step 4, the drafting responding mouse according to convergent-divergent and postrotational mouse coordinates on convergent-divergent and postrotational drawing window operate.
Drafting window herein refers to drawing board or the painting canvas of showing drawing effect, and this painting canvas can random variation, and namely scalable rotatable, the present invention makes the operation of paintbrush obtain paintbrush effect by the conversion of painting canvas.
As mentioned above, first the present invention arranges width and the angle of inclination of paintbrush to be achieved, the reference orientation at the angle of inclination horizontal direction X-direction in other words normally on painting canvas, paintbrush width is how many times of paintbrush width, and painting canvas is just corresponding amplifies how many times in upright reference orientation in other words paintbrush Width.Like this, paintbrush is operated, what obtain is exactly the effect of the paintbrush of one fixed width, but the mouse coordinates in upright reference orientation is also exaggerated how many times, remain unchanged to make mouse coordinates, before responding, by the corresponding multiple of reverse for mouse coordinates convergent-divergent, i.e. the multiple of the relative paintbrush width of convergent-divergent paintbrush width.
Because the angle of inclination of paintbrush also can affect drafting effect, therefore, the coordinate of mouse and painting canvas all will do corresponding rotation, and the anglec of rotation of mouse coordinates is identical with paintbrush angle of inclination, and the rotation of painting canvas is then the inverse operation that mouse coordinates rotates.As, on the relative painting canvas of paintbrush, the angle of inclination of horizontal direction is 30 °, then painting canvas should rotate-30 °, after monitoring the drafting operation of mouse, responds after mouse coordinates being rotated 30 ° again.
Paintbrush implement device of the present invention is the device corresponding with said method, as shown in Figure 2, comprising:
Paintbrush parameter setting module, for the angle of inclination of the width and relative reference orientation that arrange paintbrush;
Drawing window adjusting module, carries out convergent-divergent to drawing window for the multiple comparing paintbrush width according to paintbrush width in upright reference orientation, carries out reverse rotation according to the angle of inclination of the relative reference orientation of paintbrush to drawing window;
Mouse coordinates adjusting module, carries out convergent-divergent for the multiple comparing paintbrush width according to paintbrush width to the coordinate of mouse in upright reference orientation, rotates according to the angle of inclination of paintbrush relative to reference orientation to mouse coordinates;
Mouse action respond module, operates for the drafting responding mouse according to convergent-divergent and postrotational mouse coordinates on convergent-divergent and postrotational drawing window.
From Fig. 2 and above description, paintbrush parameter setting module connects respectively draws window adjustment module and mouse coordinates adjusting module, and mouse action respond module also connects respectively draws window adjustment module and mouse coordinates adjusting module, thus constitutes this device.The other technologies feature of this device is identical with said method, does not repeat them here.
The above embodiment only have expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but therefore can not 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 (4)

1. a paintbrush implementation method, is characterized in that, comprises step:
The width of paintbrush and the angle of inclination of relative reference orientation are set;
The multiple comparing paintbrush width according to paintbrush width is carrying out convergent-divergent to drawing window perpendicular in reference orientation, carries out reverse rotation according to the angle of inclination of the relative reference orientation of paintbrush to drawing window;
The drafting operation of monitoring mouse, the multiple comparing paintbrush width according to paintbrush width is carrying out convergent-divergent to mouse perpendicular to the coordinate in reference orientation, rotates mouse coordinates according to the angle of inclination of paintbrush relative to reference orientation;
The drafting responding mouse according to convergent-divergent and postrotational mouse coordinates on convergent-divergent and postrotational drawing window operates.
2. paintbrush implementation method according to claim 1, is characterized in that, described reference orientation is the X-direction of drawing window.
3. a paintbrush implement device, is characterized in that, comprising:
Paintbrush parameter setting module, for the angle of inclination of the width and relative reference orientation that arrange paintbrush;
Drawing window adjusting module, is carrying out convergent-divergent to drawing window perpendicular in reference orientation for the multiple comparing paintbrush width according to paintbrush width, is carrying out reverse rotation according to the angle of inclination of the relative reference orientation of paintbrush to drawing window;
Mouse coordinates adjusting module, for monitoring the drafting operation of mouse, the multiple comparing paintbrush width according to paintbrush width is carrying out convergent-divergent to mouse perpendicular to the coordinate in reference orientation, rotates mouse coordinates according to the angle of inclination of paintbrush relative to reference orientation;
Mouse action respond module, operates for the drafting responding mouse according to convergent-divergent and postrotational mouse coordinates on convergent-divergent and postrotational drawing window.
4. paintbrush implement device according to claim 3, is characterized in that, described reference orientation is the X-direction of drawing window.
CN201210133849.7A 2012-04-28 2012-04-28 Paint brush realizing method and device Expired - Fee Related CN102651139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210133849.7A CN102651139B (en) 2012-04-28 2012-04-28 Paint brush realizing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210133849.7A CN102651139B (en) 2012-04-28 2012-04-28 Paint brush realizing method and device

Publications (2)

Publication Number Publication Date
CN102651139A CN102651139A (en) 2012-08-29
CN102651139B true CN102651139B (en) 2014-12-24

Family

ID=46693142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210133849.7A Expired - Fee Related CN102651139B (en) 2012-04-28 2012-04-28 Paint brush realizing method and device

Country Status (1)

Country Link
CN (1) CN102651139B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923699A (en) * 2009-06-10 2010-12-22 炬力集成电路设计有限公司 Method and device for reducing CPU consumption in vector graphics filling process

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050023004A (en) * 2003-08-28 2005-03-09 인테크놀러지(주) Apparatus and Method for simulating Oriental Painting
TW200839577A (en) * 2007-03-16 2008-10-01 Behavior Tech Computer Corp Computer cursor control method and apparatus thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923699A (en) * 2009-06-10 2010-12-22 炬力集成电路设计有限公司 Method and device for reducing CPU consumption in vector graphics filling process

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"矢量画刷的设计与实现";彭冬玲;《微计算机信息》;20111231;第27卷(第5期);第227-228页 *
Paul Haeberli.Paint By Numbers:Abstract Image Representations.《Computer Graphics》.1990,第24卷(第4期),第207-214页. *

Also Published As

Publication number Publication date
CN102651139A (en) 2012-08-29

Similar Documents

Publication Publication Date Title
CN103019602B (en) A kind of method realizing the operation of many people split screen
CN104615538B (en) A kind of mobile phone application testing method based on mobile phone interface control element
CN104679469B (en) The method of the screen resolution of car-mounted terminal and its acquisition handheld terminal
CN106600664B (en) drawing method and device of symmetric graph
WO2013151750A3 (en) Patched shading in graphics processing
CN103927169A (en) Method for realizing scaling of electronic map drawn by GDI (graphic device interface)+
CN101882077A (en) Method and device for efficiently drawing and rendering basic graphic
CN103927171A (en) Method and system for implementing multi-screen preview on stereoscopic desktops
CN106125963A (en) On a kind of equipment without pressure sensitivity former person's handwriting Handwriting Signature System and the former person's handwriting of PDF document hand-written sign method
CN104548597A (en) Navigation grid automatic-generation method and navigation grid automatic-generation device
CN102651139B (en) Paint brush realizing method and device
CN101813989A (en) Handwriting input method
CN101833744B (en) Method and device for efficiently drawing graphics
CN103543923A (en) Control clicking event processing method and system
CN104423792A (en) Method and device for changing positions of icons of touch screen terminal and mobile terminal
CN104123748A (en) Screen space point light source based method for achieving real-time dynamic shadows
CN103838467A (en) Method and system for realizing three-dimensional desktop shortcut bar switching
CN107103883A (en) A kind of brightness adjusting method of organic light emitting display, terminal and storage device
CN105446496A (en) Cursor control device and cursor control method thereof
CN104259675B (en) Mixed type vision processing method
CN202247701U (en) Rotatable middle support leg
CN203930757U (en) Capacitance touch screen with optical cement point glue pattern
CN205247357U (en) Anti -dazzle capacitive touch panel
CN204048416U (en) The technique circular fan that a kind of covering of the fan fan back of the body is all smooth
CN104268850A (en) Mixed type vision processing method

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 510670 Guangdong city of Guangzhou province Kezhu Guangzhou high tech Industrial Development Zone, Road No. 233

Patentee after: Wei Chong group Limited by Share Ltd

Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No.

Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd.

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: 20141224

Termination date: 20210428