aboutsummaryrefslogtreecommitdiffstatsci
path: root/Drawing2D/src/IBackend.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-11-24 23:50:38 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-11-24 23:50:38 +0100
commitb25ad7a6e15a7284e40407377a1624747ffe42e5 (patch)
treef53a12fb2120eb7f1b82ccfbda37a2430c5be330 /Drawing2D/src/IBackend.cs
parent09026f4328d0e578823062d6506ffdacac457b25 (diff)
IBackend instead of IDevice to bind to Interface
Diffstat (limited to 'Drawing2D/src/IBackend.cs')
-rw-r--r--Drawing2D/src/IBackend.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/Drawing2D/src/IBackend.cs b/Drawing2D/src/IBackend.cs
new file mode 100644
index 00000000..811b95d5
--- /dev/null
+++ b/Drawing2D/src/IBackend.cs
@@ -0,0 +1,37 @@
+// Copyright (c) 2018-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+
+using System;
+using System.IO;
+
+namespace Drawing2D
+{
+ public interface IBackend: IDisposable
+ {
+ ISurface CreateSurface (int width, int height);
+ ISurface CreateSurface (byte[] data, int width, int height);
+ //ISurface CreateMainSurface (IntPtr glfwWinHandle, int width, int height);
+ ISurface MainSurface { get; }
+ IRegion CreateRegion ();
+ IContext CreateContext (ISurface surf);
+ //IPattern CreatePattern (PatternType patternType);
+ IGradient CreateGradient (GradientType gradientType, Rectangle bounds);
+ byte[] LoadBitmap (Stream stream, out Size dimensions);
+ ISvgHandle LoadSvg (Stream stream);
+ ISvgHandle LoadSvg (string svgFragment);
+ IContext PrepareUIFrame (IContext existingContext, IRegion clipping);
+ void FlushUIFrame (IContext ctx);
+ /*IRegion CreateRegion ();
+ ISurface CreateSurface (int width, int height);
+ ISurface CreateSurface (byte[] data, int width, int height);
+ ISurface CreateSurface (IntPtr glfwWinHandle, int width, int height);
+ IContext CreateContext (ISurface surf);
+ //IPattern CreatePattern (PatternType patternType);
+ IGradient CreateGradient (GradientType gradientType, Rectangle bounds);
+ byte[] LoadBitmap (Stream stream, out Size dimensions);
+ ISvgHandle LoadSvg (Stream stream);
+ ISvgHandle LoadSvg (string svgFragment);*/
+ }
+}
+