CustomLineCap::GetBaseInset 메서드(gdiplusheaders.h)
CustomLineCap::GetBaseInset 메서드는 기본 캡과 줄의 시작 사이의 거리를 가져옵니다.
구문
REAL GetBaseInset();
반환 값
형식: REAL
이 메서드는 기본 inset 값을 반환합니다.
설명
기본 인셋은 줄의 시작 부분과 기본 캡을 구분하는 데 사용됩니다. 값이 0이면 기본 캡과 선 터치가 됩니다. 0보다 큰 값은 줄의 끝과 줄의 시작 사이에 공백(단위)을 삽입합니다.
예제
다음 예제에서는 CustomLineCap 개체를 만들고, 캡의 기본 삽입을 가져오고, 동일한 기본 인셋을 사용하는 두 번째 CustomLineCap 개체를 만듭니다.
VOID Example_GetBaseInset(HDC hdc)
{
Graphics graphics(hdc);
//Create a Path object.
GraphicsPath capPath;
//Create a CustomLineCap object, and set its base cap to LineCapRound.
CustomLineCap custCap(NULL, &capPath, LineCapRound, 5);
// Get the base inset of custCap.
REAL baseInset = custCap.GetBaseInset();
// Create a second CustomLineCap object with the same base inset as the
// first.
CustomLineCap insetCap(NULL, &capPath, LineCapRound, baseInset);
// Create a Pen object and assign insetCap as the custom end cap.
// Then draw a line.
Pen pen(Color(255, 0, 0, 255), 5);
pen.SetCustomEndCap(&insetCap);
graphics.DrawLine(&pen, Point(0, 0), Point(100, 100));
}
요구 사항
지원되는 최소 클라이언트 | Windows XP, Windows 2000 Professional [데스크톱 앱만 해당] |
지원되는 최소 서버 | Windows 2000 Server[데스크톱 앱만] |
대상 플랫폼 | Windows |
헤더 | gdiplusheaders.h(Gdiplus.h 포함) |
라이브러리 | Gdiplus.lib |
DLL | Gdiplus.dll |