line.setRotate(angle/2); Shape finalShape = Shape.subtract(circle, innerCircle); finalShape.setFill(Color.TRANSPARENT); finalShape.setTranslateX(gapCausedByScale);
/** * Compute the needed clip for stage's shadow border * * @param newBounds * @param shadowVisible */ void setShadowClip(Bounds newBounds) { external.relocate(newBounds.getMinX() - SHADOW_WIDTH, newBounds.getMinY() - SHADOW_WIDTH); internal.setX(SHADOW_WIDTH); internal.setY(SHADOW_WIDTH); internal.setWidth(newBounds.getWidth()); internal.setHeight(newBounds.getHeight()); internal.setArcWidth(shadowRectangle.getArcWidth()); // shadowRectangle // CSS cannot be // applied on // this internal.setArcHeight(shadowRectangle.getArcHeight()); external.setWidth(newBounds.getWidth() + SHADOW_WIDTH * 2); external.setHeight(newBounds.getHeight() + SHADOW_WIDTH * 2); Shape clip = Shape.subtract(external, internal); shadowRectangle.setClip(clip); }