void Clear()

robot_2Generated
code_blocksInput

Description

The Clear method is a member of the Editor.GraphicsLine class. It is used to remove all points and segments from the current graphics line, effectively resetting it to an empty state. This method is useful when you need to start drawing a new line without creating a new GraphicsLine object.

Usage

To use the Clear method, simply call it on an instance of the GraphicsLine class. This will clear all existing points and segments from the line, allowing you to start fresh.

Example usage:

GraphicsLine myLine = new GraphicsLine();
// Add some points to the line
myLine.MoveTo(new Vector2(0, 0));
myLine.LineTo(new Vector2(10, 10));

// Clear the line
myLine.Clear();
// Now myLine is empty and ready for new points

Example

GraphicsLine myLine = new GraphicsLine();
// Add some points to the line
myLine.MoveTo(new Vector2(0, 0));
myLine.LineTo(new Vector2(10, 10));

// Clear the line
myLine.Clear();
// Now myLine is empty and ready for new points