#pragma once
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed (int key);
ofScaleMode scaleMode;
ofAspectRatioMode aspectRatioMode;
ofAlignHorz target_hAlign;
ofAlignVert target_vAlign;
ofAlignHorz subject_hAlign;
ofAlignVert subject_vAlign;
ofRectangle targetRect;
ofRectangle subjectRect;
ofRectangle workingSubjectRect;
ofColor targetColor;
ofColor subjectColor;
bool bUseImage;
bool isRectScaling;
bool isScaling;
bool isAligning;
ofImage img;
void makeNewSubject();
void makeNewTarget();
void drawAlignRect(const ofRectangle& rect,
const ofColor& color,
ofAlignHorz hAlign,
ofAlignVert vAlign,
bool useImage);
void drawHorzAlignMark(const ofRectangle& rect, const ofColor& color, ofAlignHorz hAlign);
void drawVertAlignMark(const ofRectangle& rect, const ofColor& color, ofAlignVert vAlign);
ofScaleMode getNextScaleMode(ofScaleMode mode);
ofAspectRatioMode getNextAspectRatioMode(ofAspectRatioMode mode);
ofAlignHorz getNextHorzAlign(ofAlignHorz hAlign);
ofAlignVert getNextVertAlign(ofAlignVert vAlign);
string getHorzAlignString(ofAlignHorz hAlign);
string getVertAlignString(ofAlignVert vAlign);
string getAspectRatioModeString(ofAspectRatioMode mode);
string getScaleModeString(ofScaleMode mode);
};
Comments