New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls.Drawing

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class GraphicsContext

Inheritance: objectGraphicsContext

Constructors

C#
public GraphicsContext()
C#
public GraphicsContext(Surface deviceSurface)
Parameters:deviceSurfaceSurface

Properties

C#
public DrawingMode DrawingMode { get; }

Resources

Dictionary<string, object>

C#
public Dictionary<string, object> Resources { get; }
C#
public Surface Surface { get; }

Methods

C#
public void BeginDraw(params object[] handles)
Parameters:handlesobject[]
C#
public void BeginEffects(Size viewportSize)
Parameters:viewportSizeSize
C#
public RadDisplacementMapEffect CreateDisplacementMapEffect()
Returns:

RadDisplacementMapEffect

C#
public RadGaussianBlurEffect CreateGaussianBlurEffect()
Returns:

RadGaussianBlurEffect

C#
public RadBrush CreateLinearGradientBrush(RectangleF rectangle, GradientStop[] colorStops, float angle)
Parameters:rectangleRectangleFcolorStopsGradientStop[]anglefloatReturns:

RadBrush

C#
public RadMorphologyEffect CreateMorphologyEffect()
Returns:

RadMorphologyEffect

C#
public Path CreatePath()
Returns:

Path

C#
public RadBrush CreateSolidBrush(Color color)
Parameters:colorColorReturns:

RadBrush

C#
public void DrawBorder(IBorderElement element, Path path)
Parameters:elementIBorderElementpathPath
C#
public void DrawBorder(IBorderElement element, RectangleF rect)
Parameters:elementIBorderElementrectRectangleF
C#
public void DrawImage(IImageElement element, RectangleF rect)
Parameters:elementIImageElementrectRectangleF
C#
public void DrawImage(Image image, RectangleF rect)
Parameters:imageImagerectRectangleF
C#
public void DrawLine(Color color, float x1, float y1, float x2, float y2)
Parameters:colorColorx1floaty1floatx2floaty2float
C#
public void DrawLine(Color color, PointF pt1, PointF pt2)
Parameters:colorColorpt1PointFpt2PointF
C#
public void DrawLine(RadBrush brush, float x1, float y1, float x2, float y2)
Parameters:brushRadBrushx1floaty1floatx2floaty2float
C#
public void DrawLine(RadBrush brush, PointF pt1, PointF pt2)
Parameters:brushRadBrushpt1PointFpt2PointF
C#
public void DrawRectangle(Color color, float x1, float y1, float x2, float y2)
Parameters:colorColorx1floaty1floatx2floaty2float
C#
public void DrawRectangle(Color color, RectangleF rect)
Parameters:colorColorrectRectangleF
C#
public void DrawRectangle(RadBrush brush, float x1, float y1, float x2, float y2)
Parameters:brushRadBrushx1floaty1floatx2floaty2float
C#
public void DrawRectangle(RadBrush brush, RectangleF rect)
Parameters:brushRadBrushrectRectangleF
C#
public void DrawText(ITextElement element, Color color, RectangleF rect)
Parameters:elementITextElementcolorColorrectRectangleF
C#
public void DrawText(ITextElement element, PointF point)
Parameters:elementITextElementpointPointF
C#
public void DrawText(ITextElement element, RadBrush brush, float x, float y)
Parameters:elementITextElementbrushRadBrushxfloatyfloat
C#
public void DrawText(ITextElement element, RadBrush brush, PointF point)
Parameters:elementITextElementbrushRadBrushpointPointF
C#
public void DrawText(ITextElement element, RadBrush brush, RectangleF rect)
Parameters:elementITextElementbrushRadBrushrectRectangleF
C#
public void DrawText(ITextElement element, RectangleF rect)
Parameters:elementITextElementrectRectangleF
C#
public void DrawText(string text, Font font, Color color, RectangleF rect)
Parameters:textstringfontFontcolorColorrectRectangleF
C#
public void DrawText(string text, Font font, RadBrush brush, float x, float y, TextFormat textFormat)
Parameters:textstringfontFontbrushRadBrushxfloatyfloattextFormatTextFormat
C#
public void DrawText(string text, Font font, RadBrush brush, float x, float y)
Parameters:textstringfontFontbrushRadBrushxfloatyfloat
C#
public void DrawText(string text, Font font, RadBrush brush, PointF point, TextFormat textFormat)
Parameters:textstringfontFontbrushRadBrushpointPointFtextFormatTextFormat
C#
public void DrawText(string text, Font font, RadBrush brush, PointF point)
Parameters:textstringfontFontbrushRadBrushpointPointF
C#
public void DrawText(string text, Font font, RadBrush brush, RectangleF rect, TextFormat format)
Parameters:textstringfontFontbrushRadBrushrectRectangleFformatTextFormat
C#
public void DrawText(string text, Font font, RadBrush brush, RectangleF rect)
Parameters:textstringfontFontbrushRadBrushrectRectangleF
C#
public void EndDraw()
C#
public void EndEffects(EffectCollection effects)
Parameters:effectsEffectCollection
C#
public void FillPath(IFillElement element, Path path)
Parameters:elementIFillElementpathPath
C#
public void FillPolygon(Color color, PointF[] points)
Parameters:colorColorpointsPointF[]
C#
public void FillPolygon(RadBrush brush, PointF[] points)
Parameters:brushRadBrushpointsPointF[]
C#
public void FillRectangle(Color color, float x, float y, float width, float height)
Parameters:colorColorxfloatyfloatwidthfloatheightfloat
C#
public void FillRectangle(Color color, RectangleF rect)
Parameters:colorColorrectRectangleF
C#
public void FillRectangle(IFillElement element, RectangleF rect)
Parameters:elementIFillElementrectRectangleF
C#
public void FillRectangle(RadBrush brush, float x, float y, float width, float height)
Parameters:brushRadBrushxfloatyfloatwidthfloatheightfloat
C#
public void FillRectangle(RadBrush brush, RectangleF rect)
Parameters:brushRadBrushrectRectangleF
C#
public SizeF MeasureText(ITextElement element, SizeF availableSize)
Parameters:elementITextElementavailableSizeSizeFReturns:

