Ink shapes are user-drawn shapes which can include lines and curves.
DsWord supports ink shapes which can be added by using Add and Insert methods of InkShapeCollection class. You can also access the previous or next ink shapes and get the xml document containing ink shape's content by using various methods provided by InkShape class.
In DsWord, you can create a new ink shape by providing an xml document which describes ink drawing or load a document with predefined ink shapes.
To modify an existing ink shape in a document:
C# |
Copy Code |
---|---|
var doc = new GcWordDocument(); //Load doc containing ink shape doc.Load("ink.docx"); if (doc.Body.InkShapes.Count == 0) return; //Access first ink shape var ink = doc.Body.InkShapes.First; //Modify Ink shape ink.BlackWhiteMode = BlackWhiteMode.LightGray; ink.AlternativeText = "xyz"; ink.Rotation.HorizontalFlip = true; ink.Title = "ink shape title"; ink.Size.Height.Value = 300; ink.Size.Width.Value = 100; //Save document doc.Save("InkShapeModified.docx"); |