ofxPiMapper fixed for C++17 & oF 12.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
962 B

#ifndef H_OFX_TEXTURE_EDITOR
#define H_OFX_TEXTURE_EDITOR
#include "ofEvents.h"
#include "ofxBaseSurface.h"
#include "ofxCircleJoint.h"
class ofxTextureEditor
{
public:
ofxTextureEditor();
~ofxTextureEditor();
void registerAppEvents();
void unregisterAppEvents();
void registerKeyEvents();
void unregisterKeyEvents();
void enable();
void disable();
void update(ofEventArgs& args);
void keyPressed(ofKeyEventArgs& args);
void keyReleased(ofKeyEventArgs& args);
void draw();
void drawJoints();
void setSurface(ofxBaseSurface* newSurface);
void clear();
void createJoints();
void clearJoints();
void unselectAllJoints();
void moveTexCoords(ofVec2f by);
void stopDragJoints();
void moveSelection(ofVec2f by);
ofxCircleJoint* hitTestJoints(ofVec2f pos);
private:
ofxBaseSurface* surface;
vector<ofxCircleJoint*> joints;
bool bShiftKeyDown;
};
#endif