Share via


Matrix.ScaleAtPrepend(Double, Double, Double, Double) 메서드

정의

지정한 점을 기준으로 하는 지정한 배율 조정을 이 Matrix 앞에 추가합니다.

public:
 void ScaleAtPrepend(double scaleX, double scaleY, double centerX, double centerY);
public void ScaleAtPrepend (double scaleX, double scaleY, double centerX, double centerY);
member this.ScaleAtPrepend : double * double * double * double -> unit
Public Sub ScaleAtPrepend (scaleX As Double, scaleY As Double, centerX As Double, centerY As Double)

매개 변수

scaleX
Double

X축 배율 인수입니다.

scaleY
Double

Y축 배율 인수입니다.

centerX
Double

배율 조정 작업을 수행할 때 기준으로 사용할 점의 X 좌표입니다.

centerY
Double

배율 조정 작업을 수행할 때 기준으로 사용할 점의 Y 좌표입니다.

예제

다음 예제에서는 눈금을 추가 하는 방법을 보여 줍니다는 Matrix합니다.


private Matrix scalePrependExample()
{
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
    
    // Prepend a scale ab with a horizontal factor of 2
    // and a vertical factor of 4 about the origin.
    // After this operation,
    // myMatrix is equal to (10, 20, 60, 80, 25, 30)
    myMatrix.ScalePrepend(2, 4);
    
    return myMatrix;
}

private Matrix scalePrependAboutPointExample()
{
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
    
    // Prepend a scale with a horizontal factor of 2
    // and a vertical factor of 4 about the 
    // point (100,100).
    // After this operation,
    // myMatrix is equal to (10, 20, 60, 80, -4975, -6970)
    myMatrix.ScaleAtPrepend(2, 4, 100, 100);
    
    return myMatrix;
}

설명

복합 변환에서 개별 변환의 순서가 중요 합니다. 예를 들어 경우 먼저 회전 다음 크기 조정, 변환, 결과 얻게 다른 보다 먼저 변환 하는 경우 다음 회전 하 고 확장 합니다. 순서는 중요 한 이유 등 회전 및 배율 조정 변환 좌표계의 원점을 기준으로 수행 되는 경우 원점에서 이동 된 개체 크기 조정 결과 서로 다르게 생성 원점에 중점을 두는 개체를 확장 합니다. 마찬가지로, 개체를 회전 하면 원점에 중점을 두는 원본에서 이동 된 개체를 회전 다른 결과 생성 합니다.

적용 대상