void renderHandler_GetViewRect(object sender, Chromium.Event.CfxGetViewRectEventArgs e)
 {
     e.Rect.X      = 0;
     e.Rect.Y      = 0;
     e.Rect.Width  = width;
     e.Rect.Height = height;
     e.SetReturnValue(true);
 }
Ejemplo n.º 2
0
        void renderHandler_GetViewRect(object sender, Chromium.Event.CfxGetViewRectEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke((MethodInvoker)(() => renderHandler_GetViewRect(sender, e)));
                return;
            }

            if (!IsDisposed)
            {
                var origin = PointToScreen(new Point(0, 0));
                e.Rect.X      = origin.X;
                e.Rect.Y      = origin.Y;
                e.Rect.Width  = Width;
                e.Rect.Height = Height;
                e.SetReturnValue(true);
            }
        }