This document is archived and information here might be outdated.  Recommended version.


ITextSymbol.GetTextSize Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Display)  

ITextSymbol.GetTextSize Method

Gets the x and y dimensions of 'text' in points (1/72 inch).

[Visual Basic .NET]
Public Sub GetTextSize ( _
    ByVal hDC As Integer, _
    ByVal Transformation As ITransformation, _
    ByVal Text As String, _
    ByRef xSize As Double, _
    ByRef ySize As Double _
)
[C#]
public void GetTextSize (
    int hDC,
    ITransformation Transformation,
    string Text,
    ref double xSize,
    ref double ySize
);
[C++]
HRESULT GetTextSize(
  long hDC,
  ITransformation* Transformation,
  BSTR Text,
  double* xSize,
  double* ySize
);
[C++]

Parameters hDC [in] hDC is a parameter of type long Transformation [in]
Transformation is a parameter of type ITransformation Text [in] Text is a parameter of type BSTR xSize [out] xSize is a parameter of type double ySize [out] ySize is a parameter of type double

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

GetTextSize assigns by reference the x and y dimensions of a ITextSymbol given the device context, Transformation, and Text that will be used. This is helpful in planning where to place graphic elements on the map sheet.

See Also

ITextSymbol Interface