Commit be5a8a3e authored by Valérie Maquil's avatar Valérie Maquil

minor modifications on the shape corona

parent e5fe468b
......@@ -33,7 +33,7 @@ import java.awt.geom.AffineTransform;
public class ShapeCorona extends Corona {
private Color colour = Color.GRAY;
private int borderWidth = 20;
private int borderWidth = 0;
/**
* Constructor building all fields and calling the implicit super constructor using a
......@@ -44,6 +44,8 @@ public class ShapeCorona extends Corona {
*/
public ShapeCorona(BaseShapeCoronaBuilder<?> builder) {
super(builder);
colour = builder.colour;
borderWidth = builder.borderWidth;
}
/** {@inheritDoc} */
......@@ -66,12 +68,13 @@ public class ShapeCorona extends Corona {
transformation.rotate(drawAt.getAngle());
}
canvas.setPaint(colour);
canvas.fill(transformation.createTransformedShape(shape));
canvas.setPaint(Color.black);
Stroke oldStroke = canvas.getStroke();
canvas.setStroke(new BasicStroke(borderWidth));
canvas.draw(shape);
canvas.draw(transformation.createTransformedShape(shape));
canvas.setStroke(oldStroke);
canvas.setPaint(colour);
canvas.fill(transformation.createTransformedShape(shape));
}
}
\ No newline at end of file
......@@ -35,7 +35,7 @@ public class ShapeCoronaBuilder extends BaseShapeCoronaBuilder<ShapeCoronaBuilde
* @param centre
* The centre of the corona, usually the centre of the handle.
*/
protected ShapeCoronaBuilder(Point centre) {
public ShapeCoronaBuilder(Point centre) {
super(centre);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment