Matrix.Scale(Double, Double) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在此 Matrix 结构后面追加指定的缩放向量。
public:
void Scale(double scaleX, double scaleY);
public void Scale (double scaleX, double scaleY);
member this.Scale : double * double -> unit
Public Sub Scale (scaleX As Double, scaleY As Double)
参数
示例
以下示例演示如何缩放 Matrix 结构。
private Matrix scaleExample()
{
Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
// Scale myMatrix by a horizontal factor of 2
// and a vertical factor of 4 about the origin.
// After this operation,
// myMatrix is equal to (10, 40, 30, 80, 50, 120)
myMatrix.Scale(2, 4);
return myMatrix;
}
private Matrix scaleAboutPointExample()
{
Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
// Scale myMatrix by a horizontal factor of 2
// and a vertical factor of 4 about the
// point (100,100).
// After this operation,
// myMatrix is equal to (10, 40, 30, 80, -50, -180)
myMatrix.ScaleAt(2, 4, 100, 100);
return myMatrix;
}