aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphXNet/RealTimeGraphX/IGraphSurface.cs
blob: a3aeb90d98e94fdf8844f5ed3e69590e292ca990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using RealTimeGraphX.EventArguments;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

namespace RealTimeGraphX
{
    /// <summary>
    /// Represents a graph drawing surface capable of drawing a series of points submitted by a graph renderer.
    /// </summary>
    public interface IGraphSurface : IGraphComponent
    {
        /// <summary>
        /// Occurs when the surface size has changed.
        /// </summary>
        event EventHandler SurfaceSizeChanged;

        /// <summary>
        /// Occurs when the surface zoom rectangle has changed.
        /// </summary>
        event EventHandler ZoomRectChanged;

        /// <summary>
        /// Returns the actual size of the surface.
        /// </summary>
        /// <returns></returns>
        SizeF GetSize();

        /// <summary>
        /// Returns the current bounds of the zooming rectangle.
        /// </summary>
        /// <returns></returns>
        RectangleF GetZoomRect();
    }

    /// <summary>
    /// Represents a graph drawing surface capable of drawing a series of points submitted by a graph renderer.
    /// </summary>
    /// <typeparam name="TDataSeries">The type of the data series.</typeparam>
    /// <seealso cref="RealTimeGraphX.IGraphComponent" />
    public interface IGraphSurface<TDataSeries> : IGraphSurface where TDataSeries : IGraphDataSeries
    {
        /// <summary>
        /// Called before drawing has started.
        /// </summary>
        void BeginDraw();

        /// <summary>
        /// Draws the stroke of the specified data series points.
        /// </summary>
        /// <param name="dataSeries">The data series.</param>
        /// <param name="points">The points.</param>
        void DrawSeries(TDataSeries dataSeries, IEnumerable<PointF> points);

        /// <summary>
        /// Fills the specified data series points.
        /// </summary>
        /// <param name="dataSeries">The data series.</param>
        /// <param name="points">The points.</param>
        void FillSeries(TDataSeries dataSeries, IEnumerable<PointF> points);

        /// <summary>
        /// Applies transformation on the current pass.
        /// </summary>
        /// <param name="transform">The transform.</param>
        void SetTransform(GraphTransform transform);

        /// <summary>
        /// Called when drawing has completed.
        /// </summary>
        void EndDraw();
    }
}