See more
Next lets design our API, we want a ratio provided in terms of X and Y axis which we will then use the current width to compute, lets…