コード例 #1
0
        public unsafe ICursor CreateCursor(Image <Rgba32> image, Vector2i hotSpot)
        {
            fixed(Rgba32 *pixPtr = image.GetPixelSpan())
            {
                var gImg = new GlfwImage(image.Width, image.Height, (byte *)pixPtr);

                var(hotX, hotY) = hotSpot;
                var ptr = GLFW.CreateCursor(gImg, hotX, hotY);

                return(new CursorImpl(this, ptr, false));
            }
        }