/// <summary> /// Adds a shape to the display list. /// </summary> /// <param name="shape">Shape object to add.</param> /// <returns>The shape object added.</returns> public Shape AddShape( Shape shape ) { Shapes.Add( shape ); return shape; }
/// <summary> /// Removes a shape from the display list. /// </summary> /// <param name="shape">Shape object to remove.</param> /// <returns>The shape object removed.</returns> public Shape RemoveShape( Shape shape ) { Shapes.Remove( shape ); return shape; }
private static int SortZIndex( Shape a, Shape b ) { return a.ZIndex.CompareTo( b.ZIndex ); }