setBounds

protected fun setBounds(item: Carousel.PresentedItem, viewPort: Size, adjust: (Rectangle) -> Rectangle = { it })(source)

Sets the bounds of item based on the result of using. This method tries to handle cases where the item being constrained adjusts its size after a bounds change. This would be the case for an item that maintains an aspect ratio for example. The calculation is run a second time in these cases to allow any constraint to adjust as needed.

Parameters

item

being presented

viewPort

of the Carousel

adjust

that lets the subclass modify the bounds before it is set