SizeF

C#
public SizeF MeasureText(string text, Font font, SizeF availableSize, TextFormat textFormat)
Parameters:textstringfontFontavailableSizeSizeFtextFormatTextFormatReturns:

SizeF

C#
public SizeF MeasureText(string text, Font font, SizeF availableSize)
Parameters:textstringfontFontavailableSizeSizeFReturns:

SizeF

In this article
DefinitionConstructorsGraphicsContext()GraphicsContext(Surface)PropertiesDrawingModeResourcesSurfaceMethodsBeginDraw(params object[])BeginEffects(Size)CreateDisplacementMapEffect()CreateGaussianBlurEffect()CreateLinearGradientBrush(RectangleF, GradientStop[], float)CreateMorphologyEffect()CreatePath()CreateSolidBrush(Color)DrawBorder(IBorderElement, Path)DrawBorder(IBorderElement, RectangleF)DrawImage(IImageElement, RectangleF)DrawImage(Image, RectangleF)DrawLine(Color, float, float, float, float)DrawLine(Color, PointF, PointF)DrawLine(RadBrush, float, float, float, float)DrawLine(RadBrush, PointF, PointF)DrawRectangle(Color, float, float, float, float)DrawRectangle(Color, RectangleF)DrawRectangle(RadBrush, float, float, float, float)DrawRectangle(RadBrush, RectangleF)DrawText(ITextElement, Color, RectangleF)DrawText(ITextElement, PointF)DrawText(ITextElement, RadBrush, float, float)DrawText(ITextElement, RadBrush, PointF)DrawText(ITextElement, RadBrush, RectangleF)DrawText(ITextElement, RectangleF)DrawText(string, Font, Color, RectangleF)DrawText(string, Font, RadBrush, float, float, TextFormat)DrawText(string, Font, RadBrush, float, float)DrawText(string, Font, RadBrush, PointF, TextFormat)DrawText(string, Font, RadBrush, PointF)DrawText(string, Font, RadBrush, RectangleF, TextFormat)DrawText(string, Font, RadBrush, RectangleF)EndDraw()EndEffects(EffectCollection)FillPath(IFillElement, Path)FillPolygon(Color, PointF[])FillPolygon(RadBrush, PointF[])FillRectangle(Color, float, float, float, float)FillRectangle(Color, RectangleF)FillRectangle(IFillElement, RectangleF)FillRectangle(RadBrush, float, float, float, float)FillRectangle(RadBrush, RectangleF)MeasureText(ITextElement, SizeF)MeasureText(string, Font, SizeF, TextFormat)MeasureText(string, Font, SizeF)
Not finding the help you need?
Contact Support