src/com/poomoo/edao/widget/FlexibleRatingBar.java
private Path createStarBySize(float size, int steps) {
		// draw a simple circle if steps == 0
		if (steps == 0) {
			path.addOval(new RectF(0, 0, size, size), Path.Direction.CW);
			path.close();
			return path;
		}
		float halfSize = size / 2.0F;
		float radius = halfSize / interiorAngleModifier; // Adjusts "pointiness"
															// of stars
		float degreesPerStep = (float) Math.toRadians(360.0F / (float) steps);
		float halfDegreesPerStep = degreesPerStep / 2.0F;
		path.setFillType(Path.FillType.EVEN_ODD);
		float max = (float) (2.0F * Math.PI);
		path.moveTo(halfSize, 0);
		for (double step = 0; step < max; step += degreesPerStep) {
			path.lineTo((float) (halfSize - halfSize * Math.sin(step)),
					(float) (halfSize - halfSize * Math.cos(step)));
			path.lineTo(
					(float) (halfSize - radius
							* Math.sin(step + halfDegreesPerStep)),
					(float) (halfSize - radius
							* Math.cos(step + halfDegreesPerStep)));
		}
		path.close();
		return path;
	}
// If you enter 0 vertices, you get a circle

If you enter 0 vertices, you get a circle
If you enter 0 vertices you get a circle
private Path createStarBySize(float size, int steps) {
		if (steps == 0) {
			path.addOval(new RectF(0, 0, size, size), Path.Direction.CW);
			path.close();
			return path;
		}
		float halfSize = size / 2.0F;
		float radius = halfSize / interiorAngleModifier; 
		float degreesPerStep = (float) Math.toRadians(360.0F / (float) steps);
		float halfDegreesPerStep = degreesPerStep / 2.0F;
		path.setFillType(Path.FillType.EVEN_ODD);
		float max = (float) (2.0F * Math.PI);
		path.moveTo(halfSize, 0);
		for (double step = 0; step < max; step += degreesPerStep) {
			path.lineTo((float) (halfSize - halfSize * Math.sin(step)),
					(float) (halfSize - halfSize * Math.cos(step)));
			path.lineTo(
					(float) (halfSize - radius
							* Math.sin(step + halfDegreesPerStep)),
					(float) (halfSize - radius
							* Math.cos(step + halfDegreesPerStep)));
		}
		path.close();
		return path;
	}
private Path createStarBySize ( float size , int steps ) { if ( steps == 0 ) { path . addOval ( new RectF ( 0 , 0 , size , size ) , Path . Direction . CW ) ; path . close ( ) ; return path ; } float halfSize = size / 2.0F ; float radius = halfSize / interiorAngleModifier ; float degreesPerStep = ( float ) Math . toRadians ( 360.0F / ( float ) steps ) ; float halfDegreesPerStep = degreesPerStep / 2.0F ; path . setFillType ( Path . FillType . EVEN_ODD ) ; float max = ( float ) ( 2.0F * Math . PI ) ; path . moveTo ( halfSize , 0 ) ; for ( double step = 0 ; step < max ; step += degreesPerStep ) { path . lineTo ( ( float ) ( halfSize - halfSize * Math . sin ( step ) ) , ( float ) ( halfSize - halfSize * Math . cos ( step ) ) ) ; path . lineTo ( ( float ) ( halfSize - radius * Math . sin ( step + halfDegreesPerStep ) ) , ( float ) ( halfSize - radius * Math . cos ( step + halfDegreesPerStep ) ) ) ; } path . close ( ) ; return path ; }
If you enter 0 vertices, you get a circle
If you enter 0 vertices you get a circle
// draw a simple circle if steps == 0
 // Adjusts "pointiness"
 // of stars
