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