protected lookup(port: IPort, type: Class): any {
if (type === IShapeGeometry.$class) {
const bounds = this.getPortBounds(port)
const PortShapeGeometry = class extends BaseClass(IShapeGeometry) {
getIntersection(inner: Point, outer: Point): Point | null {
return GeomUtilities.findEllipseLineIntersection(bounds, inner, outer)
}
getOutline(): GeneralPath | null {
const path = new GeneralPath()
path.appendEllipse(bounds, false)
return path
}
isInside(location: Point): boolean {
return GeomUtilities.ellipseContains(bounds, location, 0)
}
}
return new PortShapeGeometry()
}