#pragma once #include "ofMain.h" namespace VariableEditor { struct ArtboardProps { std::array backgroundColor = {1.0, 1.0, 1.0, 1.0}; int x; int y; int width; int height; float zoom; float pixelDensity = 1.0; }; class Artboard { int makeEven(float n){ n = n + 0.5 - (n < 0); int nr = int(n); return nr - nr % 2; } public: void setup(); void setProps(const ArtboardProps & props); ArtboardProps getProps(); void setPosition(float x, float y, float z); glm::ivec2 getShape(); void begin(); void end(); void draw(); const ofFbo & getFbo(); private: ArtboardProps props; ofFboSettings fboSettings; ofFbo fbo; glm::vec3 position; }; }