CodeAndMagic / GaugeView

An Android library for drawing gauges on Canvas.
Apache License 2.0
224 stars 156 forks source link

Exception. Invalid radius value! #9

Open misterbobdobalina opened 10 years ago

misterbobdobalina commented 10 years ago

Get error with app:outerShadowWidth="0.5"

mOuterShadowRect.width() / 2.0f in: paint.setShader(new RadialGradient(... , ... , here! , ...

public Paint getDefaultOuterShadowPaint() {
    final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
    paint.setStyle(Paint.Style.FILL);
    paint.setShader(new RadialGradient(CENTER, CENTER, mOuterShadowRect.width() / 2.0f, OUTER_SHADOW_COLORS, OUTER_SHADOW_POS,
            TileMode.MIRROR));
    return paint;
}
greenspand commented 10 years ago

Try to add eaven numbers instead of 5. For example 6.