次の方法で共有


Renderer.GetObjectTransform メソッド

インクのレンダリングに使用されたオブジェクト変換を表す Matrix オブジェクトを識別します。

名前空間 :  Microsoft.Ink
アセンブリ :  Microsoft.Ink (Microsoft.Ink.dll 内)

構文

'宣言
Public Sub GetObjectTransform ( _
    ByRef objectTransform As Matrix _
)
'使用
Dim instance As Renderer
Dim objectTransform As Matrix

instance.GetObjectTransform(objectTransform)
public void GetObjectTransform(
    ref Matrix objectTransform
)
public:
void GetObjectTransform(
    Matrix^% objectTransform
)
public void GetObjectTransform(
    /** @ref */Matrix objectTransform
)
public function GetObjectTransform(
    objectTransform : Matrix
)

パラメータ

  • objectTransform
    型 : System.Drawing.Drawing2D.Matrix%
    インク空間内でストローク座標の変換に使用するジオメトリック変換値 (回転、スケーリング、傾斜、および反転) を表す Matrix オブジェクト。

解説

変換がポイントに適用されますが、ペンの幅には適用されません。

オブジェクト変換は、ビュー変換の前に発生します。

この例では、GetObjectTransform を使用して InkOverlay オブジェクトにある Renderer オブジェクトから現在のオブジェクト変換行列を取得します。次に、X および Y の両方向に対して、スケール ファクタ 2 が適用されます。applyOnPenWidth パラメータに false が渡されているため、インクの幅はスケーリングの対象になりません。最後に、SetObjectTransform メソッドを使用して元のオブジェクト変換が復元されます。

' 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.SetObjectTransform

Renderer.GetViewTransform

Renderer.SetViewTransform