void resetDrawSettings() { m_inSetup = false; fill(m_defaultFillColor.getHex()); stroke(m_defaultStrokeColor.getHex()); strokeWeight(m_defaultStrokeWeight); m_hasFill = m_defaultHasFill; m_hasStroke = m_defaultHasStroke; ofEnableBlendMode(OF_BLENDMODE_ALPHA); smooth(2); width = ofGetWidth(); height = ofGetHeight(); pmouseX = ofGetPreviousMouseX(); pmouseY = ofGetPreviousMouseY(); keyPressed = ofGetKeyPressed(); mousePressed = ofGetMousePressed(); mouseButton = NONE; if( ofGetMousePressed(0) ) mouseButton = LEFT; else if(ofGetMousePressed(1)) mouseButton = RIGHT; ofSetCircleResolution(100); ofSetCurveResolution(100); }
void ofxPixelPusherUnit::setColor(int index, int position, ofColor color) { if (index < pusher->getStripLength()) { pusher->getStrips()[index]->setPixel(position, color.getHex()); } }