简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM