/// <summary> /// Copies the specified BoxEdges instance /// </summary> /// <param name="original"></param> public BoxEdges(BoxEdges original) { this.top = original.top; this.bottom = original.bottom; this.right = original.right; this.left = original.left; }
/// <summary> /// Copies the specified BoxEdges instance /// </summary> /// <param name="original"></param> public BoxEdges(BoxEdges original) { this.top = original.top; this.bottom = original.bottom; this.right = original.right; this.left = original.left; }
/// <summary> /// Copies the specified BoxEdges instance /// </summary> /// <param name="original"></param> public BoxEdges(BoxEdges original) { Top = original.Top; Bottom = original.Bottom; Right = original.Right; Left = original.Left; }
public static BoxEdges Parse(string text, BoxEdges fallbackValue) { double[] coords = ParseUtils.ParseList <double>(text, 0, 1, 4); if (coords == null) { return(fallbackValue); //Failed to parse, or was empty } if (coords.Length == 1) { return(new BoxEdges(coords[0])); } if (coords.Length == 4) { return(new BoxEdges(coords[0], coords[1], coords[2], coords[3])); } return(fallbackValue); }
public BoxEdges SetTop(double top) { BoxEdges b = new BoxEdges(this); b.top = top; return b; }
public BoxEdges SetRight(double right) { BoxEdges b = new BoxEdges(this); b.right = right; return b; }
public BoxEdges SetLeft(double left) { BoxEdges b = new BoxEdges(this); b.left = left; return b; }
public BoxEdges SetBottom(double bottom) { BoxEdges b = new BoxEdges(this); b.bottom = bottom; return b; }
/// <summary> /// Sets the width of all edges, returning a new instance /// </summary> /// <param name="all"></param> /// <returns></returns> public BoxEdges SetAll(double all) { BoxEdges b = new BoxEdges(this); b.all = all; return b; }
public static BoxEdges Parse(string text, BoxEdges fallbackValue) { double[] coords = ParseUtils.ParseList<double>(text, 0, 1, 4); if (coords == null) return fallbackValue; //Failed to parse, or was empty if (coords.Length == 1) return new BoxEdges(coords[0]); if (coords.Length == 4) return new BoxEdges(coords[0], coords[1], coords[2], coords[3]); return fallbackValue; }
public BoxEdges SetLeft(double left) { BoxEdges b = new BoxEdges(this); b.left = left; return(b); }
public BoxEdges SetTop(double top) { BoxEdges b = new BoxEdges(this); b.top = top; return(b); }
/// <summary> /// Sets the width of all edges, returning a new instance /// </summary> /// <param name="all"></param> /// <returns></returns> public BoxEdges SetAll(double all) { BoxEdges b = new BoxEdges(this); b.all = all; return(b); }
public BoxEdges SetBottom(double bottom) { BoxEdges b = new BoxEdges(this); b.bottom = bottom; return(b); }
public BoxEdges SetRight(double right) { BoxEdges b = new BoxEdges(this); b.right = right; return(b); }