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 drawMultiline(Canvas canvas, String str, int x, int y, Paint paint) {
        for (String line : str.split("\n")) {
            canvas.drawText(line, x, y, paint);
            y += -paint.ascent() + paint.descent();
        }
    }
}