IUIX_Inst::CreateFontFromFont Method

From Tracker Software PDF SDK
Jump to: navigation, search

Creates new object of IUIX_Font interface from another IUIX_Font object.


HRESULT CreateFontFromFont([in]                     IUIX_Font*   pSrcFont,
                           [in, defaultvalue(0.0)]  double       nNewFontSize,
                           [in, defaultvalue(0)]    LONG         nFlags,
                           [in, defaultvalue(0)]    LONG         nFlagsMask,
                           [out, retval]            IUIX_Font**  pFont);


[in] source font object of IUIX_Font interface.
[in, defaultvalue(0.0)] specifies new font size.
[in, defaultvalue(0)] specifies font style with flags from UIX_CreateFontFlags enumeration.
[in, defaultvalue(0)] specifies style mask with flags from UIX_CreateFontFlags enumeration. This parameter removes specified styles from previous font and applies only those flags of nFlags parameter to the new font that were set in nFlagsMask. For instance, if previous font style was UIX_CreateFont_Underline, and new font style in nFlags parameter is set to UIX_CreateFont_Bold with nStyleMask parameter set to (UIX_CreateFont_Bold | UIX_CreateFont_Underline), then given font will be first set to non-underlined, and then to bold. If nStyleMask is set to UIX_ComboItemStyle_Bold, then font style will be changed to bold, but remain underlined.
[out, retval] return object of IUIX_Font interface.

Return Value

Returns S_OK if the operation was successful, or will return an error code if it fails.

See Also