Calculate 3 Image Sizes For Graphics App
Hello math forum citizens and inhabitants. This is my first post in this forum. Thank you for letting me post here. I struggle with math equations, and any help with this one would be greatly appreciated.
I made a fun little graphics program that creates rounded corner web page background images. When a rounded corner image is created, I chop that image into 3 slices. The first image is cut across the top of the image just below the top 2 rounded corners. I cut the second image across the bottom of the image just above the bottom 2 rounded corners. The third image is the squared corner image left between the first 2 images. I use this middle image as the background for a CSS div that is ever-expanding with web page content.
I need to find an equation, probably based on percentages, to determine the ideal height for each image depending upon the corner radius and height of the original image. The third (middle image) should be larger, and the top and bottom images should be cut just before their corner radii begin.
Thanks in advance for any assistance.