# Matrix.ScaleAtPrepend(Double, Double, Double, Double) 方法

## 定義

``````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 軸的縮放因數。The x-axis scale factor.

scaleY
Double

Y 軸的縮放因數。The y-axis scale factor.

centerX
Double

centerY
Double

## 範例

``````
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;
}

``````