Compartilhar via


Descender Property

Descender Property

Gets the descender line for a IInkRecognitionAlternate object that represents a single line of text.

Declaration

[C++]

[C++]
[propget] HRESULT get_Descender ([out, retval] VARIANT* descender);

[Microsoft® Visual Basic® 6.0]

[Visual Basic]
Public Property Get Descender() As Variant

Property Value

VARIANT An array of type long of the form, x1, y1, x2, y2, where the points (x1, y1) and (x2, y2) describe the descender line in ink space coordinates for the IInkRecognitionAlternate object.

This property is read only.

For more information about the VARIANT structure, see Using the Automation Library.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The descender parameter is an invalid pointer.
E_INK_EXCEPTION An exception occurred while processing.
E_INVALIDARG An invalid argument was passed to a recognizer of East Asian characters.
E_FAIL An alternate spans more than one line.

Remarks

For western languages, the descender corresponds to the portion of a lowercase letter that falls below the baseline, such as the vertical line of a "p" that extends below the lowest point of the circle in that letter. The descender line is the imaginary horizontal line across the bottom of the descenders.

Note: If the recognition alternate spans more than one recognition segment within a line of text, then this property returns a line parallel to the baseline for the alternate. The distance of the descender line below the baseline is determined by the corresponding distance within the first segment.

You can use the AlternatesWithConstantPropertyValues method with the propertyType parameter set to the Segmentation recognition property globally unique identifier (GUID) to get a collection of one segment recognition alternates that correspond to a segmentation of your original alternate.

Note: If the recognition alternate spans more than one line, this property generates an E_FAIL error. You can use the LineAlternates property to get a collection of one line recognition alternates that corresponds to a multiple line recognition alternate.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example returns the descender line of a IInkRecognitionAlternate object, theRecognitionAlternate.

Dim theDescender As Line
On Error Resume Next
Set theDescender = theRecognitionAlternate. Descender
If Err.Number = &H80004005 Then         'E_FAIL
    MsgBox "theRecognitionAlternate occupies more than one line."
Else
    MsgBox Err.Description
    ' Do stuff with theAscender here
End If

Applies To