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


Renderer.SetObjectTransform - метод

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

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

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

Синтаксис

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

instance.SetObjectTransform(objectTransform)
public void SetObjectTransform(
    Matrix objectTransform
)
public:
void SetObjectTransform(
    Matrix^ objectTransform
)
public void SetObjectTransform(
    Matrix objectTransform
)
public function SetObjectTransform(
    objectTransform : Matrix
)

Параметры

  • objectTransform
    Тип: System.Drawing.Drawing2D.Matrix
    The Matrix object that represents the geometric transformation values—rotation, scaling, shear, and reflection—to use to transform the coordinates of the ink, using ink space coordinates.

Заметки

The transformation applies to the points, but not the pen width.

Object transformation occurs before view transformation.

Примеры

In this example, the GetObjectTransform is used to obtain the current object 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. Because false is passed to the applyOnPenWidth parameter, the width of the Ink is not scaled. Finally, the SetObjectTransform method is used to restore the original object transform.

' create a Matrix object and obtain the current object transform
Dim origObjectTransform As Matrix = New Matrix()
mInkOverlay.Renderer.GetObjectTransform(origObjectTransform)
' scale the ink (without scaling the ink width)- this affects the object transform
mInkOverlay.Renderer.Scale(2.0F, 2.0F, False)
' later, you can restore the object transform back to the original
mInkOverlay.Renderer.SetObjectTransform(origObjectTransform)
// create a Matrix object and obtain the current object transform
Matrix origObjectTransform = new Matrix();
mInkOverlay.Renderer.GetObjectTransform(ref origObjectTransform);
// scale the ink (without scaling the ink width)- this affects the object transform
mInkOverlay.Renderer.Scale(2.0f, 2.0f, false);
// later, you can restore the object transform back to the original
mInkOverlay.Renderer.SetObjectTransform(origObjectTransform);

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

Renderer Класс

Renderer - члены

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

Renderer.GetObjectTransform

Renderer.GetViewTransform

Renderer.SetViewTransform