前のページ次のページ上に戻るホーム BREW C++ ライブラリ & GUI フレームワーク : SophiaFramework 3.0
SFBFont
IFont インターフェイスのラッパークラスです。
#include <SFBFont.h.hpp>
class SFBFont : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBFont)

継承図

SFBFont クラスの継承図

協調図

SFBFont クラスの協調図

参照

BREW API IFont

バグ情報

インスタンスの作成
Tips すべて

AEECLSID_FONT を指定しても、IFONT インタフェースのインスタンスは ISHELL_CreateInstance では作成できません。 実際にサポートされているフォントに応じ、CLSID を指定して作成する必要があります。 ただし、ディベロッパ側でこのクラスを直接コールする必要は通常ありません。

IFONT_GetFontInfo, IFONT_GetInfo
ドキュメント エラー BREW API リファレンス 2.0.1.5

API リファレンスには IFONT_GetFontInfo という API について説明がありますが、 正しい API 名は IFONT_GetInfo です。

補記:API リファレンス 2.1 (英語版) にて修正されました。日本語版は未修正です。

IFONT_MeasureText
ドキュメント エラー BREW API リファレンス 2.0.1.5

この関数の第 3 引数に「-1」を渡すと特別な動作をする旨記述がありますが、 これは誤りです。第 3 引数には必ず有効な数字を渡してください。 (日本語版ドキュメントにはこの記述はありません。)

メンバ

パブリック関数
SFCError DrawText( SFBBitmapSmpConstRef bmpDest , SInt32 x , SInt32 y , WCharConstPtr text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstPtr clipRect , UInt32 flags = IDF_ALIGN_NONE )
DrawText( SFBBitmapSmpConstRef bmpDest , SFXWideStringConstRef text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstRef clipRect , UInt32 flags = IDF_ALIGN_NONE )
DrawText( SFBBitmapSmpConstRef bmpDest , SFXGridConstRef grid , SFXWideStringConstRef text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstRef clipRect , UInt32 flags = IDF_ALIGN_NONE )
DrawText( SFBBitmapSmpConstRef bmpDest , SFXGridConstPtr grid , SFXWideStringConstRef text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstPtr clipRect , UInt32 flags = IDF_ALIGN_NONE )
DrawText( SFBBitmapSmpConstRef bmpDest , SInt32 x , SInt32 y , WCharConstPtr text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstRef clipRect , UInt32 flags = IDF_ALIGN_NONE )
ビットマップ内にテキストを描画します。
SFCError GetInfo( AEEFontInfo* info , SInt32 size = sizeof(AEEFontInfo) )
フォントの情報を取得します。
AEEFontInfo GetInfo( Void )
フォントの情報を取得します。
SFCError MeasureText( WCharConstPtr text , SInt32 textLength , SInt32 maxWidth , SInt32Ptr fits , SInt32Ptr pixels )
MeasureText( SFXWideStringConstRef text , SInt32 textLength , SInt32 maxWidth , SInt32Ptr fits , SInt32Ptr pixels )
テキストの幅を測定します。
static
SFBFontSmp
NewInstance( AEECLSID clsid )
SFBont クラスのインスタンスを取得します。
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (SFBQuery から継承)
QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (SFBQuery から継承)
このオブジェクトからの別の API を問い合わせます。
SFBBaseSmp QueryInterface( AEECLSID clsid ) (SFBQuery から継承)
このオブジェクトからの別の API を問い合わせます。
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (SFBQuery から継承)
オブジェクトを単一インタフェースで実装する際に使用します。
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (SFBQuery から継承)
オブジェクトを単一インタフェースで実装する際に使用します。

