com.esri.arcgis.display
Interface ITextBackground

All Superinterfaces:
Serializable
All Known Subinterfaces:
IMarkerTextBackground
All Known Implementing Classes:
BalloonCallout, LineCallout, MarkerTextBackground, SimpleLineCallout

public interface ITextBackground
extends Serializable

Provides access to members that control the text background.

Description

The TextBackground abstract class defines the common properties of the different types of background—MarkerTextBackground, BalloonCallout, and LineCallout. Use a MarkerTextBackground to draw text over a single glyph from a font (for example, a highway shield and number). A BalloonCallout draws a rectangular- or balloon-shaped background for a text string with a predefined leader line. A LineCallout is similar to a BalloonCallout but has a different leader line with a user-defined style and an accent bar.

Callout text backgrounds can be used for TextSymbol objects with a TextPath set, but note that the callout will produce a background to the envelope of the text, not one following the path.

Examples of the three types of text background: marker text background, balloon callout, and line callout.

Product Availability

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


Method Summary
 void draw(int hDC, ITransformation transform)
          Draws the text background.
 ITextSymbol getTextSymbol()
          The text symbol.
 void queryBoundary(int hDC, ITransformation transform, IPolygon boundary)
          Queries for the boundary of the text background.
 void setTextBoxByRef(IEnvelope rhs1)
          The text box.
 void setTextSymbolByRef(ITextSymbol textSym)
          The text symbol.
 

Method Detail

getTextSymbol

ITextSymbol getTextSymbol()
                          throws IOException,
                                 AutomationException
The text symbol.

Description

The TextSymbol of which the Background is a property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.display.ITextSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTextSymbolByRef

void setTextSymbolByRef(ITextSymbol textSym)
                        throws IOException,
                               AutomationException
The text symbol.

Description

The TextSymbol of which the Background is a property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
textSym - A reference to a com.esri.arcgis.display.ITextSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTextBoxByRef

void setTextBoxByRef(IEnvelope rhs1)
                     throws IOException,
                            AutomationException
The text box.

Description

The TextBox property is write-only. It is set by a TextSymbol before a call to ITextBackground::Draw or ITextBackground::QueryBoundary. For this reason, the ITextBackground also has a TextSymbol property, which is the TextSymbol of which the Background is a property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
rhs1 - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryBoundary

void queryBoundary(int hDC,
                   ITransformation transform,
                   IPolygon boundary)
                   throws IOException,
                          AutomationException
Queries for the boundary of the text background.

Description

Use the QueryBoundary method to find the shape of a callout. This method populates a Polygon with the boundary of the callout. For a LineCallout, this is the minimum bounding rectangle of the leader line and text background box. For a BalloonCallout, this is the shape of the balloon. For a MarkerTextBackground, this is the union of the bounding box of the Marker and the Text.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
hDC - The hDC (A COM typedef) (in)
transform - A reference to a com.esri.arcgis.geometry.ITransformation (in)
boundary - A reference to a com.esri.arcgis.geometry.IPolygon (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

draw

void draw(int hDC,
          ITransformation transform)
          throws IOException,
                 AutomationException
Draws the text background.

Description

The Draw method is used in a similar way to the ISymbol::Draw method. Note that ISymbol::Draw called on a TextSymbol coclass will also call ITextBackground::Draw, if a Background is set, thus drawing both the background and the text. Note that there is no Geometry required in this method; the location and size of the TextBackground is determined by the TextSymbol.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
hDC - The hDC (A COM typedef) (in)
transform - A reference to a com.esri.arcgis.geometry.ITransformation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.