Share via


Reflect Method (Automation Only)

Reflect Method (Automation Only)

Performs reflection on a transform in either horizontal or vertical directions.

Declaration

[C++]

HRESULT Reflect (
    [in] VARIANT_BOOL Horizontally,
    [in] VARIANT_BOOL Vertically
);

[Microsoft® Visual Basic® 6.0]

Public Sub Reflect( _
    Horizontally As Boolean, _
    Vertically As Boolean _
)

Parameters

Horizontally

[in] Specifies reflection in the horizontal direction.

Vertically

[in] Specifies reflection in the vertical direction.

Return Value

HRESULT value Description
S_OK Success.
E_INVALIDARG Invalid BOOL variants.
E_INK_EXCEPTION An exception occurred inside the method.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example shows a button handler that reflects the ink on the form horizontally about a vertical line at a distance of 4000 units from the left edge, which is roughly the middle of the standard form, so that the results are easier to see. (If the ink was not translated before and after the reflection, it would be reflected off the left side of the form.) This application started out as a standard .exe and added a reference to the Microsoft Tablet PC Type Library, and a command button, Command1, to the form.

Option Explicit
Dim theInkCollector As InkCollector

Private Sub Command1_Click()
    Dim theInkTransform As New InkTransform
    theInkCollector.Renderer.GetObjectTransform theInkTransform
    theInkTransform.Translate -4000#, 0
    theInkTransform.Reflect True, False
    theInkTransform.Translate 4000#, 0
    theInkCollector.Renderer.SetObjectTransform theInkTransform
    Form1.Refresh
End Sub

Private Sub Form_Load()
    Set theInkCollector = New InkCollector
    theInkCollector.hWnd = Me.hWnd
    theInkCollector.Enabled = True
End Sub

Applies To