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

Implements the painting operations with a GDI+ Graphics instance.

Definition

Namespace:Telerik.WinControls.RichTextEditor.UI

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class GDIPaintingContext : PaintingContext, IPaintingContext

Inheritance: objectPaintingContextGDIPaintingContext

Implements: IPaintingContext

Inherited Members PaintingContext.ScaleTransformation(float, float)PaintingContext.ResetTransformation()PaintingContext.ScaleFactorPaintingContext.ClipBounds

Constructors

Initializes a GDI+ painting context for the specified graphics surface.

C#
public GDIPaintingContext(Graphics graphics)
Parameters:graphicsGraphics

The graphics surface used for drawing.

Properties

Gets or sets the graphics surface. Assigning a non-null surface also applies the RichTextEditor text-rendering hint.

C#
protected Graphics Graphics { get; set; }

Methods

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

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

The ellipse's bounding rectangle.

penPen

The pen used to draw the outline.

Overrides: PaintingContext.DrawEllipse(RectangleF, Pen)

Draws an image into a destination rectangle.

C#
public override 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.

Overrides: PaintingContext.DrawImage(Image, RectangleF, double)

Argument exceptions from the GDI+ image-drawing calls are ignored.

Draws a line between two points.

C#
public override 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.

Overrides: PaintingContext.DrawLine(PointF, PointF, Pen)

Draws connected line segments through the supplied points.

C#
public override void DrawLines(PointF[] points, Pen pen)
Parameters:pointsPointF[]penPen

The pen used to draw them.

Overrides: PaintingContext.DrawLines(PointF[], Pen)

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

C#
public override void DrawPath(PointF[] points, Pen pen)
Parameters:pointsPointF[]penPen

The pen used to draw the path.

Overrides: PaintingContext.DrawPath(PointF[], Pen)

Draws a closed outline through the supplied points.

C#
public override void DrawPolygon(PointF[] points, Pen pen)
Parameters:pointsPointF[]penPen

The pen used to draw the outline.

Overrides: PaintingContext.DrawPolygon(PointF[], Pen)

Draws a rectangle outline.

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

The rectangle to outline.

penPen

The pen used to draw the outline.

Overrides: PaintingContext.DrawRectangle(RectangleF, Pen)

Fills an ellipse bounded by the specified rectangle.

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

Overrides: PaintingContext.FillEllipse(RectangleF, Brush)

Fills a polygon defined by the supplied points.

C#
public override void FillPolygon(PointF[] points, Brush brush)
Parameters:pointsPointF[]brushBrush

The brush used to fill the polygon.

Overrides: PaintingContext.FillPolygon(PointF[], Brush)

Fills a rectangle with a brush.

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

Overrides: PaintingContext.FillRectangle(RectangleF, Brush)

Inverts the pixels within a rectangle.

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

The rectangle whose pixels are inverted.

Overrides: PaintingContext.InvertRectangle(RectangleF)

Restores the concrete drawing surface's identity transformation.

C#
protected override void ResetTransformationOverride()

Overrides: PaintingContext.ResetTransformationOverride()

Applies the scale factors to the concrete drawing surface.

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

The horizontal scale factor.

yfloat

The vertical scale factor.

Overrides: PaintingContext.ScaleTransformationOverride(float, float)