Version

GetBounds Method

Gets the actual pixel bounds for this Annotation.
Syntax
'Declaration
 
Protected Overridable Function GetBounds( _
   ByVal text As String, _
   ByVal font As Font, _
   ByVal sourceRect As Rectangle _
) As Rectangle
protected virtual Rectangle GetBounds( 
   string text,
   Font font,
   Rectangle sourceRect
)

Parameters

text
The text to be displayed.
font
The font to be used.
sourceRect
The source rectangle, typically taken from the "parent" object of this Annotation.

Return Value

The actual pixel bounds for this Annotation.
Remarks

This method takes into account the measurement of the text. If the Bounds property is set to Rectangle.Empty, then the text will be measured and the bounds will expand to fit the displayed label.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also