@halley wrote:
Hello,
How can I create custom shapes which consists of other shapes? For eg. we are trying to create the following, however the ellipse border is overlapping the text.
Ellipse in rectangleIdeally, this is what it should like
indent preformatted text by 4 spaces
function getCustomShapes() { go.Shape.defineFigureGenerator("EllipseInRectangle", function (shape, w, h) { var geo = new go.Geometry(); geo.add(new go.PathFigure(0,0) .add(new go.PathSegment(go.PathSegment.Line, w, 0)) .add(new go.PathSegment(go.PathSegment.Line, w, h)) .add(new go.PathSegment(go.PathSegment.Line, 0, h)) .add(new go.PathSegment(go.PathSegment.Line, 0, 0)) ); geo.add(new go.PathFigure(0,0) .add(new go.PathSegment(go.PathSegment.Arc,0,360,w/2,h/2,w/2,h/2)) ); return geo; }); }
Posts: 6
Participants: 2