SFBFont::DrawText
ビットマップ内にテキストを描画します。
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // 宛先 SFBBitmap インターフェース。
    SInt32 x                        // テキスト文字列の X 座標。
    SInt32 y                        // テキスト文字列の Y 座標。
    WCharConstPtr text              // 描画するテキスト文字列。
    SInt32 textLength               // テキスト文字列の長さ。
    NativeColor foregroundColor     // テキストを描画する色。
    NativeColor backgroundColor     // 背景を描画する色。
    SFXRectangleConstPtr clipRect   // テキストを描画するクリッピング長方形。
    UInt32 flags = IDF_ALIGN_NONE   // テキスト表示の外観を記述するプロパティビットマップ。
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // 宛先 SFBBitmap インターフェース。
    SInt32 x                        // テキスト文字列の X 座標。
    SInt32 y                        // テキスト文字列の Y 座標。
    WCharConstPtr text              // 描画するテキスト文字列。
    SInt32 textLength               // テキスト文字列の長さ。
    NativeColor foregroundColor     // テキストを描画する色。
    NativeColor backgroundColor     // 背景を描画する色。
    SFXRectangleConstRef clipRect   // テキストを描画するクリッピング長方形。
    UInt32 flags = IDF_ALIGN_NONE   // テキスト表示の外観を記述するプロパティビットマップ。
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // 宛先 SFBBitmap インターフェース。
    SFXGridConstPtr grid            // テキスト文字列の座標。
    SFXWideStringConstRef text      // 描画するテキスト文字列。
    SInt32 textLength               // テキスト文字列の長さ。
    NativeColor foregroundColor     // テキストを描画する色。
    NativeColor backgroundColor     // 背景を描画する色。
    SFXRectangleConstPtr clipRect   // テキストを描画するクリッピング長方形。
    UInt32 flags = IDF_ALIGN_NONE   // テキスト表示の外観を記述するプロパティビットマップ。
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // 宛先 SFBBitmap インターフェース。
    SFXGridConstRef grid            // テキスト文字列の座標。
    SFXWideStringConstRef text      // 描画するテキスト文字列。
    SInt32 textLength               // テキスト文字列の長さ。
    NativeColor foregroundColor     // テキストを描画する色。
    NativeColor backgroundColor     // 背景を描画する色。
    SFXRectangleConstRef clipRect   // テキストを描画するクリッピング長方形。
    UInt32 flags = IDF_ALIGN_NONE   // テキスト表示の外観を記述するプロパティビットマップ。
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // 宛先 SFBBitmap インターフェース。
    SFXWideStringConstRef text      // 描画するテキスト文字列。
    SInt32 textLength               // テキスト文字列の長さ。
    NativeColor foregroundColor     // テキストを描画する色。
    NativeColor backgroundColor     // 背景を描画する色。
    SFXRectangleConstRef clipRect   // テキストを描画するクリッピング長方形。
    UInt32 flags = IDF_ALIGN_NONE   // テキスト表示の外観を記述するプロパティビットマップ。
);

参照

BREW API IFONT_DrawText | NativeColor | SFBBitmap::RGBToNative | SFBFont::MeasureText


SFBFont::GetInfo
フォントの情報を取得します。
[ public ]
SFCError GetInfo(
    AEEFontInfo* info                   // 読み込む AEEFontInfo 構造体へのポインタ。
    SInt32 size = sizeof(AEEFontInfo)   // 読み込む構造体のサイズ。
);
[ public ]
AEEFontInfo GetInfo(Void);

参照

BREW API IFONT_GetFontInfo | AEEFontInfo | SFBFont::MeasureText


SFBFont::MeasureText
テキストの幅を測定します。
[ public ]
SFCError MeasureText(
    WCharConstPtr text   // ピクセル数を測定するテキスト文字列。
    SInt32 textLength    // テキスト文字列の長さ。
    SInt32 maxWidth      // 最大使用可能な画面幅(ピクセル数)。
    SInt32Ptr fits       // 使用可能な幅が指定された画面に収まる文字の数。
    SInt32Ptr pixels     // 使用可能な領域に収まるテキスト文字列の合計幅(ピクセル数)。
);
[ public ]
SFCError MeasureText(
    SFXWideStringConstRef text   // ピクセル数を測定するテキスト文字列。
    SInt32 textLength            // テキスト文字列の長さ。
    SInt32 maxWidth              // 最大使用可能な画面幅(ピクセル数)。
    SInt32Ptr fits               // 使用可能な幅が指定された画面に収まる文字の数。
    SInt32Ptr pixels             // 使用可能な領域に収まるテキスト文字列の合計幅(ピクセル数)。
);

参照

BREW API IFONT_MeasureText | SFBFont::GetInfo


SFBFont::NewInstance
SFBont クラスのインスタンスを取得します。
[ public, static ]
SFBFontSmp NewInstance(
    AEECLSID clsid   
);