Renderer.Scale Method

Renderer.Scale Method

Scales the view transform in the X and Y dimensions.

Definition

Visual Basic .NET Public Sub Scale( _
ByVal scaleX As Single, _
ByVal scaleY As Single, _
ByVal applyOnPenWidth As Boolean _
)
C# public void Scale(
float scaleX,
float scaleY,
bool applyOnPenWidth
);
Managed C++ public: void Scale(
float *scaleX,
float *scaleY,
bool *applyOnPenWidth
);

Parameters

> > >
scaleX System.Single. The factor to scale the X dimension of the ink in the view transform.
scaleY System.Single. The factor to scale the Y dimension of the ink in the view transform.
applyOnPenWidth System.Boolean. A value that indicates whether to apply the scale factors to the width of the drawing attributes of the ink in addition to the overall dimensions of the ink.

true This method applies the scale factors to the pen width.
false This method does not scale the pen width.

Examples

[C#]

This C# example saves the current view transform matrix from the Renderer object in the InkCollector object, theInkCollector, and then applies a scaling factor of 2 in the X dimension and 0.75 in the Y dimension. The width of the drawing attributes of the is not scaled.

using System.Drawing.Drawing2D;
...
Matrix theOldMatrix = new Matrix();
theInkCollector.Renderer.GetViewTransform(ref theOldMatrix);
theInkCollector.Renderer.Scale(2.0f, 0.75f, false);
...
                

[VB.NET]

This Microsoft® Visual Basic® .NET example saves the current view transform matrix from the Renderer object in the InkCollector object, theInkCollector, and then applies a scaling factor of 2 in the X dimension and 0.75 in the Y dimension. The width of the drawing attributes of the ink is not scaled.

Imports System.Drawing.Drawing2D
...
Dim theOldMatrix As New Matrix()
theInkCollector.Renderer.GetViewTransform(theOldMatrix)
theInkCollector.Renderer.Scale(2.0, 0.75, false)
...
            

See Also