Nikola Petrov 2b2dfe751e Simplify
calculation of canvas position based on the cursor position and expected rotation
2024-04-01 22:56:57 +02:00

27 lines
412 B
C++

#include <vector>
#include "canvas/Canvas.hpp"
class App
{
public:
App() = default;
~App() = default;
void init(int screenWidth, int screenHeight);
void update();
void draw();
void deinit();
private:
int pos = 0;
int screenWidth, screenHeight;
std::vector<Canvas> canvases;
float rotation = 0.0f;
Rectangle destB;
Rectangle destA;
Vector2 mouseStart;
float len;
float ofset;
};