// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System.Runtime.CompilerServices;
namespace SixLabors.Fonts {
///
/// Extensions to .
///
public static class LayoutModeExtensions
{
///
/// Gets a value indicating whether the layout mode is horizontal.
///
/// The layout mode.
/// The .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsHorizontal(this LayoutMode mode)
=> mode is LayoutMode.HorizontalTopBottom or LayoutMode.HorizontalBottomTop;
///
/// Gets a value indicating whether the layout mode is vertical.
///
/// The layout mode.
/// The .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsVertical(this LayoutMode mode)
=> mode is LayoutMode.VerticalLeftRight or LayoutMode.VerticalRightLeft;
///
/// Gets a value indicating whether the layout mode is vertical-mixed only.
///
/// The layout mode.
/// The .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsVerticalMixed(this LayoutMode mode)
=> mode is LayoutMode.VerticalMixedLeftRight or LayoutMode.VerticalMixedRightLeft;
}
}