comparison VNCServer/IFramebuffer.cs @ 23:644a923bca98

Added FBGUI and VNCServer
author Ivo Smits <Ivo@UCIS.nl>
date Mon, 15 Apr 2013 02:04:36 +0200
parents
children
comparison
equal deleted inserted replaced
22:5b14fed54a89 23:644a923bca98
1 using System;
2 using System.Drawing;
3
4 namespace UCIS.VNCServer {
5 /// <summary>
6 /// A generic graphic framebuffer interface that provides functions to draw to and copy from the framebuffer
7 /// </summary>
8 public interface IFramebuffer {
9 /// <summary>
10 /// The width of the framebuffer in pixels
11 /// </summary>
12 int Width { get; }
13 /// <summary>
14 /// The height of the framebuffer in pixels
15 /// </summary>
16 int Height { get; }
17 /// <summary>
18 /// Clear the display area
19 /// </summary>
20 void Clear();
21 /// <summary>
22 /// Draw part of an Image to the screen
23 /// </summary>
24 /// <remarks>Best performance is provided with Bitmap images.</remarks>
25 /// <param name="image">The Image object to copy from</param>
26 /// <param name="srcrect">The area in the image to copy</param>
27 /// <param name="dest">The position on screen to copy to</param>
28 void DrawImage(Image image, Rectangle srcrect, Point dest);
29 /// <summary>
30 /// Draw part of a 32 bits per pixel bitmap to the screen
31 /// </summary>
32 /// <param name="bitmap">The array that contains the Bitmap data (one pixel per entry)</param>
33 /// <param name="bmwidth">The width of the Bitmap data</param>
34 /// <param name="srcrect">The area in the bitmap to copy</param>
35 /// <param name="dest">The position on screen to copy to</param>
36 void DrawPixels(int[] bitmap, int bmwidth, Rectangle srcrect, Point dest);
37 /// <summary>
38 /// Draw part of a 32 bits per pixel bitmap to the screen
39 /// </summary>
40 /// <param name="bitmap">The pointer to the start of the Bitmap data</param>
41 /// <param name="bmwidth">The width of the Bitmap data</param>
42 /// <param name="srcrect">The area in the bitmap to copy</param>
43 /// <param name="dest">The position on screen to copy to</param>
44 void DrawPixels(IntPtr bitmap, int bmwidth, Rectangle srcrect, Point dest);
45
46 /// <summary>
47 /// Copy an area on the display
48 /// </summary>
49 /// <param name="srcrect">The area to copy from</param>
50 /// <param name="dest">Where to copy the area to</param>
51 void CopyRectangle(Rectangle srcrect, Point dest);
52
53 /// <summary>
54 /// Copy an area from this framebuffer to another framebuffer
55 /// </summary>
56 /// <remarks>Not all framebuffer implementations may support this operation, notably because some framebuffers can only be written to</remarks>
57 /// <param name="srcrect">The area to copy</param>
58 /// <param name="destbuffer">The framebuffer to copy to</param>
59 /// <param name="destposition">The position in the destination framebuffer to copy to</param>
60 void CopyRectangleTo(Rectangle srcrect, IFramebuffer destbuffer, Point destposition);
61 }
62 }