FontFamily.GetCellDescent(FontStyle) 메서드

정의

지정된 스타일의 FontFamily에 대한 셀 하강을 디자인 단위로 반환합니다.

public:
 int GetCellDescent(System::Drawing::FontStyle style);
public int GetCellDescent (System.Drawing.FontStyle style);
member this.GetCellDescent : System.Drawing.FontStyle -> int
Public Function GetCellDescent (style As FontStyle) As Integer

매개 변수

style
FontStyle

글꼴의 스타일 정보를 포함하는 FontStyle입니다.

반환

지정된 FontFamily을 사용하는 이 FontStyle의 셀 하강 메트릭입니다.

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • FontFamily을 만듭니다.

  • 해당 글꼴 패밀리의 셀 하강을 가져옵니다.

  • 셀 하강 값을 텍스트로 화면에 그립니다.

public:
   void GetCellDescent_Example( PaintEventArgs^ e )
   {
      // Create a FontFamily object.
      FontFamily^ descentFontFamily = gcnew FontFamily( "arial" );

      // Get the cell descent of the font family in design units.
      int cellDescent = descentFontFamily->GetCellDescent( FontStyle::Regular );

      // Draw the result as a string to the screen.
      e->Graphics->DrawString( String::Format( "descentFontFamily.GetCellDescent() returns {0}.", cellDescent ),
            gcnew System::Drawing::Font( descentFontFamily,16 ), Brushes::Black, PointF(0,0) );
   }
public void GetCellDescent_Example(PaintEventArgs e)
{
    // Create a FontFamily object.
    FontFamily descentFontFamily = new FontFamily("arial");
             
    // Get the cell descent of the font family in design units.
    int cellDescent = descentFontFamily.GetCellDescent(FontStyle.Regular);
             
    // Draw the result as a string to the screen.
    e.Graphics.DrawString(
        "descentFontFamily.GetCellDescent() returns " + cellDescent.ToString() + ".",
        new Font(descentFontFamily, 16),
        Brushes.Black,
        new PointF(0, 0));
}
Public Sub GetCellDescent_Example(ByVal e As PaintEventArgs)

    ' Create a FontFamily object.
    Dim descentFontFamily As New FontFamily("arial")

    ' Get the cell descent of the font family in design units.
    Dim cellDescent As Integer = _
    descentFontFamily.GetCellDescent(FontStyle.Regular)

    ' Draw the result as a string to the screen.
    e.Graphics.DrawString("descentFontFamily.GetCellDescent() returns " _
    & cellDescent.ToString() & ".", New Font(descentFontFamily, 16), _
    Brushes.Black, New PointF(0, 0))
End Sub

적용 대상

추가 정보