Contributors (#3) - Drawing Text Object (#258) - Message List

Drawing Text Object

Can someone tell me how FalconView determines the initial Font Point size when creating a text drawing object?

Thanks. -John

Tree View Flat View (newer first) Flat View (older first)
  • Message #638

    I do not remember the default but you should call SetFont. From the Map Server ICD in the SDK:

    long SetFont(long layer_handle, BSTR font_name, long size, long attributes, long fg_color, long bg_color, long bg_type);
    

    SetFont sets the layer’s font. Following this call, any text object added to the layer with AddText? uses this font. The default font for a layer is 12-point Arial with white text and a black background, zero attributes, and background type of CLIENT_BG_SHADOW.

    Parameters:

    layer_handle
    the value of the layer handle
    font_name
    name of a font found on the system
    size
    font size
    attributes
    a combination of the following:
    CLIENT_FONT_BOLD 1
    CLIENT_FONT_ITALIC 2
    CLIENT_FONT_UNDERLINE 4
    CLIENT_FONT_STRIKEOUT 8

    For example, to set the bold and underline attributes, pass in CLIENT_FONT_BOLD | CLIENT_FONT_UNDERLINE. If you want none of these properties, then pass in zero (0).

    fg_color
    the foreground color of the font as defined in paragraph 2.3, Color Values
    bg_color
    the background color of the font as defined in paragraph 2.3, Color Values (set this to -1 to turn the background off)
    bg_type
    background type is one of the following:

    Type Value Description
    CLIENT_BG_NONE 0 the text is drawn with no background
    CLIENT_BG_SHADOW 1 outline the text with the background color
    CLIENT_BG_RECT 2 a solid rectangle bounding the text is drawn with the background color
    CLIENT_BG_3D 3 a solid rectangle with a 3D appearance bounding the text is drawn with the background color
    CLIENT_BG_SHADE 4 the rectangle bounding the text is shaded, or highlighted, using the specified background color

    Returns

    0 (success)

    -1 (failure)

Tree View Flat View (newer first) Flat View (older first)

Subscriptions