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


ITextSymbol.GetTextSize Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Display > ESRI.ArcGIS.Display > Interfaces > IT > ITextSymbol Interface > ITextSymbol.GetTextSize Method
ArcGIS Developer Help

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(
  OLE_HANDLE hDC,
  ITransformation* Transformation,
  BSTR Text,
  System.Double* xSize,
  System.Double* ySize
);
[C++]
Parameters
hDC [in]

hDC is a parameter of type OLE_HANDLE 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