I write the code as follows, but the drawn line is not width 1 but 2, and its color is pale white.
What should I do?
void ofApp::draw() {
ofSetColor(255);
ofSetLineWidth(1.0f);
ofDrawLine(100, 100, 200, 100); // or use ofLine()
}
I write the code as follows, but the drawn line is not width 1 but 2, and its color is pale white.
What should I do?
void ofApp::draw() {
ofSetColor(255);
ofSetLineWidth(1.0f);
ofDrawLine(100, 100, 200, 100); // or use ofLine()
}
that’s because antialiasing is enabled, you can disable it calling ofDisableAntialiasing() and you’ll get exact 1px but ragged lines
thanks a lot!