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

Provides the drawing operations used by Spreadsheet elements when painting through a graphics backend.

Definition

Namespace:Telerik.WinControls.Spreadsheet.UI

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Syntax:

C#
public interface IPaintingContext

Properties

Gets the clip bounds reported to painting code. A backend may leave these bounds empty when it does not query its graphics surface.

C#
RectangleF ClipBounds { get; }

Gets the scale factors recorded by the most recent scale operation, or 1,1 after a reset.

C#
SizeF ScaleFactor { get; }

Methods

Draws the outline of the ellipse inscribed in the specified rectangle.

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

The bounds of the ellipse.

penPen

The pen used to draw the outline.

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

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

The image to draw.

rectangleRectangleF

The destination bounds.

opacitydouble

The opacity passed to the drawing backend.

Draws a straight 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 through the supplied points.

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

The points that define the connected segments.

penPen

The pen used to draw the segments.

Draws connected line segments through the supplied points without closing the path.

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

The points that define the path.

penPen

The pen used to draw the path.

Draws a closed outline through the supplied points.

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

The points that define the polygon.

penPen

The pen used to draw the outline.

Draws the outline of the specified rectangle.

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

The rectangle to outline.

penPen

The pen used to draw the outline.

Fills the ellipse inscribed in the specified rectangle.

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

The bounds of the ellipse.

brushBrush

The brush used to fill the ellipse.

Fills a polygon defined by the supplied points.

C#
void FillPolygon(PointF[] pointF, Brush brush)
Parameters:pointFPointF[]

The points that define the polygon.

brushBrush

The brush used to fill the polygon.

Fills the specified 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 rendered pixels within the specified rectangle.

C#
void InvertRectangle(RectangleF rectangle)
Parameters:rectangleRectangleF

The bounds of the pixels to invert.

Resets the drawing surface transformation and records a scale factor of 1,1.

C#
void ResetTransformation()

Applies a scale to the drawing surface and records the supplied factors in ScaleFactor.

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

The horizontal scale factor.

yfloat

The vertical scale factor.