FontFamily.GetCellAscent メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > FontFamily.GetCellAscent メソッドの意味・解説 

FontFamily.GetCellAscent メソッド

指定したスタイルの FontFamily のセル アセントデザイン単位返します

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Function GetCellAscent ( _
    style As FontStyle _
) As Integer
Dim instance As FontFamily
Dim style As FontStyle
Dim returnValue As Integer

returnValue = instance.GetCellAscent(style)
public int GetCellAscent (
    FontStyle style
)
public:
int GetCellAscent (
    FontStyle style
)
public int GetCellAscent (
    FontStyle style
)
public function GetCellAscent (
    style : FontStyle
) : int

パラメータ

style

フォントスタイル情報格納されている FontStyle。

戻り値
指定した FontStyle使用するこの FontFamilyセル アセント

使用例使用例

次の例は、Windows フォームでの使用意図してデザインされており、Paint イベント ハンドラパラメータである PaintEventArgse が必要です。このコード次のアクション実行します

Public Sub GetCellAscent_Example(ByVal
 e As PaintEventArgs)

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

    ' Get the cell ascent of the font family in design units.
    Dim cellAscent As Integer
 = _
    ascentFontFamily.GetCellAscent(FontStyle.Regular)

    ' Draw the result as a string to the screen.
    e.Graphics.DrawString("ascentFontFamily.GetCellAscent() returns
 " _
    & cellAscent.ToString() & ".", New
 Font(ascentFontFamily, 16), _
    Brushes.Black, New PointF(0, 0))
End Sub
public void GetCellAscent_Example(PaintEventArgs
 e)
{
    // Create a FontFamily object.
    FontFamily ascentFontFamily = new FontFamily("arial");
             
    // Get the cell ascent of the font family in design units.
    int cellAscent = ascentFontFamily.GetCellAscent(FontStyle.Regular);
             
    // Draw the result as a string to the screen.
    e.Graphics.DrawString(
        "ascentFontFamily.GetCellAscent() returns " + cellAscent.ToString()
 + ".",
        new Font(ascentFontFamily, 16),
        Brushes.Black,
        new PointF(0, 0));
}
public:
   void GetCellAscent_Example( PaintEventArgs^ e )
   {
      // Create a FontFamily object.
      FontFamily^ ascentFontFamily = gcnew FontFamily( "arial" );

      // Get the cell ascent of the font family in design units.
      int cellAscent = ascentFontFamily->GetCellAscent( FontStyle::Regular
 );

      // Draw the result as a string to the screen.
      e->Graphics->DrawString( String::Format( "ascentFontFamily.GetCellAscent()
 returns {0}.", cellAscent ),
            gcnew System::Drawing::Font( ascentFontFamily,16 ), Brushes::Black, PointF(0,0)
 );
   }
public void GetCellAscent_Example(PaintEventArgs
 e)
{
    // Create a FontFamily object.
    FontFamily ascentFontFamily = new FontFamily("arial");

    // Get the cell ascent of the font family in design units.
    int cellAscent = ascentFontFamily.GetCellAscent(FontStyle.Regular);

    // Draw the result as a string to the screen.
    e.get_Graphics().DrawString("ascentFontFamily.GetCellAscent() returns "
        + System.Convert.ToString(cellAscent) + ".", 
        new Font(ascentFontFamily, 16), 
        Brushes.get_Black(), new PointF(0, 0));
} //GetCellAscent_Example
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

FontFamily.GetCellAscent メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



FontFamily.GetCellAscent メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS