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

Implements diagram drawing operations with a Graphics surface.

Definition

Namespace:Telerik.WinControls.UI.Diagrams

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public class GDIPaintingContext : PaintingContext, IPaintingContext

Inheritance: objectPaintingContextGDIPaintingContext

Implements: IPaintingContext

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

Constructors

Creates a drawing context that uses the supplied graphics surface without taking ownership of it.

C#
public GDIPaintingContext(Graphics graphics)
Parameters:graphicsGraphics

The graphics surface used for drawing.

Methods

Outlines an ellipse inscribed in the specified rectangle.

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

The rectangle that bounds the ellipse.

penPen

The pen used to draw the outline.

Overrides: PaintingContext.DrawEllipse(RectangleF, Pen)

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

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

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

Draws a line between two points.

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

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

Draws connected line segments between each adjacent pair of points.

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

The pen used to draw the segments.

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

Attempts to draw a path but currently submits an empty GraphicsPath; the supplied points are not added, so this implementation draws no path.

C#
public override void DrawPath(Point[] points, Pen pen)
Parameters:pointsPoint[]

The points that would define the path.

penPen

The pen passed to the graphics surface.

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

Outlines a closed polygon through the supplied points.

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

The pen used to draw the outline.

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

Outlines a rectangle with a pen.

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 inscribed in the specified rectangle.

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

Overrides: PaintingContext.FillEllipse(RectangleF, Brush)

Fills the polygon bounded by the supplied points.

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

The brush used to fill the polygon.

Overrides: PaintingContext.FillPolygon(Point[], 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 colors in the specified rectangle.

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

The rectangle whose colors are inverted.

Overrides: PaintingContext.InvertRectangle(RectangleF)

Resets the derived drawing surface's transformation.

C#
protected override void ResetTransformationOverride()

Overrides: PaintingContext.ResetTransformationOverride()

Applies a scale to the derived 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)