private static final long serialVersionUID = -2641639101400236719L;
private DistrictNetworkVertex vertex;
- private static final double left = -0.5;
- private static final double top = -0.5;
- private static final double width = 1;
- private static final double height = 1;
+ private static final double left = -0.25;
+ private static final double top = -0.25;
+ private static final double width = 0.5;
+ private static final double height = 0.5;
private static final Rectangle2D NORMAL = new Rectangle2D.Double(left, top, width, height);
private static final Rectangle2D HOVERED = new Rectangle2D.Double(left * 3, top * 3, width * 3, height * 3);
private Rectangle2D bounds;
+ private Double strokee;
+
@Override
public void init() {
setZIndex(2);
double scaleRecip = 1;
if (scaleStroke) {
double scale = GeometryUtils.getScale(g2d.getTransform());
-
+ double str;
+ if (strokee != null)
+ str = strokee;
+ else
+ str = 1.0;
//System.out.println("scale: " + scale);
scaleRecip = 1.0 / scale;
}
private static Point2D calculatePoint2D(DistrictNetworkVertex vertex) {
Point2D point= vertex.getPoint();
double x = ModelledCRS.longitudeToX(point.getX());
- double y = ModelledCRS.latitudeToY(point.getY());
+ double y = ModelledCRS.latitudeToY(-point.getY()); // Inverse because Simantics Diagram is inverted
// Apply the scaling
Point2D res = new Point2D.Double(x, y);
return color;
}
+ @PropertySetter(value = "stroke")
+ public void setStroke(Double stroke) {
+ this.strokee = stroke / 10;
+ }
}