New to Telerik UI for WinForms? Start a free 30-day trial

Defines the drawing operations used by diagram elements to render geometry and images.

Definition

Namespace:Telerik.WinControls.UI.Diagrams

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public interface IPaintingContext

Properties

Gets the clip bounds reported by the painting context.

C#
RectangleF ClipBounds { get; }

Gets the most recent scale factors supplied to ScaleTransformation(float, float).

C#
SizeF ScaleFactor { get; }

Methods

Outlines an ellipse inscribed in the specified rectangle.

C#
void DrawEllipse(RectangleF rectangle, Pen pen)
Parameters:rectangleRectangleF

The rectangle that bounds the ellipse.

penPen

The pen used to draw the outline.

Draws an image into the specified destination rectangle using the requested opacity.

C#
void DrawImage(Image image, RectangleF rectangle, double opacity)
Parameters:imageImage

The image to draw.

rectangleRectangleF

The destination rectangle.

opacitydouble

The opacity factor passed to the drawing implementation.

Draws a line between two points.

C#
void DrawLine(PointF startPoint, PointF endPoint, Pen pen)
Parameters:startPointPointF

The line's starting point.

endPointPointF

The line's ending point.

penPen

The pen used to draw the line.

Draws connected line segments between each adjacent pair of points.

C#
void DrawLines(PointF[] pointF, Pen pen)
Parameters:pointFPointF[]

The ordered points that define the segments.

penPen

The pen used to draw the segments.

Draws an open path through the supplied points.

C#
void DrawPath(Point[] pointF, Pen pen)
Parameters:pointFPoint[]

The ordered points along the path.

penPen

The pen used to draw the path.

Outlines a closed polygon through the supplied points.

C#
void DrawPolygon(Point[] pointF, Pen pen)
Parameters:pointFPoint[]

The polygon's vertices in order.

penPen

The pen used to draw the outline.

Outlines a rectangle with a pen.

C#
void DrawRectangle(RectangleF rectangle, Pen pen)
Parameters:rectangleRectangleF

The rectangle to outline.

penPen

The pen used to draw the outline.

Fills an ellipse inscribed in the specified rectangle.

C#
void FillEllipse(RectangleF rectangle, Brush brush)
Parameters:rectangleRectangleF

The rectangle that bounds the ellipse.

brushBrush

The brush used to fill the ellipse.

Fills the polygon bounded by the supplied points.

C#
void FillPolygon(Point[] pointF, Brush brush)
Parameters:pointFPoint[]

The polygon's vertices in order.

brushBrush

The brush used to fill the polygon.

Fills a rectangle with a brush.

C#
void FillRectangle(RectangleF rectangle, Brush brush)
Parameters:rectangleRectangleF

The rectangle to fill.

brushBrush

The brush used to fill the rectangle.

Inverts the colors in the specified rectangle.

C#
void InvertRectangle(RectangleF rectangle)
Parameters:rectangleRectangleF

The rectangle whose colors are inverted.

Restores the drawing context to its unscaled state.

C#
void ResetTransformation()

Applies horizontal and vertical scale factors to subsequent drawing operations.

C#
void ScaleTransformation(float x, float y)
Parameters:xfloat

The horizontal scale factor.

yfloat

The vertical scale factor.