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

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

public InitIdentity ( ) : void
Результат void
        public void InitIdentity()
        {
            // this.Init(1,0,0,1,0,0);
            NativeMethods.cairo_matrix_init_identity (this);
        }

Usage Example

Пример #1
0
        public Matrix Fit(Gdk.Rectangle viewport)
        {
            Matrix m = new Matrix ();
            m.InitIdentity ();

            double scale = Math.Min (viewport.Width / (double) Bounds.Width,
                         viewport.Height / (double) Bounds.Height);

            double x_offset = (viewport.Width  - Bounds.Width * scale) / 2.0;
            double y_offset = (viewport.Height  - Bounds.Height * scale) / 2.0;

            m.Translate (x_offset, y_offset);
            m.Scale (scale, scale);
            return m;
        }
All Usage Examples Of Cairo.Matrix::InitIdentity