get Text Base Line via Paint - Android Graphics

Android examples for Graphics:Paint

Description

get Text Base Line via Paint

Demo Code


//package com.java2s;
import android.graphics.Paint;

public class Main {
    public static int getTextBaseLine(Paint paint) {
        Paint.FontMetrics fm = paint.getFontMetrics();
        return (int) Math.abs(fm.bottom);
    }//from  w  w w. j  a va 2 s.  co m
}

Related Tutorials