• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class MotionPath

Represents a motion path — a sequence of MotionCmdPath commands that describe the trajectory along which a shape moves during an animation.

Maps to the p:path element within p:animMotion in the OOXML timing model.

Inheritance
object
MotionPath
Implements
IMotionPath
IEnumerable<IMotionCmdPath>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Presentation.Animation
Assembly: DRIT.Presentation.dll
Syntax
public class MotionPath : IMotionPath, IEnumerable<IMotionCmdPath>, IEnumerable

Constructors

MotionPath()

Initializes a new empty MotionPath.

Declaration
public MotionPath()

MotionPath(IEnumerable<MotionCmdPath>)

Initializes a new MotionPath with the specified commands.

Declaration
public MotionPath(IEnumerable<MotionCmdPath> commands)
Parameters
Type Name Description
IEnumerable<MotionCmdPath> commands

Properties

Count

Gets the number of commands in the path.

Declaration
public int Count { get; }
Property Value
Type Description
int

this[int]

Gets the command at the specified index.

Declaration
public MotionCmdPath this[int index] { get; }
Parameters
Type Name Description
int index
Property Value
Type Description
MotionCmdPath

Methods

Add(MotionCmdPath)

Adds the specified command to the path.

Declaration
public void Add(MotionCmdPath command)
Parameters
Type Name Description
MotionCmdPath command

Clear()

Removes all commands from the path.

Declaration
public void Clear()

Close()

Adds a CloseLoop command to the path, closing the current sub-path back to its starting point.

Declaration
public MotionCmdPath Close()
Returns
Type Description
MotionCmdPath

CurveTo(PointF, PointF, PointF, bool)

Adds a CurveTo command (cubic Bézier) to the path. The three points are control1, control2, and endpoint.

Declaration
public MotionCmdPath CurveTo(PointF control1, PointF control2, PointF endPoint, bool isRelative = false)
Parameters
Type Name Description
PointF control1
PointF control2
PointF endPoint
bool isRelative
Returns
Type Description
MotionCmdPath

End()

Adds an End command to the path, terminating the path.

Declaration
public MotionCmdPath End()
Returns
Type Description
MotionCmdPath

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<IMotionCmdPath> GetEnumerator()
Returns
Type Description
IEnumerator<IMotionCmdPath>

An enumerator that can be used to iterate through the collection.

Insert(int, MotionCmdPath)

Inserts a command at the specified index.

Declaration
public void Insert(int index, MotionCmdPath command)
Parameters
Type Name Description
int index
MotionCmdPath command

LineTo(PointF, bool)

Adds a LineTo command to the path.

Declaration
public MotionCmdPath LineTo(PointF point, bool isRelative = false)
Parameters
Type Name Description
PointF point
bool isRelative
Returns
Type Description
MotionCmdPath

LineTo(float, float, bool)

Adds a LineTo command with explicit x/y coordinates.

Declaration
public MotionCmdPath LineTo(float x, float y, bool isRelative = false)
Parameters
Type Name Description
float x
float y
bool isRelative
Returns
Type Description
MotionCmdPath

MoveTo(PointF, bool)

Adds a MoveTo command to the path.

Declaration
public MotionCmdPath MoveTo(PointF point, bool isRelative = false)
Parameters
Type Name Description
PointF point
bool isRelative
Returns
Type Description
MotionCmdPath

MoveTo(float, float, bool)

Adds a MoveTo command with explicit x/y coordinates.

Declaration
public MotionCmdPath MoveTo(float x, float y, bool isRelative = false)
Parameters
Type Name Description
float x
float y
bool isRelative
Returns
Type Description
MotionCmdPath

Remove(MotionCmdPath)

Removes the specified command.

Declaration
public bool Remove(MotionCmdPath command)
Parameters
Type Name Description
MotionCmdPath command
Returns
Type Description
bool

RemoveAt(int)

Removes the command at the specified index.

Declaration
public void RemoveAt(int index)
Parameters
Type Name Description
int index

Implements

IMotionPath
IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX