Поделиться через


Renderer.SetViewTransform - метод

Обновлен: Ноябрь 2007

Sets the Matrix object that represents the view transform that is used to render ink.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Sub SetViewTransform ( _
    viewTransform As Matrix _
)
'Применение
Dim instance As Renderer
Dim viewTransform As Matrix

instance.SetViewTransform(viewTransform)
public void SetViewTransform(
    Matrix viewTransform
)
public:
void SetViewTransform(
    Matrix^ viewTransform
)
public void SetViewTransform(
    Matrix viewTransform
)
public function SetViewTransform(
    viewTransform : Matrix
)

Параметры

  • viewTransform
    Тип: System.Drawing.Drawing2D.Matrix
    The Matrix object that represents the geometric transformation values—rotation, scaling, shear, and reflection—to use to transform the ink from ink space coordinates to logical device context coordinates.

Заметки

The transformation applies to both the points and the pen width.

View transformation occurs after object transformation.

Примеры

In this example, the GetViewTransform is used to obtain the current view transform matrix from the Renderer object in an InkOverlay object. Then a scaling factor of 2 in both the X and Y dimensions is applied. Finally, the SetViewTransform method is used to restore the original view transform.

' create a Matrix object and obtain the current view transform
Dim origViewTransform As Matrix = New Matrix()
mInkOverlay.Renderer.GetViewTransform(origViewTransform)
' scale the ink - this affects the view transform
mInkOverlay.Renderer.Scale(2.0F, 2.0F)
' later, you can restore the view transform back to the original
mInkOverlay.Renderer.SetViewTransform(origViewTransform)
// create a Matrix object and obtain the current view transform
Matrix origViewTransform = new Matrix();
mInkOverlay.Renderer.GetViewTransform(ref origViewTransform);
// scale the ink - this affects the view transform
mInkOverlay.Renderer.Scale(2.0f, 2.0f);
// later, you can restore the view transform back to the original
mInkOverlay.Renderer.SetViewTransform(origViewTransform);

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

Renderer Класс

Renderer - члены

Microsoft.Ink - пространство имен

Renderer.GetObjectTransform

Renderer.GetViewTransform

Renderer.SetObjectTransform