Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.Canvas;

import android.graphics.Paint;

public class Main {
    public static void drawText(Canvas canvas, String text, float x, float y, Paint paint, float angle) {
        if (angle != 0F)
            canvas.rotate(angle, x, y);

        canvas.drawText(text, x, y, paint);
        if (angle != 0F)
            canvas.rotate(-angle, x, y);
    }
}