List of usage examples for android.graphics SweepGradient getLocalMatrix
public boolean getLocalMatrix(@NonNull Matrix localM)
From source file:com.skumar.flexibleciruclarseekbar.CircularSeekBar.java
/** * Method to drawing the gradient color for the arc */// w w w . j a v a 2s . com public void setShader() { SweepGradient sweepgradient = new SweepGradient(mArcRadius, mArcRadius, Color.parseColor("#2f8bca"), Color.parseColor("#c91200")); Matrix matrix = new Matrix(); matrix.reset(); sweepgradient.getLocalMatrix(matrix); matrix.postRotate(90, mArcRadius, mArcRadius); sweepgradient.setLocalMatrix(matrix); mArcPaint.setShader(sweepgradient); mNeedleScalePaint.setShader(sweepgradient); }