Cairo.Matrix.Translate C# (CSharp) Метод

Translate() публичный Метод

public Translate ( double tx, double ty ) : void
tx double
ty double
Результат void
        public void Translate(double tx, double ty)
        {
            NativeMethods.cairo_matrix_translate (this, tx, ty);
        }

Usage Example

Пример #1
0
        public static Matrix GetTransform(this Node node)
        {
            double anchorX = node.AnchorX * node.Width;
            double anchorY = node.AnchorY * node.Height;

            Matrix transform = new Matrix ();
            transform.Translate (node.X + anchorX, node.Y + anchorY);
            transform.Rotate (node.Rotation);
            transform.Scale (node.Scale, node.Scale);
            transform.Translate (-anchorX, -anchorY);

            return transform;
        }
All Usage Examples Of Cairo.Matrix::Translate