次の方法で共有


Renderer.Scale メソッド (Single, Single)

X 次元および Y 次元の GetViewTransform をスケーリングします。スケール ファクタは、インクの描画属性の幅に適用されます。

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

構文

'宣言
Public Sub Scale ( _
    scaleX As Single, _
    scaleY As Single _
)
'使用
Dim instance As Renderer
Dim scaleX As Single
Dim scaleY As Single

instance.Scale(scaleX, scaleY)
public void Scale(
    float scaleX,
    float scaleY
)
public:
void Scale(
    float scaleX, 
    float scaleY
)
public void Scale(
    float scaleX,
    float scaleY
)
public function Scale(
    scaleX : float, 
    scaleY : float
)

パラメータ

  • scaleX
    型 : System.Single
    ビュー変換においてインクの X 次元をスケーリングするファクタ。
  • scaleY
    型 : System.Single
    ビュー変換においてインクの Y 次元をスケーリングするファクタ。

解説

このオーバーロードは、インクの描画属性の幅にスケール ファクタを自動的に適用します。インクの幅にスケール ファクタを適用するかどうかを選択するには、このメソッドの Scale(Single, Single, Boolean) オーバーロードを使用します。

この例では、GetViewTransform を使用して InkOverlay オブジェクトにある Renderer オブジェクトから現在のビュー変換行列を取得します。次に、X および Y の両方向に対して、スケール ファクタ 2 が適用されます。最後に、SetViewTransform メソッドを使用して元のビュー変換が復元されます。

' 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 メンバ

Scale オーバーロード

Microsoft.Ink 名前空間

Renderer.GetViewTransform

Stroke.Scale

Strokes.Scale