skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class GraphicsContext

Inheritance
System.Object
GraphicsContext
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Drawing
Assembly: Telerik.WinControls.dll

Syntax

public class GraphicsContext

Constructors

GraphicsContext()

Declaration
public GraphicsContext()

GraphicsContext(Surface)

Declaration
public GraphicsContext(Surface deviceSurface)
Parameters
Surface deviceSurface

Properties

DrawingMode

Declaration
public DrawingMode DrawingMode { get; }
Property Value
DrawingMode

Resources

Declaration
public Dictionary<string, object> Resources { get; }
Property Value
System.Collections.Generic.Dictionary<System.String, System.Object>

Surface

Declaration
public Surface Surface { get; }
Property Value
Surface

Methods

BeginDraw(Object[])

Declaration
public void BeginDraw(params object[] handles)
Parameters
System.Object[] handles

BeginEffects(Size)

Declaration
public void BeginEffects(Size viewportSize)
Parameters
System.Drawing.Size viewportSize

CreateDisplacementMapEffect()

Declaration
public RadDisplacementMapEffect CreateDisplacementMapEffect()
Returns
RadDisplacementMapEffect

CreateGaussianBlurEffect()

Declaration
public RadGaussianBlurEffect CreateGaussianBlurEffect()
Returns
RadGaussianBlurEffect

CreateLinearGradientBrush(RectangleF, GradientStop[], Single)

Declaration
public RadBrush CreateLinearGradientBrush(RectangleF rectangle, GradientStop[] colorStops, float angle)
Parameters
System.Drawing.RectangleF rectangle

GradientStop[] colorStops

System.Single angle

Returns
RadBrush

CreateMorphologyEffect()

Declaration
public RadMorphologyEffect CreateMorphologyEffect()
Returns
RadMorphologyEffect

CreatePath()

Declaration
public Path CreatePath()
Returns
Path

CreateSolidBrush(Color)

Declaration
public RadBrush CreateSolidBrush(Color color)
Parameters
System.Drawing.Color color

Returns
RadBrush

DrawBorder(IBorderElement, RectangleF)

Declaration
public void DrawBorder(IBorderElement element, RectangleF rect)
Parameters
IBorderElement element

System.Drawing.RectangleF rect

DrawBorder(IBorderElement, Path)

Declaration
public void DrawBorder(IBorderElement element, Path path)
Parameters
IBorderElement element

Path path

DrawImage(Image, RectangleF)

Declaration
public void DrawImage(Image image, RectangleF rect)
Parameters
System.Drawing.Image image

System.Drawing.RectangleF rect

DrawImage(IImageElement, RectangleF)

Declaration
public void DrawImage(IImageElement element, RectangleF rect)
Parameters
IImageElement element

System.Drawing.RectangleF rect

DrawLine(Color, PointF, PointF)

Declaration
public void DrawLine(Color color, PointF pt1, PointF pt2)
Parameters
System.Drawing.Color color

System.Drawing.PointF pt1

System.Drawing.PointF pt2

DrawLine(Color, Single, Single, Single, Single)

Declaration
public void DrawLine(Color color, float x1, float y1, float x2, float y2)
Parameters
System.Drawing.Color color

System.Single x1

System.Single y1

System.Single x2

System.Single y2

DrawLine(RadBrush, PointF, PointF)

Declaration
public void DrawLine(RadBrush brush, PointF pt1, PointF pt2)
Parameters
RadBrush brush

System.Drawing.PointF pt1

System.Drawing.PointF pt2

DrawLine(RadBrush, Single, Single, Single, Single)

Declaration
public void DrawLine(RadBrush brush, float x1, float y1, float x2, float y2)
Parameters
RadBrush brush

System.Single x1

System.Single y1

System.Single x2

System.Single y2

DrawRectangle(Color, RectangleF)

Declaration
public void DrawRectangle(Color color, RectangleF rect)
Parameters
System.Drawing.Color color

System.Drawing.RectangleF rect

DrawRectangle(Color, Single, Single, Single, Single)

Declaration
public void DrawRectangle(Color color, float x1, float y1, float x2, float y2)
Parameters
System.Drawing.Color color

System.Single x1

System.Single y1

System.Single x2

System.Single y2

DrawRectangle(RadBrush, RectangleF)

Declaration
public void DrawRectangle(RadBrush brush, RectangleF rect)
Parameters
RadBrush brush

System.Drawing.RectangleF rect

DrawRectangle(RadBrush, Single, Single, Single, Single)

Declaration
public void DrawRectangle(RadBrush brush, float x1, float y1, float x2, float y2)
Parameters
RadBrush brush

System.Single x1

System.Single y1

System.Single x2

System.Single y2

DrawText(String, Font, Color, RectangleF)

Declaration
public void DrawText(string text, Font font, Color color, RectangleF rect)
Parameters
System.String text

System.Drawing.Font font

System.Drawing.Color color

System.Drawing.RectangleF rect

DrawText(String, Font, RadBrush, PointF)

Declaration
public void DrawText(string text, Font font, RadBrush brush, PointF point)
Parameters
System.String text

System.Drawing.Font font

RadBrush brush

System.Drawing.PointF point

DrawText(String, Font, RadBrush, PointF, TextFormat)

