Browse Source

Add changeable outline width to joints

master
Krisjanis Rijnieks 11 years ago
parent
commit
10e474bdb9
  1. 1
      example/src/ofApp.cpp
  2. 1
      src/ofxBaseJoint.cpp
  3. 1
      src/ofxBaseJoint.h
  4. 1
      src/ofxCircleJoint.cpp

1
example/src/ofApp.cpp

@ -2,6 +2,7 @@
void ofApp::setup()
{
//ofGetCurrentRenderer()->setLineSmoothing(true);
// Load test pattern image
image.loadImage("TestPatternInvert.jpg");

1
src/ofxBaseJoint.cpp

@ -57,6 +57,7 @@ void ofxBaseJoint::setDefaultProperties()
clickDistance = ofVec2f(0.0f, 0.0f);
dragging = false;
selected = false;
strokeWidth = 1.5f;
}
void ofxBaseJoint::registerAppEvents()

1
src/ofxBaseJoint.h

@ -26,6 +26,7 @@ public:
protected:
ofColor fillColor;
ofColor strokeColor;
float strokeWidth;
ofVec2f clickDistance;
bool dragging;

1
src/ofxCircleJoint.cpp

@ -21,6 +21,7 @@ void ofxCircleJoint::draw(ofEventArgs& args)
ofCircle(position.x, position.y, radius);
ofNoFill();
ofSetColor(strokeColor);
ofSetLineWidth(strokeWidth);
ofCircle(position.x, position.y, radius);
ofPopStyle();
}

Loading…
Cancel
Save