Graphics::D rawClosedCurve(constPen*,constPoint*,INT,REAL) 메서드(gdiplusgraphics.h)

Graphics::D rawClosedCurve 메서드는 닫힌 카디널 스플라인을 그립니다.

구문

Status DrawClosedCurve(
  [in] const Pen   *pen,
  [in] const Point *points,
  [in] INT         count,
  [in] REAL        tension
);

매개 변수

[in] pen

형식: const *

닫힌 카디널 스플라인을 그리는 데 사용되는 펜에 대한 포인터입니다.

[in] points

형식: const Point*

닫힌 카디널 스플라인의 좌표를 지정하는 Point 개체의 배열에 대한 포인터입니다. Point 개체의 배열에는 최소 3개의 요소가 포함되어야 합니다.

[in] count

형식: INT

배열의 요소 수를 지정하는 정수입니다.

[in] tension

형식: REAL

곡선이 닫힌 카디널 스플라인의 좌표를 통해 얼마나 단단히 구부러지는지를 지정하는 실수입니다.

반환 값

형식: 상태

메서드가 성공하면 Status 열거형의 요소인 Ok를 반환합니다.

메서드가 실패하면 Status 열거형의 다른 요소 중 하나를 반환합니다.

설명

각 끝점은 다음 카디널 스플라인의 시작점입니다. 닫힌 카디널 스플라인에서 곡선은 배열의 마지막 지점을 계속 진행하며 배열의 첫 번째 점과 연결됩니다.

예제

다음 예제에서는 닫힌 카디널 스플라인을 그립니다.


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

   // Define a Pen object and an array of Point objects.
   Pen greenPen(Color(255, 0, 0, 255), 3);
   Point point1(100, 100);
   Point point2(200, 50);
   Point point3(400, 10);
   Point point4(500, 100);
   Point point5(600, 200);
   Point point6(700, 400);
   Point point7(500, 500);

   Point curvePoints[7] = {
      point1,
      point2,
      point3,
      point4,
      point5,
      point6,
      point7};

   // Draw the closed curve.
   graphics.DrawClosedCurve(&greenPen, curvePoints, 7, 1.0);

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

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows XP, Windows 2000 Professional [데스크톱 앱만 해당]
지원되는 최소 서버 Windows 2000 Server[데스크톱 앱만]
대상 플랫폼 Windows
헤더 gdiplusgraphics.h(Gdiplus.h 포함)
라이브러리 Gdiplus.lib
DLL Gdiplus.dll

추가 정보

카디널 스플라인

DrawCurve 메서드

카디널 스플라인 그리기

FillClosedCurve 메서드

그래픽

Point