1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-30 02:55:23 +00:00
OpenDiablo2/OpenDiablo2.SDL2/SDL2Extensions.cs
2018-11-27 01:04:27 -05:00

12 lines
405 B
C#

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 };
}
}