Strokes.Shear - метод
Обновлен: Ноябрь 2007
Shears the Strokes collection by the specified horizontal and vertical factors.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Sub Shear ( _
shearX As Single, _
shearY As Single _
)
'Применение
Dim instance As Strokes
Dim shearX As Single
Dim shearY As Single
instance.Shear(shearX, shearY)
public void Shear(
float shearX,
float shearY
)
public:
void Shear(
float shearX,
float shearY
)
public void Shear(
float shearX,
float shearY
)
public function Shear(
shearX : float,
shearY : float
)
Параметры
- shearX
Тип: System.Single
The horizontal factor of the shear.
- shearY
Тип: System.Single
The vertical factor of the shear.
Заметки
The transformation applied in this method is a pure shear only if one of the parameters is 0. Applied to a rectangle at the origin, when the shearY factor is 0, the transformation moves the bottom edge horizontally by shearX times the height of the rectangle. When the shearX factor is 0, it moves the right edge vertically by shearY times the width of the rectangle.
Примечание. |
---|
When both parameters are nonzero, the results may not be intuitive. |
This method throws an exception if the shear is non-invertible. The shear is non-invertible if the product of the shearX and shearY parameters equals 1.
Примеры
In this example, a horizontal shear of 0.5 is applied to the Strokes collection of an InkOverlay object.
' Access to the Strokes property returns a copy of the Strokes object.
' This copy must be implicitly (via using statement) or explicitly
' disposed of in order to avoid a memory leak.
Using allStrokes As Strokes = mInkOverlay.Ink.Strokes
allStrokes.Shear(0.5F, 0.0F)
End Using
// Access to the Strokes property returns a copy of the Strokes object.
// This copy must be implicitly (via using statement) or explicitly
// disposed of in order to avoid a memory leak.
using (Strokes allStrokes = mInkOverlay.Ink.Strokes)
{
allStrokes.Shear(0.5f, 0.0f);
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0