Commit 93b096f2 authored by Eric Tobias's avatar Eric Tobias

Merge branch 'dev' of git.list.lu:nui/tulip into dev

parents 3219dcdc 3a9910aa
...@@ -33,7 +33,7 @@ import java.awt.geom.AffineTransform; ...@@ -33,7 +33,7 @@ import java.awt.geom.AffineTransform;
public class ShapeCorona extends Corona { public class ShapeCorona extends Corona {
private Color colour = Color.GRAY; 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 * Constructor building all fields and calling the implicit super constructor using a
...@@ -44,6 +44,8 @@ public class ShapeCorona extends Corona { ...@@ -44,6 +44,8 @@ public class ShapeCorona extends Corona {
*/ */
public ShapeCorona(BaseShapeCoronaBuilder<?> builder) { public ShapeCorona(BaseShapeCoronaBuilder<?> builder) {
super(builder); super(builder);
colour = builder.colour;
borderWidth = builder.borderWidth;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
...@@ -66,12 +68,13 @@ public class ShapeCorona extends Corona { ...@@ -66,12 +68,13 @@ public class ShapeCorona extends Corona {
transformation.rotate(drawAt.getAngle()); transformation.rotate(drawAt.getAngle());
} }
canvas.setPaint(colour);
canvas.fill(transformation.createTransformedShape(shape));
canvas.setPaint(Color.black);
Stroke oldStroke = canvas.getStroke(); Stroke oldStroke = canvas.getStroke();
canvas.setStroke(new BasicStroke(borderWidth)); canvas.setStroke(new BasicStroke(borderWidth));
canvas.draw(shape); canvas.draw(transformation.createTransformedShape(shape));
canvas.setStroke(oldStroke); 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 ...@@ -35,7 +35,7 @@ public class ShapeCoronaBuilder extends BaseShapeCoronaBuilder<ShapeCoronaBuilde
* @param centre * @param centre
* The centre of the corona, usually the centre of the handle. * The centre of the corona, usually the centre of the handle.
*/ */
protected ShapeCoronaBuilder(Point centre) { public ShapeCoronaBuilder(Point centre) {
super(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