public final float[] color;
public final StrokeType strokeType;
public final Stroke stroke;
+ public final Double branchPointRadius;
public final Double rounding;
- public ConnectionVisuals(float[] color, StrokeType strokeType, Stroke stroke, Double rounding) {
+ public ConnectionVisuals(float[] color, StrokeType strokeType, Stroke stroke, Double branchPointRadius, Double rounding) {
if (color != null && color.length < 3)
throw new IllegalArgumentException("colors must have at least 3 components (rgb), got " + color.length);
this.color = color;
this.strokeType = strokeType;
this.stroke = stroke;
+ this.branchPointRadius = branchPointRadius;
this.rounding = rounding;
}
public int hashCode() {
final int prime = 31;
int result = 1;
+ result = prime * result + ((branchPointRadius == null) ? 0 : branchPointRadius.hashCode());
result = prime * result + Arrays.hashCode(color);
result = prime * result + ((rounding == null) ? 0 : rounding.hashCode());
result = prime * result + ((stroke == null) ? 0 : stroke.hashCode());
if (getClass() != obj.getClass())
return false;
ConnectionVisuals other = (ConnectionVisuals) obj;
+ if (branchPointRadius == null) {
+ if (other.branchPointRadius != null)
+ return false;
+ } else if (!branchPointRadius.equals(other.branchPointRadius))
+ return false;
if (!Arrays.equals(color, other.color))
return false;
if (rounding == null) {
return false;
return true;
}
-
}
StrokeType strokeType = toStrokeType(g.getPossibleObject(structuralConnectionType, g2d.HasStrokeType));
Stroke stroke = G2DUtils.getStroke(g, g.getPossibleObject(structuralConnectionType, g2d.HasStroke));
+ Double branchPointRadius = g.getPossibleRelatedValue(structuralConnectionType, g2d.HasBranchPointRadius, Bindings.DOUBLE);
Double rounding = g.getPossibleRelatedValue(structuralConnectionType, g2d.HasRounding, Bindings.DOUBLE);
- return new ConnectionVisuals(color, strokeType, stroke, rounding);
+ return new ConnectionVisuals(color, strokeType, stroke, branchPointRadius, rounding);
}
StrokeType toStrokeType(Resource strokeType) {
G2D.StrokeType.Nonscaling : G2D.StrokeType
G2D.HasRounding <R L0.HasProperty : L0.FunctionalRelation
--> L0.Double
+G2D.HasBranchPointRadius <R L0.HasProperty : L0.FunctionalRelation
+ --> L0.Double
G2D.LineEnd <T L0.Property
@L0.optionalProperty G2D.HasLineEndStyle
@L0.singleProperty G2D.HasSize