PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBFont
Wrapper Class for the IFont interface.
#include <SFBFont.h.hpp>
class SFBFont : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBFont)

Inheritance diagram

 Inheritance diagram of SFBFontClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API IFont

Member

Public Functions
SFCError DrawText( SFBBitmapSmpConstRef bmpDest , SInt32 x , SInt32 y , WCharConstPtr text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstPtr clipRect , UInt32 flags = IDF_ALIGN_NONE )
Draw text into a bitmap.
SFCError DrawText( SFBBitmapSmpConstRef bmpDest , SInt32 x , SInt32 y , WCharConstPtr text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstRef clipRect , UInt32 flags = IDF_ALIGN_NONE )
Draw text into a bitmap.
SFCError DrawText( SFBBitmapSmpConstRef bmpDest , SFXGridConstPtr grid , SFXWideStringConstRef text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstPtr clipRect , UInt32 flags = IDF_ALIGN_NONE )
Draw text into a bitmap.
SFCError DrawText( SFBBitmapSmpConstRef bmpDest , SFXGridConstRef grid , SFXWideStringConstRef text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstRef clipRect , UInt32 flags = IDF_ALIGN_NONE )
Draw text into a bitmap.
SFCError DrawText( SFBBitmapSmpConstRef bmpDest , SFXWideStringConstRef text , SInt32 textLength , NativeColor foregroundColor , NativeColor backgroundColor , SFXRectangleConstRef clipRect , UInt32 flags = IDF_ALIGN_NONE )
Draw text into a bitmap.
SFCError GetInfo( AEEFontInfo* info , SInt32 size = sizeof(AEEFontInfo) )
Get the information about the font.
AEEFontInfo GetInfo( Void )
Get the information about the font.
SFCError MeasureText( WCharConstPtr text , SInt32 textLength , SInt32 maxWidth , SInt32Ptr fits , SInt32Ptr pixels )
Measure the width of text.
SFCError MeasureText( SFXWideStringConstRef text , SInt32 textLength , SInt32 maxWidth , SInt32Ptr fits , SInt32Ptr pixels )
Measure the width of text.
static
SFBFontSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBFont instance.
static
SFBFontSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBFont instance.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBFont::DrawText
Draw text into a bitmap.
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // destination SFBBitmap Interface
    SInt32 x                        // X coordinate of the left of the text 
    SInt32 y                        // Y coordinate of the top of the text 
    WCharConstPtr text              // pointer to characters to be drawn 
    SInt32 textLength               // number of characters to be drawn 
    NativeColor foregroundColor     // color to draw the text 
    NativeColor backgroundColor     // color to draw the background 
    SFXRectangleConstPtr clipRect   // clipping rectangle in which the text must be drawn
    UInt32 flags = IDF_ALIGN_NONE   // bitmask of flags that affect drawing 
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // destination SFBBitmap Interface
    SInt32 x                        // X coordinate of the left of the text 
    SInt32 y                        // Y coordinate of the top of the text 
    WCharConstPtr text              // pointer to characters to be drawn 
    SInt32 textLength               // number of characters to be drawn 
    NativeColor foregroundColor     // color to draw the text 
    NativeColor backgroundColor     // color to draw the background 
    SFXRectangleConstRef clipRect   // clipping rectangle in which the text must be drawn
    UInt32 flags = IDF_ALIGN_NONE   // bitmask of flags that affect drawing 
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // destination SFBBitmap Interface
    SFXGridConstPtr grid            // grid of the left of the text 
    SFXWideStringConstRef text      // pointer to characters to be drawn 
    SInt32 textLength               // number of characters to be drawn 
    NativeColor foregroundColor     // color to draw the text 
    NativeColor backgroundColor     // color to draw the background 
    SFXRectangleConstPtr clipRect   // clipping rectangle in which the text must be drawn
    UInt32 flags = IDF_ALIGN_NONE   // bitmask of flags that affect drawing 
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // destination SFBBitmap Interface
    SFXGridConstRef grid            // grid of the left of the text 
    SFXWideStringConstRef text      // pointer to characters to be drawn 
    SInt32 textLength               // number of characters to be drawn 
    NativeColor foregroundColor     // color to draw the text 
    NativeColor backgroundColor     // color to draw the background 
    SFXRectangleConstRef clipRect   // clipping rectangle in which the text must be drawn
    UInt32 flags = IDF_ALIGN_NONE   // bitmask of flags that affect drawing 
);
[ public ]
SFCError DrawText(
    SFBBitmapSmpConstRef bmpDest    // destination SFBBitmap Interface
    SFXWideStringConstRef text      // pointer to characters to be drawn 
    SInt32 textLength               // number of characters to be drawn 
    NativeColor foregroundColor     // color to draw the text 
    NativeColor backgroundColor     // color to draw the background 
    SFXRectangleConstRef clipRect   // clipping rectangle in which the text must be drawn
    UInt32 flags = IDF_ALIGN_NONE   // bitmask of flags that affect drawing 
);

Rerference

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


SFBFont::GetInfo
Get the information about the font.
[ public ]
SFCError GetInfo(
    AEEFontInfo* info                   // pointer to AEEFontInfo structure to reading
    SInt32 size = sizeof(AEEFontInfo)   // size of AEEFontInfo structure to reading
);
[ public ]
AEEFontInfo GetInfo(Void);

Reference

BREW API IFONT_GetFontInfo | AEEFontInfo | SFBFont::MeasureText


SFBFont::MeasureText
Measure the width of text.
[ public ]
SFCError MeasureText(
    WCharConstPtr text   // text to be measured in pixels
    SInt32 textLength    // number of characters to measure
    SInt32 maxWidth      // maximum available width in pixels
    SInt32Ptr fits       // number of characters that can fit in the available width
    SInt32Ptr pixels     // total width of the characters that fit
);
[ public ]
SFCError MeasureText(
    SFXWideStringConstRef text   // text to be measured in pixels
    SInt32 textLength            // number of characters to measure
    SInt32 maxWidth              // maximum available width in pixels
    SInt32Ptr fits               // number of characters that can fit in the available width
    SInt32Ptr pixels             // total width of the characters that fit
);

Reference

BREW API IFONT_MeasureText | SFBFont::GetInfo


SFBFont::NewInstance
Create a new SFBFont instance.
[ public, static ]
SFBFontSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBFontSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);