1

Here is what i got.

Is it possible to discard fragmentation or at least make it smoother?

I read pixel color from running cursor and on low speed fragmentation is visible.

Here is my code:

final int[] mColors = new int[] {
    0xFFFF0000, 0xFFFF7F00, 0xFFFFFF00, 0xFF7FFF00, 0xFF00FF00, 0xFF00FF7F,
    0xFF00FFFF, 0xFF007FFF, 0xFF0000FF, 0xFF7F00FF, 0xFFFF00FF, 0xFFFF007F,
    0xFFFF0000
};
...
Shader shad = new SweepGradient(centerX, centerY, mColors, null);
...
Paint colorWheel = new Paint();
colorWheel.setAntiAlias(true);
colorWheel.setShader(shad);
colorWheel.setStyle(Paint.Style.STROKE);
colorWheel.setStrokeWidth(radius/10);
colorWheel.setDither(true);
...
Bitmap colorWheelBitmap = Bitmap.createBitmap(xNew, yNew, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(colorWheelBitmap);
canvas.drawCircle(centerX, centerY, radius, colorWheel);
...
@Override
protected void onDraw(Canvas canvas) {
    canvas.drawBitmap(colorWheelBitmap, 0, 0, null);
    ...
}
JuicyKitty
  • 318
  • 1
  • 16

0 Answers0