I would like to change the curve thickness that I draw when I get a CRhinoDrawGripsSettings
object.
Currently I can do this for a polyline:
CRhinoDrawGripsSettings dgs; // defined elsewhere
ON_Polyline pl; // defined elsewhere
int thickness = 2; // <-- here I can change the thickness for a polyline
COLORREF clr = RGB(255,0,0);
dgs.m_dp.DrawPolyline(pl, crl, thickness);
I also want to draw a curve. For that I can’t use the display pipeline m_dp
but I can use the viewport m_vp
like so:
CRhinoDrawGripsSettings dgs; // defined elsewhere
ON_Curve crv; // defined elsewhere
ON_NurbsCurve nc;
if (crv.GetNurbForm(nc)) {
COLORREF clr = RGB(255,0,0);
COLORREF old = dgs.m_vp.DrawColor();
dgs.m_vp.SetDrawColor(clr);
dgs.m_vp.DrawNurbsCurve(nc); // <-- How to set the thickness for this curve?
dgs.m_vp.SetDrawColor(old); // set to previous value
}
So, what I want to achieve is, given a CRhinoDrawGripsSettings
object, to draw a curve with thickness of 2. Currently, I use the viewport to call DrawNurbsCurve but I don’t see how to set the thickness with which the curve is drawn.