Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active July 24, 2020 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/7147b2769e4173f86289ab6ad9d42499 to your computer and use it in GitHub Desktop.
Save bjoerntx/7147b2769e4173f86289ab6ad9d42499 to your computer and use it in GitHub Desktop.
// create a drawing control that contains the shape(s)
TXTextControl.Drawing.TXDrawingControl drawingGroup =
new TXTextControl.Drawing.TXDrawingControl(3000, 3000);
// create a new donut shape
TXTextControl.Drawing.Shape donut =
new TXTextControl.Drawing.Shape(TXTextControl.Drawing.ShapeType.Donut) {
Location = new Point(100, 100),
Size = new Size(500,500)
};
TXTextControl.Drawing.Shape diamond =
new TXTextControl.Drawing.Shape(TXTextControl.Drawing.ShapeType.Diamond);
// add the shape to the drawing control
drawingGroup.Shapes.Add(donut);
drawingGroup.Shapes.Add(diamond);
// create a new drawing frame object from the created drawing control
TXTextControl.DataVisualization.DrawingFrame frame =
new TXTextControl.DataVisualization.DrawingFrame(drawingGroup);
// add the frame to the document
textControl1.Drawings.Add(
frame,
textControl1.InputPosition.Location,
TXTextControl.FrameInsertionMode.DisplaceText);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment