如何绘制固定参数绘圆形云线标注?
MxDraw网页开发|黄洪辉|2018-05-29 16:12
-
回答:
function DoCloudCircleCommentFix() { var comment = mxOcx.NewEntity("IMxDrawComment"); comment.Text = "测试批注文字"; comment.TextHeight = 50; var frstPt = mxOcx.NewPoint(); frstPt.x = -200; frstPt.y = -200; var basepos = mxOcx.NewPoint(); basepos.x = 0; basepos.y = 10; var pos = mxOcx.NewPoint(); pos.x = 200; pos.y = 300; comment.BasePoint = basepos; comment.Position = pos; comment.ShapRadius = 50; comment.BoundingBoxType = 5; comment.ArrowType = 2; var points = mxOcx.NewComObject("IMxDrawPoints"); points.Add2(frstPt); points.Add2(basepos); comment.Bounding = points; var comobj = mxOcx.ObjectIdToObject(mxOcx. (comment)); comobj.TextStyle = "MyCommentFont"; mxOcx.ZoomAll(); }