Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created July 24, 2020 12:29
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/e12a24fd34344a8b237a119e82a03f68 to your computer and use it in GitHub Desktop.
Save bjoerntx/e12a24fd34344a8b237a119e82a03f68 to your computer and use it in GitHub Desktop.
// 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;
if (textControl1.Drawings.GetActivatedItem() != null)
{
// add the shape to the drawing control
((TXDrawingControl)textControl1.Drawings.GetActivatedItem().Drawing).Shapes.Add(shape);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment