FontFamily.GetCellDescent メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
Dim instance As FontFamily Dim style As FontStyle Dim returnValue As Integer returnValue = instance.GetCellDescent(style)
戻り値
指定した FontStyle を使用するこの FontFamily のセル ディセント メトリック。
次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
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
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: 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.get_Graphics().DrawString( "descentFontFamily.GetCellDescent() returns " + System.Convert.ToString(cellDescent) + ".", new Font(descentFontFamily, 16), Brushes.get_Black(), new PointF(0, 0)); } //GetCellDescent_Example
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- FontFamily.GetCellDescent メソッドのページへのリンク