How to make line with rounded (smooth) corners with AndroidPlot

后端 未结 5 2108
挽巷
挽巷 2020-12-05 08:27

I have a small problem with ploting my graph. On a picture below is what I have already done.


The graph should represent the actual signal strength of availabl

5条回答
  •  抹茶落季
    2020-12-05 09:04

    try this:

    symbol = new Path();
    paint = new Paint();
    paint.setAntiAlias(true);      
    paint.setStrokeWidth(2);
    paint.setColor(-7829368);  
    paint.setStrokeJoin(Paint.Join.ROUND);    // set the join to round you want
    paint.setStrokeCap(Paint.Cap.ROUND);      // set the paint cap to round too
    paint.setPathEffect(new CornerPathEffect(10) );
    paint.setStyle(Paint.Style.STROKE);       
    
    symbol.moveTo(50.0F, 230.0F);         
    symbol.lineTo(75.0F, 100.0F);
    symbol.lineTo(100.0F, 230.0F);
    

    most of the info found here

提交回复
热议问题