com.androidplot.util
Class PaintUtils

java.lang.Object
  extended by com.androidplot.util.PaintUtils

public class PaintUtils
extends Object

Convenience methods that operate on Paint instances. These methods primarily deal with converting pixel values to/from dp values.


Constructor Summary
PaintUtils()
           
 
Method Summary
static void setFontSizeDp(android.graphics.Paint paint, float fontSizeDp)
          Sets a paint instance's font size in dp
static void setLineSizeDp(android.graphics.Paint paint, float lineSizeDp)
          Sets a paint instance's line stroke size in dp
static void setShadowDp(android.graphics.Paint paint, float radiusDp, float dxDp, float dyDp, int color)
          Set a paint instance's shadowing using dp values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaintUtils

public PaintUtils()
Method Detail

setLineSizeDp

public static void setLineSizeDp(android.graphics.Paint paint,
                                 float lineSizeDp)
Sets a paint instance's line stroke size in dp

Parameters:
paint -
lineSizeDp -

setFontSizeDp

public static void setFontSizeDp(android.graphics.Paint paint,
                                 float fontSizeDp)
Sets a paint instance's font size in dp

Parameters:
paint -
fontSizeDp -

setShadowDp

public static void setShadowDp(android.graphics.Paint paint,
                               float radiusDp,
                               float dxDp,
                               float dyDp,
                               int color)
Set a paint instance's shadowing using dp values

Parameters:
paint -
radiusDp -
dxDp -
dyDp -
color -


Copyright © 2010-2013 androidplot.com. All Rights Reserved.