I greet you.
There is a task on the coordinates of two points to draw a segment in the document. Method
ShapeObject shape = para.AppendShape ((float) (mx2-mx1), (float) (my2-my1), ShapeType.Line);
shape.HorizontalOrigin = HorizontalOrigin.Page;
shape.HorizontalPosition = (float) mx1;
shape.VerticalOrigin = VerticalOrigin.Page;
shape.VerticalPosition = (float) my1;
shape.LineStyle = ShapeLineStyle.Single;
not quite satisfied as it fits the line into a rectangle with the base coordinate of the upper left.
Tell me how can this be done?
I did it by standard means:
Word.Shape shape1 = doc.Shapes.AddLine ((float) sx, (float) sy, (float) ex, (float) ey, ref missing);
shape1.Select ();
shape1.Line.EndArrowheadStyle = headStyle;
shape1.Line.DashStyle = lineType;
shape1.Line.Weight = (float) Weight;
shape1.Line.ForeColor.RGB = ColorTranslator.ToOle (color);
Thank!