using RealTimeGraphX.EventArguments; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace RealTimeGraphX { /// /// Represents a graph painter that can be connected as an output. /// The graph painter will receive data points from the graph renderer and paint the graph. /// The final result will be passed to the output . /// /// /// public interface IGraphPainter : IGraphComponent, IGraphOutputComponent { #region Events /// /// Occurs when the current painter transformation (Scale/Translate) has changed. /// event EventHandler TransformChanged; /// /// Occurs when the current virtual (effective minimum/maximum after transformation) x-axis minimum/maximum has changed. /// event EventHandler VirtualRangeXChanged; /// /// Occurs when the current virtual (effective minimum/maximum after transformation) y-axis minimum/maximum has changed. /// event EventHandler VirtualRangeYChanged; #endregion #region Properties /// /// Gets the current virtual (effective minimum/maximum after transformation) x-axis minimum. /// GraphDataPointBase VirtualMinimumX { get; } /// /// Gets the current virtual (effective minimum/maximum after transformation) x-axis maximum. /// GraphDataPointBase VirtualMaximumX { get; } /// /// Gets the current virtual (effective minimum/maximum after transformation) y-axis minimum. /// GraphDataPointBase VirtualMinimumY { get; } /// /// Gets the current virtual (effective minimum/maximum after transformation) y-axis maximum. /// GraphDataPointBase VirtualMaximumY { get; } /// /// Gets the last zooming rectangle that was passed on . /// GraphRect ZoomRect { get; } /// /// Gets the current painter transform object. /// The transform object is constructed based on the current . /// GraphTransform Transform { get; } /// /// Gets the width of the connected output surface. /// double SurfaceWidth { get; } /// /// Gets the height of the connected output surface. /// double SurfaceHeight { get; } #endregion #region Methods /// /// Sets the painter zooming rectangle. /// The zoom rectangle must be smaller than the size of the connected size. /// /// The rectangle. void SetZoomRect(GraphRect rect); /// /// Resets the painter zooming rectangle. /// void ResetZoomRect(); #endregion } /// /// Represents a graph painter that can be connected as an output. /// The graph painter will receive data points from the graph renderer and paint the graph. /// The final result will be passed to the output . /// /// The type of the graph data series. /// /// /// public interface IGraphPainter : IGraphPainter, IGraphInputComponent> where TDataSeries : IGraphDataSeries { #region Methods /// /// Draws the specified data point collection. /// /// The entire series collection. /// The data series. /// The points. void Draw(IEnumerable seriesCollection, TDataSeries series, IEnumerable points); #endregion } /// /// Represents a graph painter that can be connected as an output. /// The graph painter will receive data points from the graph renderer and paint the graph. /// The final result will be passed to the output via the event. /// /// The type of the image. /// The type of the graph data series. /// /// /// public interface IGraphPainter : IGraphPainter, IGraphPainter where TDataSeries : IGraphDataSeries { #region Events /// /// Occurs when the painter has a new graph image available. /// event EventHandler> PaintingCompleted; #endregion #region Properties /// /// Gets the current graph image. /// TImage Image { get; } #endregion } }