protected Element(Type type, string key, float size, RectPadding padding, bool use) { ElementType = type; Key = key; Size = size; this.padding = padding; Use = use; }
public Group(Type type, string key, Orientation orientation, float size, RectPadding padding, Element[] elements, bool use) : base(type, key, size, padding, use) { if (padding != null) { if (orientation == Orientation.Horizontal) { Size -= base.padding.offset.horizontal; } else { Size -= base.padding.offset.vertical; } } Orientation = orientation; Elements = elements; }
public AutomaticGroup(Orientation orientation, RectPadding padding, bool use, params Element[] elements) : base(Type.Fixed, string.Empty, orientation, 0, padding, elements, use) { Size += GetSize(orientation, elements); }
public AutomaticGroup(string key, Orientation orientation, RectPadding padding, params Element[] elements) : base(Type.Fixed, key, orientation, 0, padding, elements, true) { Size += GetSize(orientation, elements); }
public static Rect Expand(this Rect rect, RectPadding padding) { return(ExtendedRect.Expand(rect, padding)); }
public static Rect ExpandRect(Rect rect, RectPadding padding) { return(padding.Apply(rect)); }