aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.RemoteDesktop/Frames/RasterFrame.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.RemoteDesktop/Frames/RasterFrame.cs')
-rw-r--r--Software/Visual_Studio/Tango.RemoteDesktop/Frames/RasterFrame.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.RemoteDesktop/Frames/RasterFrame.cs b/Software/Visual_Studio/Tango.RemoteDesktop/Frames/RasterFrame.cs
index bcb372bd3..a9cbea6f2 100644
--- a/Software/Visual_Studio/Tango.RemoteDesktop/Frames/RasterFrame.cs
+++ b/Software/Visual_Studio/Tango.RemoteDesktop/Frames/RasterFrame.cs
@@ -110,6 +110,18 @@ namespace Tango.RemoteDesktop.Frames
}
/// <summary>
+ /// Draws the specified image on to this frame.
+ /// </summary>
+ /// <param name="bitmap">The bitmap.</param>
+ public virtual void DrawImage(Bitmap bitmap, Point position)
+ {
+ using (Graphics g = Graphics.FromImage(_bitmap))
+ {
+ g.DrawImage(bitmap, new Rectangle(position, bitmap.Size));
+ }
+ }
+
+ /// <summary>
/// Optimizes the bounds of this frame by removing unnecessary margins.
/// </summary>
/// <returns></returns>