In Diagramming.WinForms 6.6, I am encountering a null ref error (attached) when I specify both OutlineFormula and TextArea properties of ShapeNode.
_baseLabelArea = new ElementTemplate[] { new LineTemplate(10, 10, 90, 10), new LineTemplate(90, 10, 90, 90), new LineTemplate(90, 90, 10, 90), new LineTemplate(10, 90, 10, 10) };
string script = $@" apOffset = {PART_ATTACH_POINT_OFFSET}; apDepth = {PART_ATTACH_POINT_DEPTH}; bump = 2; apLong = (Height) - (apOffset * 2); vapOffset = apLong + (apOffset * 2); MoveTo(apOffset, 0); ArcTo(0, apOffset - bump, false, true, apOffset, apOffset); LineTo(0, apOffset); LineTo(1, apOffset); LineTo(apDepth + 1, Height / 2); LineTo(1, Height - apOffset); LineTo(0, Height - apOffset); LineTo(0, Height - apOffset + bump); ArcTo(apOffset, Height, false, true, apOffset, apOffset); LineTo(Width - vapOffset, Height); LineTo(Width - vapOffset + (apLong / 2), Height + apDepth); LineTo(Width - vapOffset + apLong, Height); LineTo(Width - apOffset, Height); ArcTo(Width, Height - apOffset, false, true, apOffset, apOffset); LineTo(Width + apDepth, Height / 2); LineTo(Width, apOffset); ArcTo(Width - apOffset, 0, false, true, apOffset, apOffset); LineTo(apOffset, 0);"; _baseShape = new Shape(script, "Part"); _baseShape.TextArea = _baseLabelArea;
If I do not specify TextArea I see no error, or if I use a ElementTemplate instead of OutlineFormula, I see no error.
|