1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-05 09:47:18 -05:00
OpenDiablo2/OpenDiablo2.SDL2/SDL2Extensions.cs

12 lines
405 B
C#
Raw Normal View History

using System.Drawing;
using SDL2;
namespace OpenDiablo2.SDL2_
{
public static class SDL2Extensions
{
public static SDL.SDL_Rect ToSDL2Rect(this Rectangle src) => new SDL.SDL_Rect { x = src.X, y = src.Y, w = src.Width, h = src.Height };
public static Rectangle ToRectangle(this SDL.SDL_Rect src) => new Rectangle { X = src.x, Y = src.y, Width = src.w, Height = src.h };
}
}