I need to center a rectangle inside another rectangle. I know the width and height of the parent rectangle, and I know the width and height of the child rectangle that needs to be centered. I need to find the x and y coordinate for the top left corner of the rectangle in the centered position. I don't know the current position of the child recatangle, I just need know the x y coordinate so I can place it in the center.
Please see the image below for further details.
What would be the correct formula to do this?