Home > Software engineering >  MFC can how to enclose the spline curve and linear area color?
MFC can how to enclose the spline curve and linear area color?

Time:04-11

I tried to several spline curve and linear area surrounded by beginpath (), endpath () and fillpath (finish) color, but the result is two spline curve of regional color, can have what way to enclose the spline curve and linear area of the painting?

CodePudding user response:

 
PDC - & gt; BeginPath ();

PDC - & gt; SelectObject (pOldPen);
PDC - & gt; PolyBezier (RUp, 4);
PDC - & gt; PolyBezier (LUp, 4);

PDC - & gt; MoveTo (LUp [3]);
PDC - & gt; The LineTo (LDp [0]);

PDC - & gt; PolyBezier (LDp, 4);
PDC - & gt; MoveTo (LDp [3]);
PDC - & gt; The LineTo (RDp [0]);
PDC - & gt; PolyBezier (RDp, 4);

PDC - & gt; MoveTo (RDp [3]);
PDC - & gt; The LineTo (RUp [0]);

PDC - & gt; EndPath ();
PDC - & gt; SelectObject (& amp; NewBrush);
PDC - & gt; FillPath ();

These are the code, the definition of the point too much is not put out
  • Related