Reputation: 178
I tried using pixmap , but every time i draw a path and increaase drag speed , it shows space betweeen two pixmap circles.
I also tried by saving touch points in an array and drawind all the points by shaperenderer but same thing happened.
I need to draw a smooth line like in some image editor apps.
Right now using this method.
while (cIter.hasNext()) {
penpoint = cIter.next();
shapeRenderer.circle(penpoint.getPosition().x,
penpoint.getPosition().y, 3);
}
but it shows like this. https://s3.amazonaws.com/pushbullet-uploads/ujCRdpmszeu-lp4uLBpI5MftwHBvmk58QP4w4mrzfkJx/Screenshot_2014-12-14-15-23-41.png
Upvotes: 2
Views: 1887
Reputation: 21678
do not know if this is what you want, but maybe you can use it for whatever you want to do, hope it helps.
https://github.com/libgdx/libgdx/wiki/Path-interface-%26-Splines https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/PathTest.java
P.S:maybe you can look on Beizer curves https://www.google.es/?gws_rd=ssl#q=http://devmag.org.za+/2011/04/05+/bzier-curves-a-tutorial/
Upvotes: 3