Smooth jagged lines drawn by user in HTML5 canvas app?
Here's an example of a quick way using quadratic curves and 'round' lineJoin
:
http://jsfiddle.net/NWBV4/10/
How to Draw a Smoother Path
Try using
g2.setStroke(new BasicStroke(50, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
instead of g2.setStroke(new BasicStroke(50));
css transform, jagged edges in chrome
In case anyone's searching for this later on, a nice trick to get rid of those jagged edges on CSS transformations in Chrome is to add the CSS property -webkit-backface-visibility
with a value of hidden
. In my own tests, this has completely smoothed them out. Hope that helps.
-webkit-backface-visibility: hidden;
Related Topics
How to Cast a Double to an Int in Java by Rounding It Down
How to Make a New List in Java
Screen Video Record of Current Activity Android
Android How to Listen for Volume Button Events
What Is the Easiest Way to Get the Current Day of the Week in Android
Android Unable to Instantiate Activity: Didn't Find Class on Path
Android Fragmentmanager Backstackrecord.Run Throwing Nullpointerexception
Is There Any Library or Algorithm for Persian (Shamsi or Jalali) Calendar in Android
When/Why to Call System.Out.Flush() in Java
Private Final Static Attribute VS Private Final Attribute
Remove Padding/Margin from Javafx Label
How to Convert 24 Hr Format Time in to 12 Hr Format
String.Equals() with Multiple Conditions (And One Action on Result)
Onclick Event Is Not Triggering | Android
How to Hash a String in Android
How to Get Elements of Fragments Created by Viewpager in Mainactivity