IDIFont Interface
- SetSize
- GetSize
- SetFaceName
- GetFaceName
- GetColor
- SetColor
- GetTextBackgroundColor
- SetTextBackgroundColor
IDIFont can be queried from IText interface.
See also Label Sample,
Interface List
HRESULT SetSize(int size)
Parameters
size - [in] New font size
Returns
- S_OK in case of
success.
HRESULT GetSize(int* size)
Parameters
size - [out] The returned font size
Returns
- S_OK in case of
success.
HRESULT SetFaceName(char* name)
Parameters
name - [in] Face name of
the font
Returns
- S_OK in case of
success.
Remarks:
Call this method to change face name of the font.
HRESULT GetFaceName( BSTR* name )
Parameters
name - [out] The returned
face name of the font font.
Returns
- S_OK in case of
success.
-
HRESULT GetColor( float * pfRed, float * pfGreen, float * pfBlue)
Parameters
pfRed, pfGreen, pfBlue- [out]
pointers to variables, which will be set to intensity of RGB components of color
of the font. Components of the color are float numbers between 0.0 and
1.0. Red component of 0.0 means that the color has no red component.
DISP_E_PARAMNOTOPTIONAL if either of the pointers is NULL.
Return Values
- S_OK in case of
success.
HRESULT SetColor( int nComponent, float fRed, float fGreen, float
fBlue)
Parameters
fRed, fGreen, fBlue
- [in] RGB components of color
of the font. Components of the color are float numbers between 0.0 and
1.0. Red component of 0.0 means that the color has no red component.
Return Values
- S_OK in case of
success.
HRESULT GetTextBackgroundColor( float * pfRed, float * pfGreen, float * pfBlue)
Parameters
pfRed, pfGreen, pfBlue--[out]
pointers to variables, which will be set to intensity of RGB components of
background color
of the font. Components of the color are float numbers between 0.0 and
1.0. Red component of 0.0 means that the color has no red component.
DISP_E_PARAMNOTOPTIONAL if either of the pointers is NULL.
HRESULT SetTextBackgroundColor( int nComponent, float fRed, float fGreen, float fBlue)
Parameters
fRed, fGreen, fBlue
-[in] RGB components of background color
of the font. Components of the color are float numbers between 0.0 and
1.0. Red component of 0.0 means that the color has no red component.
|