void AddTransform(XMatrix transform, XMatrixOrder order)
{
//if (!this.transform.Equals(value))
{
XMatrix matrix = this.transform;
matrix.Multiply(transform, order);
this.transform = matrix;
matrix = this.defaultViewMatrix;
matrix.Multiply(this.transform, XMatrixOrder.Prepend);
#if GDI
if (this.targetContext == XGraphicTargetContext.GDI)
{
#if DEBUG
System.Drawing.Drawing2D.Matrix m = (System.Drawing.Drawing2D.Matrix)matrix;
this.gfx.Transform = m;
#else
this.gfx.Transform = (System.Drawing.Drawing2D.Matrix)matrix;
#endif
}
#endif
#if WPF
if (this.targetContext == XGraphicTargetContext.WPF)
{
#if !SILVERLIGHT
MatrixTransform mt = new MatrixTransform(transform.ToWpfMatrix());
#else
MatrixTransform mt = new MatrixTransform();
mt.Matrix = transform.ToWpfMatrix();
#endif
if (order == XMatrixOrder.Append)
mt = (MatrixTransform)mt.Inverse;
this.gsStack.Current.SetTransform(mt);
}
#endif
if (this.renderer != null)
this.renderer.Transform = this.transform;
}
}