aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.RemoteDesktop/IFrame.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-03-02 23:30:34 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-03-02 23:30:34 +0200
commit0dcd742a3c35527386a93e1b1ef761c2aeff8308 (patch)
treed5adb3fee35e73af95fa5d68b5316d25522471de /Software/Visual_Studio/Tango.RemoteDesktop/IFrame.cs
parent1a7fb274158f8a0e279aef26206a65fefac8c4c3 (diff)
downloadTango-0dcd742a3c35527386a93e1b1ef761c2aeff8308.tar.gz
Tango-0dcd742a3c35527386a93e1b1ef761c2aeff8308.zip
Implemented Tango.RemoteDesktop.
Implemented png 8 bit quantization. Implemented RasterFrame bounds clipping. Refactored VectorFrame to use indexed colors.
Diffstat (limited to 'Software/Visual_Studio/Tango.RemoteDesktop/IFrame.cs')
-rw-r--r--Software/Visual_Studio/Tango.RemoteDesktop/IFrame.cs53
1 files changed, 53 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.RemoteDesktop/IFrame.cs b/Software/Visual_Studio/Tango.RemoteDesktop/IFrame.cs
new file mode 100644
index 000000000..f5a69218d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.RemoteDesktop/IFrame.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media.Imaging;
+
+namespace Tango.RemoteDesktop
+{
+ /// <summary>
+ /// Represents an image frame.
+ /// </summary>
+ /// <seealso cref="System.IDisposable" />
+ public interface IFrame : IDisposable
+ {
+ /// <summary>
+ /// Gets the frame width.
+ /// </summary>
+ int Width { get; }
+
+ /// <summary>
+ /// Gets the frame height.
+ /// </summary>
+ int Height { get; }
+
+ /// <summary>
+ /// Returns a GDI bitmap representing the frame.
+ /// </summary>
+ /// <returns></returns>
+ Bitmap ToBitmap();
+
+ /// <summary>
+ /// Returns a WPF BitmapSource representing the frame.
+ /// </summary>
+ /// <returns></returns>
+ BitmapSource ToBitmapSource();
+
+ /// <summary>
+ /// Applies this frame onto an existing bitmap.
+ /// </summary>
+ /// <param name="bitmap">The bitmap.</param>
+ void Apply(Bitmap bitmap);
+
+ /// <summary>
+ /// Returns an instance of <see cref="IFrameEncoder"/> ready to encode this frame.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <returns></returns>
+ IFrameEncoder ToEncoder<T>() where T : IFrameEncoder;
+ }
+}