I'm trying to highlight a view by grabbing the layoutCoordinate from a Box using .onGloballyPositioned. I receive the following coordinates:
val viewLeft = layoutCoordinates.boundsInWindow().left
val viewTop = layoutCoordinates.boundsInWindow().top
val viewRight = layoutCoordinates.boundsInWindow().right
val viewBottom = layoutCoordinates.boundsInWindow().bottom
When I try to create a highlight with this code, it is always off by a bit:
canvas.drawRoundRect(
viewLeft,
viewTop,
viewRight,
viewBottom,
cornerRadius,
cornerRadius,
paint)
This is the result that I am getting:
Any idea what I may be doing incorrect? Thanks!

