geekydhaval
geekydhaval

Reputation: 178

How to Draw a continuous line on touch path in libgdx?

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

Answers (1)

Related Questions