Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active July 24, 2020 12:02
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/a1c24c1b0a8d3e63e60fdfc4aa855ea4 to your computer and use it in GitHub Desktop.
Save bjoerntx/a1c24c1b0a8d3e63e60fdfc4aa855ea4 to your computer and use it in GitHub Desktop.
// create a drawing control that contains the shape(s)
TXTextControl.Drawing.TXDrawingControl drawing =
new TXTextControl.Drawing.TXDrawingControl(3000, 3000);
// create a new donut shape
TXTextControl.Drawing.Shape shape =
new TXTextControl.Drawing.Shape(TXTextControl.Drawing.ShapeType.Donut);
// set the color and border width
shape.ShapeFill.Color = Color.Red;
shape.ShapeOutline.Color = Color.Yellow;
shape.ShapeOutline.Width = 200;
// add the shape to the drawing control
drawing.Shapes.Add(
shape,
TXTextControl.Drawing.ShapeCollection.AddStyle.Fill);
// create a new drawing frame object from the created drawing control
TXTextControl.DataVisualization.DrawingFrame frame =
new TXTextControl.DataVisualization.DrawingFrame(drawing);
// add the frame to the document
textControl1.Drawings.Add(frame, -1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment