System.Drawing.Graphics.setupView C# (CSharp) Method

setupView() private method

private setupView ( ) : void
return void
        void setupView()
        {
            initializeMatrix(ref viewMatrix, isFlipped);
            // * NOTE * Here we offset our drawing by the subview Clipping region of the Window
            // this is so that we start at offset 0,0 for all of our graphic operations
            viewMatrix.Translate(subviewClipOffset.Location.X, subviewClipOffset.Y, MatrixOrder.Append);

            // Take into account retina diplays
            viewMatrix.Scale(screenScale, screenScale);

            userspaceScaleX = GraphicsUnitConvertX(1) * pageScale;
            userspaceScaleY = GraphicsUnitConvertY(1) * pageScale;
            viewMatrix.Scale(userspaceScaleX, userspaceScaleY);
            viewMatrix.Translate(renderingOrigin.X * userspaceScaleX,
                                 -renderingOrigin.Y * userspaceScaleY,MatrixOrder.Append);
            applyModelView();
        }