public static Rect GetAspectRect(float aspect, GUIStyle style, params GUILayoutOption[] options) { return(GUILayoutUtility.DoGetAspectRect(aspect, GUIStyle.none, options)); }
/// <summary> /// <para>Reserve layout space for a rectangle with a specific aspect ratio.</para> /// </summary> /// <param name="aspect">The aspect ratio of the element (width / height).</param> /// <param name="style">An optional style. If specified, the style's padding value will be added to the sizes of the returned rectangle & the style's margin values will be used for spacing.</param> /// <param name="options">An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the style.<br> /// See Also: GUILayout.Width, GUILayout.Height, GUILayout.MinWidth, GUILayout.MaxWidth, GUILayout.MinHeight, /// GUILayout.MaxHeight, GUILayout.ExpandWidth, GUILayout.ExpandHeight.</param> /// <returns> /// <para>The rect for the control.</para> /// </returns> public static Rect GetAspectRect(float aspect) { return(GUILayoutUtility.DoGetAspectRect(aspect, GUIStyle.none, (GUILayoutOption[])null)); }
public static Rect GetAspectRect(float aspect, GUIStyle style) { return(GUILayoutUtility.DoGetAspectRect(aspect, style, null)); }
public static Rect GetAspectRect(float aspect) { return(GUILayoutUtility.DoGetAspectRect(aspect, null)); }