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

Tracks clip and scale state and delegates drawing operations to a concrete rendering backend.

Definition

Namespace:Telerik.WinControls.RichTextEditor.UI

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public abstract class PaintingContext : IPaintingContext

Inheritance: objectPaintingContext

Derived Classes: GDIPaintingContext

Implements: IPaintingContext

Constructors

C#
protected PaintingContext()

Properties

Gets or sets the clip bounds retained by this context. The GDI+ implementation does not populate it from the graphics object's visible clip.

C#
public RectangleF ClipBounds { get; set; }

Implements: IPaintingContext.ClipBounds

Gets the most recently supplied scale factors. The initial value is one for each axis; resetting the transformation restores that value. Repeated scale operations can compound in the backend, so this property is not necessarily the effective transform.

C#
public SizeF ScaleFactor { get; protected set; }

Implements: IPaintingContext.ScaleFactor

Methods

Draws the outline of an ellipse bounded by the specified rectangle.

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

The ellipse's bounding rectangle.

penPen

The pen used to draw the outline.

Implements: IPaintingContext.DrawEllipse(RectangleF, Pen)

Draws an image into a destination rectangle.

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

The image to draw.

rectangleRectangleF

The destination rectangle.

opacitydouble

The opacity value passed to the drawing implementation.

Implements: IPaintingContext.DrawImage(Image, RectangleF, double)

Draws a line between two points.

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

The line's start point.

endPointPointF

The line's end point.

penPen

The pen used to draw the line.

Implements: IPaintingContext.DrawLine(PointF, PointF, Pen)

Draws connected line segments through the supplied points.

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

The points that define the line segments.

penPen

The pen used to draw them.

Implements: IPaintingContext.DrawLines(PointF[], Pen)

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

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

The path points.

penPen

The pen used to draw the path.

Implements: IPaintingContext.DrawPath(PointF[], Pen)

Draws a closed outline through the supplied points.

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

The polygon vertices.

penPen

The pen used to draw the outline.

Implements: IPaintingContext.DrawPolygon(PointF[], Pen)

Draws a rectangle outline.

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

The rectangle to outline.

penPen

The pen used to draw the outline.

Implements: IPaintingContext.DrawRectangle(RectangleF, Pen)

Fills an ellipse bounded by the specified rectangle.

C#
public abstract void FillEllipse(RectangleF rectanlge, Brush color)
Parameters:rectanlgeRectangleFcolorBrush

Implements: IPaintingContext.FillEllipse(RectangleF, Brush)

Fills a polygon defined by the supplied points.

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

The polygon vertices.

brushBrush

The brush used to fill the polygon.

Implements: IPaintingContext.FillPolygon(PointF[], Brush)

Fills a rectangle with a brush.

C#
public abstract void FillRectangle(RectangleF rectanlge, Brush color)
Parameters:rectanlgeRectangleFcolorBrush

Implements: IPaintingContext.FillRectangle(RectangleF, Brush)

Inverts the pixels within a rectangle.

C#
public abstract void InvertRectangle(RectangleF rectangle)
Parameters:rectangleRectangleF

The rectangle whose pixels are inverted.

Implements: IPaintingContext.InvertRectangle(RectangleF)

Resets drawing transformations to their identity state.

C#
public void ResetTransformation()

Implements: IPaintingContext.ResetTransformation()

Restores the concrete drawing surface's identity transformation.

C#
protected abstract void ResetTransformationOverride()

Scales drawing coordinates along each axis.

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

The horizontal scale factor.

yfloat

The vertical scale factor.

Implements: IPaintingContext.ScaleTransformation(float, float)

Applies the scale factors to the concrete drawing surface.

C#
protected abstract void ScaleTransformationOverride(float x, float y)
Parameters:xfloat

The horizontal scale factor.

yfloat

The vertical scale factor.