Stroke.Transform(Matrix, Boolean) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 개체에 따라 변환을 Matrix 수행합니다.
public:
virtual void Transform(System::Windows::Media::Matrix transformMatrix, bool applyToStylusTip);
public virtual void Transform(System.Windows.Media.Matrix transformMatrix, bool applyToStylusTip);
abstract member Transform : System.Windows.Media.Matrix * bool -> unit
override this.Transform : System.Windows.Media.Matrix * bool -> unit
Public Overridable Sub Transform (transformMatrix As Matrix, applyToStylusTip As Boolean)
매개 변수
- applyToStylusTip
- Boolean
true스타일러스의 끝에 변환을 적용하려면 입니다. 그렇지 않으면 . false
예제
다음 예제에서는 개체를 변환 Stroke 하는 방법을 보여 줍니다.
protected DrawingVisual DrawDCOnly(Stroke myStroke)
{
// Create new Visual context to draw on
DrawingVisual myVisual = new DrawingVisual();
DrawingContext myContext = myVisual.RenderOpen();
// myMatrix is scaled by:
// myMatrix.Scale(0.5, 0.5)
myStroke.Transform(myMatrix, false);
// Draw the stroke on the Visual context using DrawingContext
myStroke.Draw(myContext);
// Close the context
myContext.Close();
return myVisual;
}
Function DrawDCOnly(ByVal myStroke As Stroke) As DrawingVisual
' Create new Visual context to draw on
Dim myVisual As DrawingVisual = New DrawingVisual()
Dim myContext As DrawingContext = myVisual.RenderOpen()
' myMatrix is scaled by:
' myMatrix.Scale(0.5, 0.5)
myStroke.Transform(myMatrix, False)
' Draw the stroke on the Visual context using DrawingContext
myStroke.Draw(myContext)
' Close the context
myContext.Close()
Return myVisual
End Function
설명
개체는 Matrix 2차원 공간의 변환에 사용되는 3x3 행렬을 나타냅니다. Stroke 개체의 각 지점은 제공된 행렬에 의해 변환됩니다. 예를 들어 원래 Point.X 값이 100이고 원래 Point.Y 값이 55이고 변환 Matrix.Scale(0.5, 0.5)이면 새 Point.X 값은 50이고 새 Point.Y 값은 27.5입니다.