List of usage examples for android.graphics Paint reset
public void reset()
From source file:org.stockchart.core.Appearance.java
public void applyText(Paint p) { p.reset(); p.setTextSize(fFont.getSize());//from ww w . jav a 2s . c o m p.setColor(fFont.getColor()); p.setTypeface(fFont.getTypeface()); p.setAntiAlias(fIsAntialias); p.setPathEffect(null); p.setStyle(Style.FILL); }
From source file:org.stockchart.core.Appearance.java
public void applyOutline(Paint p) { p.reset(); p.setShader(null);/*from w ww . jav a2 s . c o m*/ p.setColor(fOutlineColor); p.setAntiAlias(fIsAntialias); p.setStrokeWidth(fOutlineWidth); p.setStyle(Style.STROKE); switch (fOutlineStyle) { case DASH: p.setPathEffect(DASH_EFFECT); break; default: p.setPathEffect(null); } }
From source file:org.stockchart.core.Appearance.java
public void applyFill(Paint p, RectF rect) { p.reset(); p.setStyle(Style.FILL);/* w w w . j a v a 2 s . c o m*/ p.setColor(fPrimaryFillColor); switch (fGradient) { case LINEAR_HORIZONTAL: { p.setShader(new LinearGradient(rect.left, rect.top, rect.right, rect.top, fPrimaryFillColor, fSecondaryFillColor, TileMode.MIRROR)); } break; case LINEAR_VERTICAL: { p.setShader(new LinearGradient(rect.left, rect.top, rect.left, rect.bottom, fPrimaryFillColor, fSecondaryFillColor, TileMode.MIRROR)); } break; default: p.setShader(null); } }