As an experiment, I tried to do the same on canvas. This is what I came up with using the RadialGradient and the GraphicsContext.fillArc function:
private void drawSemiCircle(float x, float y, float outer, float innerPercentage, float arcStartAngle, float arcExtent) { RadialGradient rg = new RadialGradient( 0, 0, x, y, outer, false, CycleMethod.NO_CYCLE, new Stop((innerPercentage + (.0 * innerPercentage)), Color.TRANSPARENT), new Stop((innerPercentage + (.1 * innerPercentage)), Color.RED), new Stop((innerPercentage + (.6 * innerPercentage)), Color.YELLOW), new Stop((innerPercentage + (1 * innerPercentage)), Color.GREEN) ); gc.setFill(rg); gc.fillArc( x - outer, y - outer, outer * 2, outer * 2, arcStartAngle, arcExtent, ArcType.ROUND ); }
Arc types such as ArcType.ROUND and using Color.TRANSPARENT as the first color are key here.
Then it can be used something along the line:
drawSemiCircle(100, 100, 100, .5f, -45, 270);
This is not an ideal solution, but it worked for me.