示例#1
0
        /// <summary>
        ///   Allows what's behind the window to show through when clearing to a transparent color.
        /// </summary>
        /// <param name="wnd">
        ///   The window.
        /// </param>
        public static void AllowTransparentWindow(SFML.Window.Window wnd)
        {
            if (wnd == null)
            {
                return;
            }

            MARGINS margins = new MARGINS()
            {
                leftWidth = -1
            };

            SetWindowLong(wnd.SystemHandle, (int)WindowFlags.GWL_STYLE, (uint)(WindowStyles.WS_POPUP | WindowStyles.WS_VISIBLE));
            DwmExtendFrameIntoClientArea(wnd.SystemHandle, ref margins);
        }
示例#2
0
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Update a texture from the contents of a window
 /// </summary>
 /// <param name="window">Window to copy to the texture</param>
 /// <param name="x">X offset in the texture where to copy the source pixels</param>
 /// <param name="y">Y offset in the texture where to copy the source pixels</param>
 ////////////////////////////////////////////////////////////
 public void Update(SFML.Window.Window window, uint x, uint y)
 {
     sfTexture_updateFromWindow(CPointer, window.CPointer, x, y);
 }
示例#3
0
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Update a texture from the contents of a window
 /// </summary>
 /// <param name="window">Window to copy to the texture</param>
 ////////////////////////////////////////////////////////////
 public void Update(SFML.Window.Window window)
 {
     Update(window, 0, 0);
 }