-1

Hey I am currently working on a low level PaintProgram and I´m a little annoyed by the Rough lines iam drawing. When i set the stroke to 5 or higher of my Free Hand Drawing mode I get those edgy borders and it ends up looking rly bad:

Stroke 15, 20 and 50:

https://i.stack.imgur.com/gLOws.png

Sadly i can´t post pictures here... Am I able to create smooth borders easily?

camickr
  • 321,443
  • 19
  • 166
  • 288
SecondTry
  • 13
  • 3
  • Have you tried setting antialiasing on something similar to the comment on this question. https://stackoverflow.com/a/2839517/394350 – park896 Jun 10 '17 at 14:17
  • It’s very likely that your issue is not smoothing the border but smoothing the entire curvature, i.e. not to follow every wiggle of the user’s fingers or all vibrations of the sensors. When the jitter is smaller then the line width, it manifests in the borders only, but the borders are not the actual problem. – Holger Jun 13 '17 at 15:10
  • Sry guys I completely forgot to confirm the Answer... – SecondTry Jun 13 '17 at 15:45

1 Answers1

0

Define your BasicStroke with something like:

g2.setStroke(new BasicStroke(50, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
camickr
  • 321,443
  • 19
  • 166
  • 288