Represents an abstract rendering context for drawing on a chart. More...
Public Member Functions | |
| int | FillRectangle (Color brush1, Color brush2, Rectangle rect) |
| Fills a rectangle with a gradient using two specified colors. | |
| virtual int | DrawFillRectangle (RenderPen pen, Color brush, Rectangle rect) |
| Draws a filled rectangle with a specified pen and brush. | |
| virtual int | DrawFillRectangle (RenderPen pen, Color brush, Rectangle rect, int radius) |
| Draws a filled rounded rectangle with a specified pen and brush. | |
| virtual int | FillHistogram (Color brush, Point[] points) |
| Fills a histogram with a specified color. | |
| virtual int | SetTextRenderingHint (RenderTextRenderingHint textRenderingHint) |
| Sets the text rendering hint for the rendering context. | |
| abstract int | SetInterpolationMode (RenderInterpolationModes interpolationMode) |
| Sets the interpolation mode for drawing operations. | |
| abstract int | SetSmoothingMode (RenderSmoothingModes smoothingMode) |
| Sets the smoothing mode for drawing operations. | |
| abstract int | DrawLine (RenderPen pen, int x1, int y1, int x2, int y2) |
| Draws a line between two specified points using the given pen. | |
| abstract int | DrawLines (RenderPen pen, Point[] points) |
| Draws a series of connected lines between multiple points using the given pen. | |
| abstract int | DrawRectangle (RenderPen pen, Rectangle rect) |
| Draws a rectangle using the given pen and rectangle. | |
| abstract int | DrawRectangle (RenderPen pen, Rectangle rect, int radius) |
| Draws a rounded rectangle using the given pen and rectangle. | |
| abstract int | DrawEllipse (RenderPen pen, Rectangle rect) |
| Draws an ellipse using the given pen and bounding rectangle. | |
| abstract int | DrawPolygon (RenderPen pen, Point[] points) |
| Draws a polygon using the given pen and array of points. | |
| abstract int | Clear (Color color) |
| Clears the drawing area with the specified color. | |
| abstract int | FillRectangle (Color brush, Rectangle rect) |
| Fills a rectangle using the specified brush and rectangle. | |
| abstract int | FillRectangle (Color brush, Rectangle rect, int radius) |
| Fills a rounded rectangle by radius in pixels using the specified brush and rectangle. | |
| abstract int | FillRectangle (Color brush1, Color brush2, Rectangle rect, bool vertical) |
| Fills a rectangle with a gradient using two specified brushes and the rectangle. | |
| abstract int | FillPolygon (Color brush, Point[] points) |
| Fills a polygon using the specified brush and array of points. | |
| abstract int | FillPolygon (Color brushStart, Color brushEnd, Point[] points, bool vertical) |
| Fills a polygon with a gradient using two specified brushes and the array of points. | |
| abstract int | FillEllipse (Color brush, Rectangle rect) |
| Fills an ellipse using the specified brush and bounding rectangle. | |
| abstract int | FillPie (Color brush, Rectangle rect, float startAngle, float sweepAngle) |
| Fills a pie-shaped area of an ellipse using the specified brush, bounding rectangle, start angle, and sweep angle. | |
| abstract int | DrawString (string s, RenderFont font, Color brush, int x, int y) |
| Draws a string at the specified position using the specified font and brush. | |
| abstract int | DrawString (string s, RenderFont font, Color brush, int x, int y, RenderStringFormat format) |
| Draws a string at the specified position using the specified font, brush, and string format. | |
| abstract int | DrawString (string s, RenderFont font, Color brush, Rectangle layoutRectangle) |
| Draws a string within the specified layout rectangle using the specified font and brush. | |
| abstract int | DrawString (string s, RenderFont font, Color brush, Rectangle layoutRectangle, RenderStringFormat format) |
| Draws a string within the specified layout rectangle using the specified font, brush, and string format. | |
| abstract Size | MeasureString (string text, RenderFont font) |
| Measures the System.Drawing.Size of the specified text when drawn using the specified font. | |
| abstract Rectangle | MeasureStringWithOverhang (string text, RenderFont renderFont) |
| Returns the smallest rectangle that the specified text will fit. The height of the rectangle will depend on the actual drawing characters. | |
| abstract int | DrawStaticImage (Image image, Rectangle dest) |
| Draws a static image on the rendering context with the specified destination rectangle. | |
| abstract int | DrawStaticImage (IBitmapImage image, Rectangle dest) |
| Draws a static image on the rendering context with the specified destination rectangle. | |
| abstract int | DrawLayout (DrawingLayout layout, Point point=new Point()) |
| Draws a specified DrawingLayout at the specified point on the rendering context. | |
| abstract int | SetClip (Rectangle rect) |
| Sets the clipping region of the rendering context to the specified rectangle. | |
| abstract int | ResetClip () |
| Resets the clipping region of the rendering context to its original state. | |
| abstract int | TranslateTransform (int dx, int dy) |
| Translates the origin of the rendering context by the specified distance in the x and y directions. | |
| abstract RenderContext | CreateLayoutRenderContext (DrawingLayout layout) |
| Creates a new RenderContext of the specified layout size to draw to a bitmap. The layout system allows caching a batch of drawings into a bitmap and then not repainting them again (or reducing drawings). | |
| virtual int | DrawHeatmap (HeatmapControl heatmapControl, Rectangle dest) |
| Draws a heatmap on the specified destination rectangle. | |
| virtual int | PrepareCachedHeatmap (HeatmapControl heatmapControl) |
| Calculates and prepares heatmap to be drawn later with DrawCachedHeatmap Cached heatmap can be drawn only for a single drawing context (single frame). | |
| virtual int | DrawCachedHeatmap (HeatmapControl heatmapControl, Rectangle dest) |
| Draws prepared heatmap image. Call PrepareCachedHeatmap once before multiple calls of this method. If you need to draw heatmap only once then use DrawHeatmap method. | |
| virtual void | BeginRender () |
| Begins the rendering process. | |
| virtual void | EndRender () |
| Ends the rendering process. | |
| abstract int | DrawSmoothedLine (RenderPen pen, Point[] points) |
| abstract int | DrawQuadraticSpline (RenderPen pen, Point[] points) |
| Size | MeasureString (string text, RenderFont font) |
| Returns size of the text. Resulted height will be maximum of possible font height. Use when your text will change. | |
| Rectangle | MeasureStringWithOverhang (string text, RenderFont renderFont) |
| Returns the smallest rectangle that text will fit. Height will depend on actual drawing characters. | |
Protected Member Functions | |
| RenderContext () | |
| Initializes a new instance of the RenderContext class. | |
Properties | |
| static bool | UseTestFramework [get, set] |
| Gets or sets a value indicating whether the rendering control will record all draw calls timing and display it on top of the image. | |
| abstract Rectangle | ClipBounds [get] |
| Gets the bounds of the clip area for drawing. | |
| Size | Size [get, protected set] |
| Gets or sets the size of the rendering context. | |
| virtual float | FontAntiAliasingMinSize [get, set] |
| Gets or sets the minimum font size for anti-aliasing. | |
| virtual bool | IsValid [get] |
| Gets a value indicating whether the rendering context is valid. | |
| virtual IRenderContextSettings | Settings = null! [get, protected set] |
| Gets settings of a context that will perform final rendering. | |
Represents an abstract rendering context for drawing on a chart.
This class serves as the base for specific implementations of rendering contexts, which define how the drawing methods are implemented based on the rendering platform or library being used.
|
protected |
Initializes a new instance of the RenderContext class.
|
virtual |
Begins the rendering process.
|
pure virtual |
Clears the drawing area with the specified color.
| color | The color used to clear the drawing area. |
|
pure virtual |
Creates a new RenderContext of the specified layout size to draw to a bitmap. The layout system allows caching a batch of drawings into a bitmap and then not repainting them again (or reducing drawings).
| layout | The DrawingLayout specifying the size and layout of the new RenderContext. |
|
virtual |
Draws prepared heatmap image. Call PrepareCachedHeatmap once before multiple calls of this method.
If you need to draw heatmap only once then use DrawHeatmap method.
| heatmapControl | The HeatmapControl containing the heatmap data. |
| dest | The destination rectangle where the heatmap will be drawn. |
|
pure virtual |
Draws an ellipse using the given pen and bounding rectangle.
| pen | The pen used to draw the ellipse outline. |
| rect | The bounding rectangle of the ellipse. |
|
virtual |
Draws a filled rectangle with a specified pen and brush.
| pen | The pen used to draw the rectangle outline. |
| brush | The brush used to fill the rectangle. |
| rect | The rectangle to draw and fill. |
|
virtual |
Draws a filled rounded rectangle with a specified pen and brush.
| pen | |
| brush | |
| rect | |
| radius |
|
virtual |
Draws a heatmap on the specified destination rectangle.
| heatmapControl | The HeatmapControl containing the heatmap data. |
| dest | The destination rectangle where the heatmap will be drawn. |
|
pure virtual |
Draws a specified DrawingLayout at the specified point on the rendering context.
| layout | The DrawingLayout object to draw. |
| point | The location where the drawing layout will be drawn on the rendering context. (optional, default is Point.Empty) |
|
pure virtual |
Draws a line between two specified points using the given pen.
| pen | The pen used to draw the line. |
| x1 | The x-coordinate of the starting point. |
| y1 | The y-coordinate of the starting point. |
| x2 | The x-coordinate of the ending point. |
| y2 | The y-coordinate of the ending point. |
|
pure virtual |
Draws a series of connected lines between multiple points using the given pen.
| pen | The pen used to draw the lines. |
| points | An array of points defining the lines. |
|
pure virtual |
Draws a polygon using the given pen and array of points.
| pen | The pen used to draw the polygon outline. |
| points | An array of points defining the vertices of the polygon. |
|
pure virtual |
|
pure virtual |
Draws a rectangle using the given pen and rectangle.
| pen | The pen used to draw the rectangle outline. |
| rect | The rectangle to draw. |
|
pure virtual |
Draws a rounded rectangle using the given pen and rectangle.
| pen | The pen used to draw the rectangle outline. |
| rect | The rectangle to draw. |
| radius | The rectangle corners radius. |
|
pure virtual |
|
pure virtual |
Draws a static image on the rendering context with the specified destination rectangle.
| image | The IBitmapImage to draw. |
| dest | The destination rectangle where the image will be drawn. |
|
pure virtual |
Draws a static image on the rendering context with the specified destination rectangle.
| image | The image to draw. |
| dest | The destination rectangle where the image will be drawn. |
|
pure virtual |
Draws a string at the specified position using the specified font and brush.
| s | The string to draw. |
| font | The font used for drawing the string. |
| brush | The brush used to draw the string. |
| x | The x-coordinate of the starting position. |
| y | The y-coordinate of the starting position. |
|
pure virtual |
Draws a string at the specified position using the specified font, brush, and string format.
| s | The string to draw. |
| font | The font used for drawing the string. |
| brush | The brush used to draw the string. |
| x | The x-coordinate of the starting position. |
| y | The y-coordinate of the starting position. |
| format | The string format to apply during drawing. |
|
pure virtual |
Draws a string within the specified layout rectangle using the specified font and brush.
| s | The string to draw. |
| font | The font used for drawing the string. |
| brush | The brush used to draw the string. |
| layoutRectangle | The layout rectangle to constrain the drawing area. |
|
pure virtual |
Draws a string within the specified layout rectangle using the specified font, brush, and string format.
| s | The string to draw. |
| font | The font used for drawing the string. |
| brush | The brush used to draw the string. |
| layoutRectangle | The layout rectangle to constrain the drawing area. |
| format | The string format to apply during drawing. |
|
virtual |
Ends the rendering process.
|
pure virtual |
Fills an ellipse using the specified brush and bounding rectangle.
| brush | The brush used to fill the ellipse. |
| rect | The bounding rectangle of the ellipse. |
|
virtual |
Fills a histogram with a specified color.
| brush | The brush used to fill the histogram. |
| points | The array of points that define the histogram shape. |
|
pure virtual |
Fills a pie-shaped area of an ellipse using the specified brush, bounding rectangle, start angle, and sweep angle.
| brush | The brush used to fill the pie. |
| rect | The bounding rectangle of the ellipse. |
| startAngle | The start angle in degrees. |
| sweepAngle | The sweep angle in degrees. |
|
pure virtual |
Fills a polygon using the specified brush and array of points.
| brush | The brush used to fill the polygon. |
| points | An array of points defining the vertices of the polygon. |
|
pure virtual |
Fills a polygon with a gradient using two specified brushes and the array of points.
| brushStart | The first brush used for the start of the gradient. |
| brushEnd | The second brush used for the end of the gradient. |
| points | An array of points defining the vertices of the polygon. |
| vertical | Specifies whether the gradient should be vertical (true) or horizontal (false). |
|
pure virtual |
Fills a rectangle using the specified brush and rectangle.
| brush | The brush used to fill the rectangle. |
| rect | The rectangle to fill. |
|
pure virtual |
Fills a rounded rectangle by radius in pixels using the specified brush and rectangle.
| brush | |
| rect | |
| radius |
| int OFT.Rendering.Context.RenderContext.FillRectangle | ( | Color | brush1, |
| Color | brush2, | ||
| Rectangle | rect | ||
| ) |
Fills a rectangle with a gradient using two specified colors.
| brush1 | The first color of the gradient. |
| brush2 | The second color of the gradient. |
| rect | The rectangle to fill. |
|
pure virtual |
Fills a rectangle with a gradient using two specified brushes and the rectangle.
| brush1 | The first brush used for the start of the gradient. |
| brush2 | The second brush used for the end of the gradient. |
| rect | The rectangle to fill. |
| vertical | Specifies whether the gradient should be vertical (true) or horizontal (false). |
|
pure virtual |
Measures the System.Drawing.Size of the specified text when drawn using the specified font.
| text | The text to measure. |
| font | The font used for measuring the text. |
Implements OFT.Rendering.Context.IStringMeasure.
|
pure virtual |
Returns the smallest rectangle that the specified text will fit. The height of the rectangle will depend on the actual drawing characters.
| text | The text to measure. |
| renderFont | The font used for measuring the text. |
Implements OFT.Rendering.Context.IStringMeasure.
|
virtual |
Calculates and prepares heatmap to be drawn later with DrawCachedHeatmap
Cached heatmap can be drawn only for a single drawing context (single frame).
| heatmapControl | The HeatmapControl containing the heatmap data. |
|
pure virtual |
Resets the clipping region of the rendering context to its original state.
|
pure virtual |
Sets the clipping region of the rendering context to the specified rectangle.
| rect | The rectangle to set as the clipping region. |
|
pure virtual |
Sets the interpolation mode for drawing operations.
| interpolationMode | The interpolation mode to set. |
|
pure virtual |
Sets the smoothing mode for drawing operations.
| smoothingMode | The smoothing mode to set. |
|
virtual |
Sets the text rendering hint for the rendering context.
| textRenderingHint | The text rendering hint to set. |
|
pure virtual |
Translates the origin of the rendering context by the specified distance in the x and y directions.
| dx | The distance to translate in the x direction. |
| dy | The distance to translate in the y direction. |
|
get |
Gets the bounds of the clip area for drawing.
|
getset |
Gets or sets the minimum font size for anti-aliasing.
|
get |
Gets a value indicating whether the rendering context is valid.
|
getprotected set |
Gets settings of a context that will perform final rendering.
|
getprotected set |
Gets or sets the size of the rendering context.
|
staticgetset |
Gets or sets a value indicating whether the rendering control will record all draw calls timing and display it on top of the image.