Results 1 to 4 of 4
- 12-10-2011, 04:03 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 3
- Rep Power
- 0
Freehand curve smoothing using Bezier Curve
Hi,
Anyone knows how the code to convert freehand drawing curve to bezier curve so as to smooth the lines when drawn? Or is there any other method that can be used to smooth the freehand drawing so as not to have any jagged points. Any help is greatly appreciated. Thanks!
- 12-11-2011, 06:02 PM #2
Re: Freehand curve smoothing using Bezier Curve
Check out java.awt.geom.Path2D#curveTo(...)
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 12-11-2011, 08:12 PM #3
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
Re: Freehand curve smoothing using Bezier Curve
Set the anti-alias flag for the rendering hints (google for exact code) if you want them to be anti-aliased (which will smooth the curves). In addition to DarrylBurke's advice, take a look at the QuadCurve2D and CubicCurve2D classes for rendering
Geometric Primitives (The Java™ Tutorials > 2D Graphics > Overview of the Java 2D API Concepts)
- 12-14-2011, 07:56 PM #4
Member
- Join Date
- Sep 2011
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
Drawing the sine curve
By bumblyb33 in forum Java 2DReplies: 7Last Post: 03-26-2009, 10:29 PM -
Java Learning Curve
By mwildam in forum New To JavaReplies: 13Last Post: 10-17-2008, 11:09 AM -
How to draw text along a curve
By Java Tip in forum java.awtReplies: 0Last Post: 06-25-2008, 10:31 AM -
How to draw Curve using QuadCurve2D
By Java Tip in forum java.awtReplies: 0Last Post: 06-23-2008, 11:20 PM -
How to Draw Curve with mouse
By Java Tip in forum java.awtReplies: 0Last Post: 06-23-2008, 11:20 PM


2Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks