mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-05 09:47:18 -05:00
12 lines
405 B
C#
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 };
|
|||
|
}
|
|||
|
}
|