Skip to content

Latest commit

 

History

History
159 lines (107 loc) · 5.1 KB

nf-gdiplusgraphics-graphics-drawcurve(constpen_constpoint_int_real).md

File metadata and controls

159 lines (107 loc) · 5.1 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist req.product ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:gdiplusgraphics.Graphics.DrawCurve(constPen,constPoint,INT,REAL)
Graphics::DrawCurve(IN const Pen,IN const Point,IN INT,IN REAL) (gdiplusgraphics.h)
The Graphics::DrawCurve method draws a cardinal spline. (overload 5/6)
DrawCurve
DrawCurve method [GDI+]
DrawCurve method [GDI+]
Graphics class
Graphics class [GDI+]
DrawCurve method
Graphics.DrawCurve
Graphics.DrawCurve(IN const Pen
IN const Point
IN INT
IN REAL)
Graphics.DrawCurve(const Pen*
const Point*
INT
REAL)
Graphics::DrawCurve
Graphics::DrawCurve(IN const Pen
IN const Point
IN INT
IN REAL)
_gdiplus_CLASS_Graphics_DrawCurve_Pen_pen_Point_points_INT_count_REAL_tension_
gdiplus._gdiplus_CLASS_Graphics_DrawCurve_Pen_pen_Point_points_INT_count_REAL_tension_
gdiplus\_gdiplus_CLASS_Graphics_DrawCurve_Pen_pen_Point_points_INT_count_REAL_tension_.htm
gdiplus
VS|gdicpp|~\gdiplus\gdiplusreference\classes\graphicsclass\graphicsmethods\graphicsdrawcurvemethods\drawcurve_73penpen_pointpoints_intcount_realtensio.htm
12/05/2018
DrawCurve, DrawCurve method [GDI+], DrawCurve method [GDI+],Graphics class, Graphics class [GDI+],DrawCurve method, Graphics.DrawCurve, Graphics.DrawCurve(IN const Pen,IN const Point,IN INT,IN REAL), Graphics.DrawCurve(const Pen*,const Point*,INT,REAL), Graphics::DrawCurve, Graphics::DrawCurve(IN const Pen,IN const Point,IN INT,IN REAL), _gdiplus_CLASS_Graphics_DrawCurve_Pen_pen_Point_points_INT_count_REAL_tension_, gdiplus._gdiplus_CLASS_Graphics_DrawCurve_Pen_pen_Point_points_INT_count_REAL_tension_
gdiplusgraphics.h
Gdiplus.h
Windows
Windows XP, Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Gdiplus.lib
Gdiplus.dll
Windows
GDI+ 1.0
19H1
Graphics::DrawCurve
gdiplusgraphics/Graphics::DrawCurve
c++
APIRef
kbSyntax
COM
Gdiplus.dll
Graphics.DrawCurve

Graphics::DrawCurve(IN const Pen,IN const Point,IN INT,IN REAL)

-description

The Graphics::DrawCurve method draws a cardinal spline.

-parameters

-param pen [in]

Type: const Pen*

Pointer to a pen that is used to draw the cardinal spline.

-param points [in]

Type: const Point*

Pointer to an array of Point objects that specify the coordinates that the cardinal spline passes through.

-param count [in]

Type: INT

Integer that specifies the number of elements in the points array.

-param tension [in]

Type: REAL

Real number that specifies how tightly the curve bends through the coordinates of the cardinal spline.

-returns

Type: Status

If the method succeeds, it returns Ok, which is an element of the Status enumeration.

If the method fails, it returns one of the other elements of the Status enumeration.

-remarks

A segment is defined as a curve that connects two consecutive points in the cardinal spline. The ending point of each segment is the starting point for the next.

Examples

The following example draws a cardinal spline.

VOID Example_DrawCurve3(HDC hdc)
{
   Graphics graphics(hdc);

   // Define a Pen object and an array of Point objects.
   Pen greenPen(Color::Green, 3);
   Point point1(100, 100);
   Point point2(200, 50);
   Point point3(400, 10);
   Point point4(500, 100);
   
   Point curvePoints[4] = {
   point1,
   point2,
   point3,
   point4};

   Point* pcurvePoints = curvePoints;

   // Draw the curve.
   graphics.DrawCurve(&greenPen, curvePoints, 4, 1.0);

   //Draw the points in the curve.
   SolidBrush redBrush(Color::Red);
   graphics.FillEllipse(&redBrush, Rect(95, 95, 10, 10));
   graphics.FillEllipse(&redBrush, Rect(195, 45, 10, 10));
   graphics.FillEllipse(&redBrush, Rect(395, 5, 10, 10));
   graphics.FillEllipse(&redBrush, Rect(495, 95, 10, 10));
}

-see-also

Cardinal Splines

DrawClosedCurve Methods

Drawing Cardinal Splines

Graphics

Pen

Point