/// <summary> /// Creates a new instance of the <see cref="Cursor"/> class. /// </summary> /// <param name="surface">The <see cref="Surface2D"/> that contains the cursor image.</param> /// <param name="hx">The x-coordinate of the cursor's hotspot.</param> /// <param name="hy">The y-coordinate of the cursor's hotspot.</param> /// <returns>The instance of <see cref="Cursor"/> that was created.</returns> public static Cursor Create(Surface2D surface, Int32 hx, Int32 hy) { Contract.Require(surface, nameof(surface)); var uv = UltravioletContext.DemandCurrent(); return(uv.GetFactoryMethod <CursorFactory>()(uv, surface, hx, hy)); }
/// <summary> /// Creates a new instance of the <see cref="SwapChainManager"/> class. /// </summary> /// <returns>The <see cref="SwapChainManager"/> instance that was created.</returns> public static SwapChainManager Create() { var uv = UltravioletContext.DemandCurrent(); return(uv.GetFactoryMethod <SwapChainManagerFactory>()(uv)); }