// centre of line PointPair pt = new PointPair(0.5 * (ptA.X + ptB.X), 0.5 * (ptA.Y + ptB.Y)); TextObj text = new TextObj("desc", pt.X, pt.Y, CoordType.AxisXYScale, AlignH.Center, AlignV.Center); text.ZOrder = ZOrder.A_InFront; double dX = ptB.X - ptA.X; double dY = ptB.Y - ptA.Y; float alfa = (float)(Math.Atan2(dY, dX) * (180.0 / Math.PI)); text.FontSpec.Angle = alfa; graph.GraphPane.GraphObjList.Add(text);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)