From ec4a59ed5dc4bd235c04636d311e021a7751b882 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sat, 1 Oct 2022 11:43:36 +0100 Subject: bug squashed --- passadesgui/src/ofApp.cpp | 66 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) (limited to 'passadesgui/src/ofApp.cpp') diff --git a/passadesgui/src/ofApp.cpp b/passadesgui/src/ofApp.cpp index e8b8a91..babc284 100644 --- a/passadesgui/src/ofApp.cpp +++ b/passadesgui/src/ofApp.cpp @@ -1205,19 +1205,41 @@ void ofApp::dragEvent(ofDragInfo dragInfo){ std::stringstream strm; + ofVec2f offset; + bool useFill=false; + if (filename.find("WMF") outlines= path.getOutline(); + + + //if (path.getFillColor().getSaturation()==0){ + // useFill=false; //hard to get reliable results from this + //} + for (auto& outline:outlines){ strm << outline.size() << "->"; outline.simplify(contour_simplify); + outline.translate(offset); + //outline.rotateDeg(180,glm::vec3(0,0,0)); strm << outline.size() << " "; - segmenters.push_back(lineSegmenter(outline)); - //segmenters.push_back(colourLineSegmenter(outline,path.getStrokeColor())); + segmenters.push_back(colourLineSegmenter(outline,useFill?path.getFillColor():path.getStrokeColor())); shape_selection_durations.push_back(0.0f); } strm << " , "; @@ -1409,5 +1431,45 @@ void ofApp::newMidiMessage(ofxMidiMessage& msg) { //fader segmenter_speed=(((float)msg.value)/64.0f)-1.0f; } + + //=============================================== + offset=6; + + if (msg.channel==1&&msg.control==1+offset){ + //pot + } + if (msg.channel==1&&msg.control==33+offset){ + //pot button + } + if (msg.channel==1&&msg.control==65+offset){ + //top button + } + if (msg.channel==1&&msg.control==73+offset){ + //bottom button + } + if (msg.channel==1&&msg.control==81+offset){ + //fader + segmenter_length=(((float)msg.value)/128.0f); + } + + //=============================================== + offset=6; + + if (msg.channel==1&&msg.control==1+offset){ + //pot + } + if (msg.channel==1&&msg.control==33+offset){ + //pot button + } + if (msg.channel==1&&msg.control==65+offset){ + //top button + } + if (msg.channel==1&&msg.control==73+offset){ + //bottom button + } + if (msg.channel==1&&msg.control==81+offset){ + //fader + segmenter_number=(((float)msg.value)/16); + } } -- cgit v1.2.3