// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) 2014 OxyPlot contributors // // // Provides an empty that does nothing. // // -------------------------------------------------------------------------------------------------------------------- namespace PerformanceTest { using System.Collections.Generic; using OxyPlot; /// /// Provides an empty that does nothing. /// public class EmptyRenderContext : IRenderContext { /// /// Gets a value indicating whether the context renders to screen. /// /// /// true if the context renders to screen; otherwise, false. /// public bool RendersToScreen { get { return true; } } /// /// Draws an ellipse. /// /// The rectangle. /// The fill color. If set to OxyColors.Undefined, the ellipse will not be filled. /// The stroke color. If set to OxyColors.Undefined, the ellipse will not be stroked. /// The thickness (in device independent units, 1/96 inch). public void DrawEllipse(OxyRect rect, OxyColor fill, OxyColor stroke, double thickness = 1) { } /// /// Draws a collection of ellipses, where all have the same stroke and fill. /// This performs better than calling DrawEllipse multiple times. /// /// The rectangles. /// The fill color. If set to OxyColors.Undefined, the ellipses will not be filled. /// The stroke color. If set to OxyColors.Undefined, the ellipses will not be stroked. /// The stroke thickness (in device independent units, 1/96 inch). public void DrawEllipses(IList rectangles, OxyColor fill, OxyColor stroke, double thickness = 1) { } /// /// Draws a polyline. /// /// The points. /// The stroke color. /// The stroke thickness (in device independent units, 1/96 inch). /// The dash array (in device independent units, 1/96 inch). Use null to get a solid line. /// The line join type. /// if set to true the shape will be aliased. public void DrawLine( IList points, OxyColor stroke, double thickness = 1, double[] dashArray = null, LineJoin lineJoin = LineJoin.Miter, bool aliased = false) { } /// /// Draws line segments defined by points (0,1) (2,3) (4,5) etc. /// This should have better performance than calling DrawLine for each segment. /// /// The points. /// The stroke color. /// The stroke thickness (in device independent units, 1/96 inch). /// The dash array (in device independent units, 1/96 inch). /// The line join type. /// if set to true the shape will be aliased. public void DrawLineSegments( IList points, OxyColor stroke, double thickness = 1, double[] dashArray = null, LineJoin lineJoin = LineJoin.Miter, bool aliased = false) { } /// /// Draws a polygon. /// /// The points. /// The fill color. If set to OxyColors.Undefined, the polygon will not be filled. /// The stroke color. If set to OxyColors.Undefined, the polygon will not be stroked. /// The stroke thickness (in device independent units, 1/96 inch). /// The dash array (in device independent units, 1/96 inch). /// The line join type. /// If set to true the polygon will be aliased. public void DrawPolygon( IList points, OxyColor fill, OxyColor stroke, double thickness = 1, double[] dashArray = null, LineJoin lineJoin = LineJoin.Miter, bool aliased = false) { } /// /// Draws a collection of polygons, where all polygons have the same stroke and fill. /// This performs better than calling DrawPolygon multiple times. /// /// The polygons. /// The fill color. If set to OxyColors.Undefined, the polygons will not be filled. /// The stroke color. If set to OxyColors.Undefined, the polygons will not be stroked. /// The stroke thickness (in device independent units, 1/96 inch). /// The dash array (in device independent units, 1/96 inch). /// The line join type. /// if set to true the shape will be aliased. public void DrawPolygons( IList> polygons, OxyColor fill, OxyColor stroke, double thickness = 1, double[] dashArray = null, LineJoin lineJoin = LineJoin.Miter, bool aliased = false) { } /// /// Draws a rectangle. /// /// The rectangle. /// The fill color. If set to OxyColors.Undefined, the rectangle will not be filled. /// The stroke color. If set to OxyColors.Undefined, the rectangle will not be stroked. /// The stroke thickness (in device independent units, 1/96 inch). public void DrawRectangle(OxyRect rect, OxyColor fill, OxyColor stroke, double thickness = 1) { } /// /// Draws a collection of rectangles, where all have the same stroke and fill. /// This performs better than calling DrawRectangle multiple times. /// /// The rectangles. /// The fill color. If set to OxyColors.Undefined, the rectangles will not be filled. /// The stroke color. If set to OxyColors.Undefined, the rectangles will not be stroked. /// The stroke thickness (in device independent units, 1/96 inch). public void DrawRectangles(IList rectangles, OxyColor fill, OxyColor stroke, double thickness = 1) { } /// /// Draws text. /// /// The position. /// The text. /// The text color. /// The font family. /// Size of the font (in device independent units, 1/96 inch). /// The font weight. /// The rotation angle. /// The horizontal alignment. /// The vertical alignment. /// The maximum size of the text (in device independent units, 1/96 inch). public void DrawText( ScreenPoint p, string text, OxyColor fill, string fontFamily = null, double fontSize = 10, double fontWeight = 500, double rotate = 0, HorizontalAlignment halign = HorizontalAlignment.Left, VerticalAlignment valign = VerticalAlignment.Top, OxySize? maxSize = null) { } /// /// Measures the size of the specified text. /// /// The text. /// The font family. /// Size of the font (in device independent units, 1/96 inch). /// The font weight. /// /// The size of the text (in device independent units, 1/96 inch). /// public OxySize MeasureText(string text, string fontFamily = null, double fontSize = 10, double fontWeight = 500) { return OxySize.Empty; } /// /// Sets the tool tip for the following items. /// /// The text in the tooltip. public void SetToolTip(string text) { } /// /// Cleans up resources not in use. /// /// /// This method is called at the end of each rendering. /// public void CleanUp() { } /// /// Draws a portion of the specified . /// /// The source. /// The x-coordinate of the upper-left corner of the portion of the source image to draw. /// The y-coordinate of the upper-left corner of the portion of the source image to draw. /// Width of the portion of the source image to draw. /// Height of the portion of the source image to draw. /// The x-coordinate of the upper-left corner of drawn image. /// The y-coordinate of the upper-left corner of drawn image. /// The width of the drawn image. /// The height of the drawn image. /// The opacity. /// interpolate if set to true. public void DrawImage( OxyImage source, double srcX, double srcY, double srcWidth, double srcHeight, double destX, double destY, double destWidth, double destHeight, double opacity, bool interpolate) { } /// /// Sets the clip rectangle. /// /// The clip rectangle. /// /// True if the clip rectangle was set. /// public bool SetClip(OxyRect rect) { return true; } /// /// Resets the clip rectangle. /// public void ResetClip() { } } }