ScaleTransform Method [InkRenderer Class]
ScaleTransform Method [InkRenderer Class] |
Scales the view transform in the X and Y dimension.
Declaration
[C++]
HRESULT ScaleTransform(
[in] float HorizontalMultiplier,
[in] float VerticalMultiplier,
[in, optional, defaultvalue(-1)] VARIANT_BOOL ApplyOnPenWidth
);
[Microsoft® Visual Basic® 6.0]
Public Sub ScaleTransform( _
HorizontalMultiplier As Single, _
VerticalMultiplier As Single, _
[ApplyOnPenWidth As Boolean = True] _
)
Parameters
HorizontalMultiplier
[in] The factor to scale the X dimension in the view transform.
VerticalMultiplier
[in] The factor to scale the Y dimension in the view transform.
ApplyOnPenWidth
[in, optional] Whether to also apply the scale factors to the pen width. The default is TRUE.
Return Value
HRESULT value | Description |
---|---|
S_OK | Success. |
E_INK_EXCEPTION | An exception occurred inside the method. |
Example
[Visual Basic 6.0]
This Visual Basic 6.0 example demonstrates a call to ScaleTransform on an InkTransform, theInkTransform. The InkTransform is applied to the ink in the InkCollector, theInkCollector, when the command button, Command1, is tapped. When Command1 is tapped, the button's event handler adds a 200% horizontal and 75% vertical scaling factor to the object transform of the InkCollector object's corresponding InkRenderer object.
Option Explicit
Dim theInkCollector As InkCollector
Private Sub Command1_Click()
Dim theInkTransform As New InkTransform
theInkCollector.Renderer.GetObjectTransform theInkTransform
theInkTransform.ScaleTransform 2!, 0.75!
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