Here you can find the source of getLinePaint(Context context)
public static Paint getLinePaint(Context context)
//package com.java2s; import android.content.Context; import android.graphics.Paint; import android.util.TypedValue; public class Main { public static final int DEFAULT_LINE_THICKNESS = 5; public static final int DEFAULT_LINE_COLOR = 0x900099CC; public static Paint getLinePaint(Context context) { final float lineThicknessPx = TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, DEFAULT_LINE_THICKNESS, context.getResources().getDisplayMetrics()); final Paint borderPaint = new Paint(); borderPaint.setColor(DEFAULT_LINE_COLOR); borderPaint.setStrokeWidth(lineThicknessPx); borderPaint.setStyle(Paint.Style.STROKE); borderPaint.setAntiAlias(true);/*from w w w . ja va2 s .c om*/ return borderPaint; } }