Fill star with partially Picture
To see the above picture. My sample code is below
`protected void onDraw(Canvas canvas) { mid = getWidth()/2; int a=100,b=100; min = Math.min(a, b); fat = min / 17; half = min / 2; rad = 5; mid = mid - half;
paint = new Paint();
paint.setColor(Color.BLUE);
paint.setStyle(Paint.Style.STROKE);
Path path = new Path();
path.reset();
paint.setStyle(Paint.Style.FILL);
// top left
path.moveTo(half * 0.5f, half * 0.84f);
// top right
path.lineTo(half * 1.5f, half * 0.84f);
// bottom left
path.lineTo(half * 0.68f, half * 1.45f);
// top tip
path.lineTo(half * 1.0f, half * 0.5f);
// bottom right
path.lineTo(half * 1.32f, half * 1.45f);
// top left
path.lineTo(half * 0.5f, half * 0.84f);
path.close();
canvas.drawPath(path, paint);
super.onDraw(canvas);
}`
My question is how we do partially fill star in android?
I want this fill option with not only half fill star.
And also, If we consider full star length is 100%.
And we have to fill star length of 20% or we have to fill star length of 50% or we have to fill star length of 70%.
Any fill values to fill a star.