Declaration
public void DrawText(string text, Font font, RadBrush brush, PointF point, TextFormat textFormat)
Parameters
System.String text

System.Drawing.Font font

RadBrush brush

System.Drawing.PointF point

TextFormat textFormat

DrawText(String, Font, RadBrush, RectangleF)

Declaration
public void DrawText(string text, Font font, RadBrush brush, RectangleF rect)
Parameters
System.String text

System.Drawing.Font font

RadBrush brush

System.Drawing.RectangleF rect

DrawText(String, Font, RadBrush, RectangleF, TextFormat)

Declaration
public void DrawText(string text, Font font, RadBrush brush, RectangleF rect, TextFormat format)
Parameters
System.String text

System.Drawing.Font font

RadBrush brush

System.Drawing.RectangleF rect

TextFormat format

DrawText(String, Font, RadBrush, Single, Single)

Declaration
public void DrawText(string text, Font font, RadBrush brush, float x, float y)
Parameters
System.String text

System.Drawing.Font font

RadBrush brush

System.Single x

System.Single y

DrawText(String, Font, RadBrush, Single, Single, TextFormat)

Declaration
public void DrawText(string text, Font font, RadBrush brush, float x, float y, TextFormat textFormat)
Parameters
System.String text

System.Drawing.Font font

RadBrush brush

System.Single x

System.Single y

TextFormat textFormat

DrawText(ITextElement, Color, RectangleF)

Declaration
public void DrawText(ITextElement element, Color color, RectangleF rect)
Parameters
ITextElement element

System.Drawing.Color color

System.Drawing.RectangleF rect

DrawText(ITextElement, PointF)

Declaration
public void DrawText(ITextElement element, PointF point)
Parameters
ITextElement element

System.Drawing.PointF point

DrawText(ITextElement, RectangleF)

Declaration
public void DrawText(ITextElement element, RectangleF rect)
Parameters
ITextElement element

System.Drawing.RectangleF rect

DrawText(ITextElement, RadBrush, PointF)

Declaration
public void DrawText(ITextElement element, RadBrush brush, PointF point)
Parameters
ITextElement element

RadBrush brush

System.Drawing.PointF point

DrawText(ITextElement, RadBrush, RectangleF)

Declaration
public void DrawText(ITextElement element, RadBrush brush, RectangleF rect)
Parameters
ITextElement element

RadBrush brush

System.Drawing.RectangleF rect

DrawText(ITextElement, RadBrush, Single, Single)

Declaration
public void DrawText(ITextElement element, RadBrush brush, float x, float y)
Parameters
ITextElement element

RadBrush brush

System.Single x

System.Single y

EndDraw()

Declaration
public void EndDraw()

EndEffects(EffectCollection)

Declaration
public void EndEffects(EffectCollection effects)
Parameters
EffectCollection effects

FillPath(IFillElement, Path)

Declaration
public void FillPath(IFillElement element, Path path)
Parameters
IFillElement element

Path path

FillPolygon(Color, PointF[])

Declaration
public void FillPolygon(Color color, PointF[] points)
Parameters
System.Drawing.Color color

System.Drawing.PointF[] points

FillPolygon(RadBrush, PointF[])

Declaration
public void FillPolygon(RadBrush brush, PointF[] points)
Parameters
RadBrush brush

System.Drawing.PointF[] points

FillRectangle(Color, RectangleF)

Declaration
public void FillRectangle(Color color, RectangleF rect)
Parameters
System.Drawing.Color color

System.Drawing.RectangleF rect

FillRectangle(Color, Single, Single, Single, Single)

Declaration
public void FillRectangle(Color color, float x, float y, float width, float height)
Parameters
System.Drawing.Color color

System.Single x

System.Single y

System.Single width

System.Single height

FillRectangle(RadBrush, RectangleF)

Declaration
public void FillRectangle(RadBrush brush, RectangleF rect)
Parameters
RadBrush brush

System.Drawing.RectangleF rect

FillRectangle(RadBrush, Single, Single, Single, Single)

Declaration
public void FillRectangle(RadBrush brush, float x, float y, float width, float height)
Parameters
RadBrush brush

System.Single x

System.Single y

System.Single width

System.Single height

FillRectangle(IFillElement, RectangleF)

Declaration
public void FillRectangle(IFillElement element, RectangleF rect)
Parameters
IFillElement element

System.Drawing.RectangleF rect

MeasureText(String, Font, SizeF)

Declaration
public SizeF MeasureText(string text, Font font, SizeF availableSize)
Parameters
System.String text

System.Drawing.Font font

System.Drawing.SizeF availableSize

Returns
System.Drawing.SizeF

MeasureText(String, Font, SizeF, TextFormat)

Declaration
public SizeF MeasureText(string text, Font font, SizeF availableSize, TextFormat textFormat)
Parameters
System.String text

System.Drawing.Font font

System.Drawing.SizeF availableSize

TextFormat textFormat

Returns
System.Drawing.SizeF

MeasureText(ITextElement, SizeF)

Declaration
public SizeF MeasureText(ITextElement element, SizeF availableSize)
Parameters
ITextElement element

System.Drawing.SizeF availableSize

Returns
System.Drawing.SizeF

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.