Fix bugs: stroke condition, logging typo, NPE in clone(), mutable bounds
This commit is contained in:
@@ -67,7 +67,9 @@ public class STriangle extends AbstractShape {
|
||||
@Override
|
||||
public Shape clone() {
|
||||
var color = (ColorAttributes) getAttributes(ColorAttributes.ID);
|
||||
return STriangle.create(super.getBounds().x, super.getBounds().y, super.getBounds().height, color.strokedColor, color.filledColor);
|
||||
Color strokeColor = color != null ? color.strokedColor : Color.BLACK;
|
||||
Color fillColor = color != null ? color.filledColor : Color.BLACK;
|
||||
return STriangle.create(super.getBounds().x, super.getBounds().y, super.getBounds().height, fillColor, strokeColor);
|
||||
}
|
||||
|
||||
public static STriangle create(int x, int y, int size, Color filledColor, Color strokedColor) {
|
||||
|
||||
Reference in New Issue
Block a user