VisualStyleRenderer.GetTextExtent 메서드

정의

현재 비주얼 스타일 요소의 글꼴로 그릴 때 지정된 문자열의 크기와 위치를 반환합니다.

오버로드

Name Description
GetTextExtent(IDeviceContext, String, TextFormatFlags)

현재 비주얼 스타일 요소의 글꼴로 그릴 때 지정된 문자열의 크기와 위치를 반환합니다.

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

지정된 초기 경계 사각형 내에서 현재 비주얼 스타일 요소의 글꼴로 그릴 때 지정된 문자열의 크기와 위치를 반환합니다.

GetTextExtent(IDeviceContext, String, TextFormatFlags)

Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs

현재 비주얼 스타일 요소의 글꼴로 그릴 때 지정된 문자열의 크기와 위치를 반환합니다.

public:
 System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);
public System.Drawing.Rectangle GetTextExtent(System.Drawing.IDeviceContext dc, string textToDraw, System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * string * System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle
Public Function GetTextExtent (dc As IDeviceContext, textToDraw As String, flags As TextFormatFlags) As Rectangle

매개 변수

dc
IDeviceContext

IDeviceContext 작업을 사용합니다.

textToDraw
String

측정할 문자열입니다.

flags
TextFormatFlags

값의 비트 조합입니다 TextFormatFlags .

반품

렌더링된 텍스트에 맞는 데 필요한 영역을 포함하는 A Rectangle 입니다.

예외

dcnull입니다.

적용 대상

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs

지정된 초기 경계 사각형 내에서 현재 비주얼 스타일 요소의 글꼴로 그릴 때 지정된 문자열의 크기와 위치를 반환합니다.

public:
 System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);
public System.Drawing.Rectangle GetTextExtent(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle
Public Function GetTextExtent (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, flags As TextFormatFlags) As Rectangle

매개 변수

dc
IDeviceContext

IDeviceContext 작업을 사용합니다.

bounds
Rectangle

Rectangle 텍스트의 흐름 및 줄 바꿈을 제어하는 데 사용됩니다.

textToDraw
String

측정할 문자열입니다.

flags
TextFormatFlags

값의 비트 조합입니다 TextFormatFlags .

반품

렌더링된 텍스트에 맞는 데 필요한 영역을 포함하는 A Rectangle 입니다.

예외

dcnull입니다.

적용 대상