Пример #1
0
        private unsafe int PresentHook(
            IntPtr devicePtr,
            Rectangle *pSourceRect,
            Rectangle *pDestRect,
            IntPtr hDestWindowOverride,
            IntPtr pDirtyRegion)
        {
            int hresult;
            var device = (Device)devicePtr;

            if (!_hooksStarted)
            {
                hresult = Direct3DDevice_PresentHook.Original(devicePtr, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
                return(hresult);
            }
            try
            {
                if (_presentHookRecurse == 0)
                {
                    DoCaptureRenderTarget(device, "PresentHook");
                }
            }
            catch (Exception ex)
            {
                DebugMessage(ex.ToString());
            }
            finally
            {
                _presentHookRecurse++;
                hresult = Direct3DDevice_PresentHook.Original(devicePtr, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
                _presentHookRecurse--;
            }
            return(hresult);
        }
Пример #2
0
 internal static unsafe extern void ApplyProofingTransform(
     LCMSTransformHandle hTransform,
     [In()] ref LCMSStructs.BitmapData source,
     [In()] ref LCMSStructs.BitmapData dest,
     Rectangle *rois,
     int length
     );
Пример #3
0
        unsafe public AwakeSelectionForm(Rectangle *pRect)
        {
            InitializeComponent();
            m_pRect = pRect;

            this.Text = ProcessSelector.BotWindowName;
        }
Пример #4
0
        protected unsafe override void WndProc(ref Message m)
        {
            if (m.Msg == 0x0007)
            {
                // Return focus to the old control upon gaining focus.
                SetFocus(m.WParam);
                m.Result = new IntPtr(1);
            }
            else if (m.Msg == 0x008)
            {
                // Re-enable the tab page after it rejects focus and before it gets painted.
                SelectedTab.Enabled = true;
                base.WndProc(ref m);
            }
            else if (m.Msg == 0x1328 && DesignMode)
            {
                // Trim off the extra borders while in design mode.
                Rectangle *rect = (Rectangle *)m.LParam;
                rect->X      -= 4;
                rect->Width  += 4;
                rect->Height += 4;

                base.WndProc(ref m);
            }
            else if (m.Msg == 0x1328 && !DesignMode)
            {
                // Hide tabs and remove padding by trapping the TCM_ADJUSTRECT message.
                m.Result = new IntPtr(1);
            }
            else
            {
                base.WndProc(ref m);
            }
        }
Пример #5
0
        // Used in the overlay
        private unsafe int PresentExHook(IntPtr devicePtr, Rectangle *pSourceRect, Rectangle *pDestRect, IntPtr hDestWindowOverride, IntPtr pDirtyRegion, Present dwFlags)
        {
            _isUsingPresent = true;
            var device = (DeviceEx)devicePtr;

            DoCaptureRenderTarget(device, "PresentEx");

            return(Direct3DDeviceEx_PresentExHook.Original(devicePtr, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags));
        }
Пример #6
0
        protected unsafe virtual void WndProcDesign(ref Message m)
        {
            if (m.Msg == TCM_ADUSTRECT)
            {
                // Trim off the extra borders
                Rectangle *rect = (Rectangle *)m.LParam;
                rect->Offset(-4, -4);
                rect->Width  += 4;
                rect->Height += 4;
            }

            base.WndProc(ref m);
        }
Пример #7
0
        private unsafe int Detour_Present(
            IntPtr device,
            Rectangle *sourceRectangle,
            Rectangle *destRectangle,
            IntPtr destWindowOverride,
            IntPtr dirtyRegion)
        {
            _isUsingPresentHook = true;

            Device d3Device = (Device)device;

            DrawFramesPerSecond(d3Device);

            return(_d3DPresentHook.Original(device, sourceRectangle, destRectangle, destWindowOverride, dirtyRegion));
        }
Пример #8
0
        public static unsafe void Draw(Complex *buf, Rectangle *rects, int len)
        {
            Raylib.ClearBackground(new Color(32, 32, 32, 255));

            var width = (float)Raylib.GetScreenWidth();
            var gap   = width / (len + 1);

            for (var i = 0; i < len; i++)
            {
                var value = buf[i].X * 12.5f;
                var rect  = rects[i];

                rect.x      = gap * i;
                rect.y      = Raylib.GetScreenHeight() - value;
                rect.width  = gap;
                rect.height = value;

                Raylib.DrawRectangleRec(rect, Color.RED);
            }
        }
Пример #9
0
        private unsafe int PresentExHook(
            IntPtr devicePtr,
            Rectangle *pSourceRect,
            Rectangle *pDestRect,
            IntPtr hDestWindowOverride,
            IntPtr pDirtyRegion,
            Present dwFlags)
        {
            int hresult = Result.Ok.Code;
            var device  = (DeviceEx)devicePtr;

            if (!hooksStarted)
            {
                hresult = Direct3DDeviceEx_PresentExHook.Original(devicePtr, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
                return(hresult);
            }

            try
            {
                if (this.presentHookRecurse == 0)
                {
                    this.DoCaptureRenderTarget(device, "PresentEx");
                }
            }
            catch (Exception ex)
            {
                DebugMessage(ex.ToString());
            }
            finally
            {
                this.presentHookRecurse++;
                hresult = Direct3DDeviceEx_PresentExHook.Original(devicePtr, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
                this.presentHookRecurse--;
            }
            return(hresult);
        }
Пример #10
0
 public unsafe void SetArea(Rectangle *area)
 {
     this.Area = *area;
 }
Пример #11
0
 internal static extern int GdipRecordMetafileStreamI(IntPtr stream, IntPtr referenceHdc, EmfType emfType, Rectangle *frameRect, MetafileFrameUnit frameUnit, string?description, IntPtr *metafile);
Пример #12
0
 internal static extern int GdipDrawRectanglesI(HandleRef graphics, HandleRef pen, Rectangle *rects, int count);
Пример #13
0
 internal static extern int GdipFillRectanglesI(HandleRef graphics, HandleRef brush, Rectangle *rects, int count);
Пример #14
0
 private static extern unsafe bool ovrHmd_AttachToWindow(IntPtr hmd, IntPtr hwnd, Rect *destMirrorRect, Rectangle *sourceRenderTargetRect);
Пример #15
0
 public unsafe void Draw2D(Texture srcTexture, Rectangle *srcRectangle, SizeF *destinationSize, PointF *center, float rotationAngle, PointF position, int color)
 {
     throw new NotImplementedException();
 }
 internal static extern int GdipAddPathRectanglesI(HandleRef path, Rectangle *rects, int count);
Пример #17
0
 public static unsafe extern bool ExtTextOut(IntPtr hdc, int x, int y, uint fuOptions,
                                             Rectangle *lpRect, char[] charBuffer, int cbCount, object arrayOfSpaceValues);
Пример #18
0
 public static extern unsafe void Render(SafeEnvironmentDataHandle handle, Rectangle *rois, int length, [In] ref BitmapData data);
Пример #19
0
            internal static partial int GdipAddPathRectanglesI(
#if NET7_0_OR_GREATER
                [MarshalUsing(typeof(HandleRefMarshaller))]
#endif
                HandleRef path, Rectangle *rects, int count);
Пример #20
0
 static extern unsafe void ClipCursor(Rectangle *rect);
Пример #21
0
 public static int SDL_GetDisplayBounds(int displayIndex, Rectangle *rect) => s_sdl_getDisplayBounds(displayIndex, rect);
Пример #22
0
 public unsafe void Draw(Texture srcTexture, Rectangle *srcRectangle, Vector3 center, Vector3 position, int color)
 {
     throw new NotImplementedException();
 }