Write a C++ program using the raylib library that creates a resizable window and displays a background.png image in it. The image displayed on the screen should NOT be scaled to the size of the window, and loaded and displayed in real size. The aspect ratio of the original image should be the same as the aspect ratio of the image in pixels, this is very important. The camera should be centered on the image. The image extension should be .png. Add a white fill to this window. The image should be drawn on top of the fill.  This application should have a zoom in and zoom out function when scrolling the mouse wheel up and down respectively. The maximum zoom should be 20.0 and the minimum 0.20. The distance should also be centered on the center of the image. And the approximation should be centered on the cursor position. Zooming in and out should only work when the mouse wheel is spinning, when the wheel stops spinning, then zooming in and out stops. When you turn the mouse wheel forward, the camera only gets closer, and when you turn the wheel down, it only moves away, you also need to make a smoother approach and distance and not increase its speed. The camera's zoom center is the cursor position. When scrolling the mouse wheel up, the camera should move closer to the cursor. The program should also be able to move the camera with the right mouse button pressed in all directions. The camera should move at the speed of the cursor with the right mouse button held down. Do not make a sharp movement of the camera when clicking with the mouse, make it smooth. Don't forget to initialize Camera2D itself. Write this code checking all identifiers for correctness. Initialize all variables in the correct namespace. Use only the constructors that exist in raylib. Write the code strictly with all the above requirements. At the end of the code, do not forget to add a memory cleanup when closing the program on the cross. Write the full version of this code without the cut-out code blocks. If necessary, add the necessary header files. Write code with all the functionality that I described above, use the correct syntax of c++ and raylib. Write this code without using the clamp(), Vector2Scale(), Vector2subtract, Vector2Normalize, Vector2Length, Vector2Scale, Vector2Add functions, you can use alternatives to these functions.
Add to this code a separate function called drawProvince, which will draw a red vector circle with a radius of 0.5f on top of the pixel of the image on which the left mouse button is clicked. The circle must have the length and width of the pixel of the background image on top of which it was placed. The circle should remain displayed after passing the main cycle and should be able to. The code should have a function to delete the last circle by pressing the backspace key, if the last circle is deleted, then by pressing again you can delete the penultimate one and so on. Use the necessary header files for this if they are not included in the source code.
Add to the drawProvince function, shown above by me, the function of drawing a polygon displayed with a random fill color when drawing mode is enabled on the "D" button. The polygon should have a 2 pixel thick outline of the screen when the 'S' key is pressed. It is the screen and not the image, like the circles. Every time a new point is placed, a circle is drawn in its place. The polygon view is updated and it is drawn with a new point. The last point of the polygon is also deleted using the backspace key. Remember - polygons must be visible, and must have a random fill color and a red outline color. When the Enter key is pressed, the code receives the coordinates of each point of the polygon and writes it to a new file that needs to be created with a name equal to the count of the created polygons, i.e. 1, 2, 3 and so on. There should be three lines in this file with the name of the polygon number. The first line is the number of the polygon in the account, the second line is the coordinates of the polygon points in X, separated by a comma with a space, and the second line is the coordinates of the points in Y, also separated by a comma with a space (, ). Use the necessary header files for this. Don't forget to add the necessary raylib header files located on the path "/home/danya/raylib/src/".