Horje
How to draw Bezier Curve in Android Code Example
How to draw Bezier Curve in Android
public class DrawView extends View {

    Paint paint;
    Path path;

    public DrawView(Context context) {
        super(context);
        init();
    }

    public DrawView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public DrawView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        init();
    }

    private void init(){
        paint = new Paint();

        paint.setStyle(Paint.Style.STROKE);

    }

    @Override
    protected void onDraw(Canvas canvas) {
        // TODO Auto-generated method stub
        super.onDraw(canvas);
        path = new Path();
        paint.setColor(Color.RED);
        paint.setStrokeWidth(3);
        path.moveTo(34, 259);
        path.cubicTo(68, 151, 286, 350, 336, 252);
        canvas.drawPath(path, paint);

    }




Java

Related
jbutton open jframe java Code Example jbutton open jframe java Code Example
synchronized block java Code Example synchronized block java Code Example
bukkit java get player count Code Example bukkit java get player count Code Example
list to map of list java 8 Code Example list to map of list java 8 Code Example
android @Parcelize not resolving Code Example android @Parcelize not resolving Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8