1

私の結論は、formattedtext オブジェクトのアセンダーの高さにアクセスできないように見えるため、これは実行できないということです。大まかな概算として、私は以下を使用しています:

public static double GetCapitalX(this FormattedText text)
    {
         double bottom = text.Height + text.OverhangAfter;      // bottom most inked pixel

        /* this is wrong since the Extent includes the ascender height. But it's the best I can do. */
         double capitalX = text.Extent - (bottom - text.Baseline);
         return capitalX;
    }

より良い(より正確な)方法はありますか?どんな助けでも大歓迎です。

4

0 に答える 0