Hello,
I’m having difficulty drawing a Basic roundRectangle!
the only way I managed to do it was with circles and rectangles, but using alpha messes everything up:
ofCircle(x+10, y+10, 10);
ofCircle(x+90, y+10, 10);
ofCircle(x+90, y+90, 10);
ofCircle(x+10, y+90, 10);
ofRect(x+10, y, 80, 100);
ofRect(x, y+10, 100, 80);
I tried using ofVertex and ofCurveVertex, but I get some weird polygon, as if it ignored some of the vertex:
ofBeginShape();
ofVertex(10+x, y);
ofVertex(90+x, y);
ofCurveVertex(100+x, y+10);
ofVertex(100+x, y+90);
ofCurveVertex(90+x, y+100);
ofVertex(x+10, y+100);
ofCurveVertex(x, y+90);
ofVertex(x, y+10);
ofCurveVertex(X+10, y);
ofEndShape(true);
also tried with ofCurve, ofBezier and ofLine, but I still get some weird polygon drawing:
ofLine(10+x, y, 90+x, y);
ofCurve(80+x, y, 90+x, y, 100+x, y+10, 100+x, y+20);
ofLine(100+x, y+10, 100+x, y+90);
can anyone help?
thnks