/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include /** * Return the alignment for a specific access, really this doesn't need to be * used. Does not support the ALIGN_SIZE_RATIO alignment method. * * @param align Alignment flags to get. * @param containerSize Size of the container. * @param childSize Size of the child. * @param childPos Currently unused. * @param outSize Pointer to a float for the size output. * @param outPos Poitner to a float for the position output. */ void alignmentGetAxis( uint8_t align, float containerSize, float childSize, float childPos, float *outSize, float *outPos ); /** * Get the alignment set for a given set of options. * * @param alignX Alignment options for the X axis. * @param alignY Alignment options for the Y axis. * @param containerWidth Width of the container. * @param containerHeight Height of the container. * @param childWidth Width of the child * @param childHeight Height of the child. * @param childX Currently unused. * @param childY Currently unused. * @return The alignment calculation. */ align_t alignmentGet( uint8_t alignX, uint8_t alignY, float containerWidth, float containerHeight, float childWidth, float childHeight, float childX, float childY );