skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact 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 Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free 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 RadGdiGraphics

Provides GDI+ graphics implementation for RadControls with optimized drawing operations and text rendering.

Inheritance
System.Object
RadGdiGraphics
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.Paint
Assembly: Telerik.WinControls.dll

Syntax

public class RadGdiGraphics : IGraphics, IDisposable

Constructors

RadGdiGraphics(Graphics)

Initializes a new instance of RadGdiGraphics class using GDI graphics context.

Declaration
public RadGdiGraphics(Graphics graphics)
Parameters
System.Drawing.Graphics graphics

Fields

GdiMaximumDrawRectangleLimit

Declaration
public static readonly int GdiMaximumDrawRectangleLimit
Field Value
System.Int32

GdiMinimumDrawRectangleLimit

Declaration
public static readonly int GdiMinimumDrawRectangleLimit
Field Value
System.Int32

GdiStringLengthLimit

Declaration
public static readonly int GdiStringLengthLimit
Field Value
System.Int32

Properties

ClipRectangle

Declaration
public Rectangle ClipRectangle { get; set; }
Property Value
System.Drawing.Rectangle

Implements
IGraphics.ClipRectangle

Graphics

Gets or sets current GDI+ graphics context.

Declaration
public Graphics Graphics { get; set; }
Property Value
System.Drawing.Graphics

MeasurementGraphics

Declaration
public static Graphics MeasurementGraphics { get; }
Property Value
System.Drawing.Graphics

Opacity

Declaration
public double Opacity { get; }
Property Value
System.Double

Implements
IGraphics.Opacity

UnderlayGraphics

Declaration
public object UnderlayGraphics { get; }
Property Value
System.Object

Implements
IGraphics.UnderlayGraphics

Methods

ChangeOpacity(Double)

Declaration
public void ChangeOpacity(double opacity)
Parameters
System.Double opacity

Implements
IGraphics.ChangeOpacity(Double)

ChangeSmoothingMode(SmoothingMode)

Declaration
public virtual void ChangeSmoothingMode(SmoothingMode smoothingMode)
Parameters
System.Drawing.Drawing2D.SmoothingMode smoothingMode

Implements
IGraphics.ChangeSmoothingMode(SmoothingMode)

CheckValidPath(GraphicsPath)

Declaration
protected bool CheckValidPath(GraphicsPath path)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

Returns
System.Boolean

CheckValidRectangle(Rectangle)

Declaration
protected bool CheckValidRectangle(Rectangle rectangle)
Parameters
System.Drawing.Rectangle rectangle

Returns
System.Boolean

CheckValidRectangle(RectangleF)

Declaration
protected bool CheckValidRectangle(RectangleF rectangle)
Parameters
System.Drawing.RectangleF rectangle

Returns
System.Boolean

CreateBitmapMask(Color, Bitmap)

Declaration
public Bitmap CreateBitmapMask(Color maskColor, Bitmap bitmap)
Parameters
System.Drawing.Color maskColor

System.Drawing.Bitmap bitmap

Returns
System.Drawing.Bitmap

Implements
IGraphics.CreateBitmapMask(Color, Bitmap)

Destroy()

Disposes the object.

Declaration
public void Destroy()

Dispose()

Disposes the GDI+ graphics context.

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()

DrawBitmap(Image, Int32, Int32)

Declaration
public virtual void DrawBitmap(Image image, int x, int y)
Parameters
System.Drawing.Image image

System.Int32 x

System.Int32 y

Implements
IGraphics.DrawBitmap(Image, Int32, Int32)

DrawBitmap(Image, Int32, Int32, Double)

Declaration
public virtual void DrawBitmap(Image image, int x, int y, double opacity)
Parameters
System.Drawing.Image image

System.Int32 x

System.Int32 y

System.Double opacity

Implements
IGraphics.DrawBitmap(Image, Int32, Int32, Double)

DrawBitmap(Image, Int32, Int32, Int32, Int32)

Declaration
public virtual void DrawBitmap(Image image, int x, int y, int width, int height)
Parameters
System.Drawing.Image image

System.Int32 x

System.Int32 y

System.Int32 width

System.Int32 height

Implements
IGraphics.DrawBitmap(Image, Int32, Int32, Int32, Int32)

DrawBitmap(Image, Int32, Int32, Int32, Int32, Double)

Declaration
public virtual void DrawBitmap(Image image, int x, int y, int width, int height, double opacity)
Parameters
System.Drawing.Image image

System.Int32 x

System.Int32 y

System.Int32 width

System.Int32 height

System.Double opacity

Implements
IGraphics.DrawBitmap(Image, Int32, Int32, Int32, Int32, Double)

DrawBlurShadow(GraphicsPath, Rectangle, Single, Color)

Declaration
public void DrawBlurShadow(GraphicsPath path, Rectangle r, float offset, Color color)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Rectangle r

System.Single offset

System.Drawing.Color color

Implements
IGraphics.DrawBlurShadow(GraphicsPath, Rectangle, Single, Color)

DrawBorder(RectangleF, IBorderElement)

Draws a border specified by rectangle structure, IBorderElement.

Declaration
public virtual void DrawBorder(RectangleF rectangle, IBorderElement borderElement)
Parameters
System.Drawing.RectangleF rectangle

IBorderElement borderElement

Implements
IGraphics.DrawBorder(RectangleF, IBorderElement)

DrawCustomGradientPath(GraphicsPath, GraphicsPath, Color, Color[], PenAlignment, Single)

Declaration
public void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Drawing2D.GraphicsPath gradientPath

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawCustomGradientPath(GraphicsPath, GraphicsPath, Color, Color[], PenAlignment, Single)

DrawCustomGradientPath(GraphicsPath, GraphicsPath, Color, Color[], PenAlignment, Single, DashStyle)

Declaration
public void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Drawing2D.GraphicsPath gradientPath

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

DrawCustomGradientPath(GraphicsPath, GraphicsPath, Color, Color[], PenAlignment, Single, DashStyle, Single[])

Declaration
public void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Drawing2D.GraphicsPath gradientPath

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

DrawCustomGradientRectangle(Rectangle, GraphicsPath, Color, Color[], PenAlignment, Single)

Declaration
public virtual void DrawCustomGradientRectangle(Rectangle rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawCustomGradientRectangle(Rectangle, GraphicsPath, Color, Color[], PenAlignment, Single)

DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single)

Declaration
public virtual void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single)

DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single, DashStyle)

Declaration
public virtual void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

Implements
IGraphics.DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single, DashStyle)

DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single, DashStyle, Single[])

Declaration
public virtual void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

Implements
IGraphics.DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single, DashStyle, Single[])

DrawEllipse(Rectangle, Color)

Declaration
public virtual void DrawEllipse(Rectangle rectangle, Color color)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color

Implements
IGraphics.DrawEllipse(Rectangle, Color)

DrawImage(Point, Image, Boolean)

Declaration
public virtual void DrawImage(Point point, Image image, bool enabled)
Parameters
System.Drawing.Point point

System.Drawing.Image image

System.Boolean enabled

Implements
IGraphics.DrawImage(Point, Image, Boolean)

DrawImage(Rectangle, Image, ContentAlignment, Boolean)

Declaration
public virtual void DrawImage(Rectangle rectangle, Image image, ContentAlignment alignment, bool enabled)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Image image

System.Drawing.ContentAlignment alignment

System.Boolean enabled

Implements
IGraphics.DrawImage(Rectangle, Image, ContentAlignment, Boolean)

DrawLine(Color, DashStyle, Int32, Int32, Int32, Int32)

Declaration
public virtual void DrawLine(Color color, DashStyle dashStyle, int x1, int y1, int x2, int y2)
Parameters
System.Drawing.Color color

System.Drawing.Drawing2D.DashStyle dashStyle

System.Int32 x1

System.Int32 y1

System.Int32 x2

System.Int32 y2

Implements
IGraphics.DrawLine(Color, DashStyle, Int32, Int32, Int32, Int32)

DrawLine(Color, DashStyle, Int32, Int32, Int32, Int32, Single)

Declaration
public virtual void DrawLine(Color color, DashStyle dashStyle, int x1, int y1, int x2, int y2, float width)
Parameters
System.Drawing.Color color

System.Drawing.Drawing2D.DashStyle dashStyle

System.Int32 x1

System.Int32 y1

System.Int32 x2

System.Int32 y2

System.Single width

Implements
IGraphics.DrawLine(Color, DashStyle, Int32, Int32, Int32, Int32, Single)

DrawLine(Color, DashStyle, Single[], Int32, Int32, Int32, Int32)

Declaration
public virtual void DrawLine(Color color, DashStyle dashStyle, float[] dashPattern, int x1, int y1, int x2, int y2)
Parameters
System.Drawing.Color color

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

System.Int32 x1

System.Int32 y1

System.Int32 x2

System.Int32 y2

DrawLine(Color, Int32, Int32, Int32, Int32)

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

System.Int32 x1

System.Int32 y1

System.Int32 x2

System.Int32 y2

Implements
IGraphics.DrawLine(Color, Int32, Int32, Int32, Int32)

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

Declaration
public virtual 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

Implements
IGraphics.DrawLine(Color, Single, Single, Single, Single)

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

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

System.Single x1

System.Single y1

System.Single x2

System.Single y2

System.Single width

Implements
IGraphics.DrawLine(Color, Single, Single, Single, Single, Single)

DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single)

Declaration
public void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.RectangleF bounds

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Single angle

Implements
IGraphics.DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single)

DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single, DashStyle)

Declaration
public void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.RectangleF bounds

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Single angle

System.Drawing.Drawing2D.DashStyle dashStyle

Implements
IGraphics.DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single, DashStyle)

DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single, DashStyle, Single[])

Declaration
public void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.RectangleF bounds

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Single angle

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

Implements
IGraphics.DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single, DashStyle, Single[])

DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single)

Declaration
public virtual void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Single angle

Implements
IGraphics.DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single)

DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single, DashStyle)

Declaration
public virtual void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Single angle

System.Drawing.Drawing2D.DashStyle dashStyle

Implements
IGraphics.DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single, DashStyle)

DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single, DashStyle, Single[])

Declaration
public virtual void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Single angle

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

Implements
IGraphics.DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single, DashStyle, Single[])

DrawPath(GraphicsPath, Color, PenAlignment, Single)

Declaration
public virtual void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Color color

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawPath(GraphicsPath, Color, PenAlignment, Single)

DrawPath(GraphicsPath, Color, PenAlignment, Single, DashStyle)

Declaration
public virtual void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Color color

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

Implements
IGraphics.DrawPath(GraphicsPath, Color, PenAlignment, Single, DashStyle)

DrawPath(GraphicsPath, Color, PenAlignment, Single, DashStyle, Single[])

Declaration
public virtual void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Color color

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

Implements
IGraphics.DrawPath(GraphicsPath, Color, PenAlignment, Single, DashStyle, Single[])

DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single)

Declaration
public void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Rectangle bounds

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single)

DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single, DashStyle)

Declaration
public void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Rectangle bounds

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

Implements
IGraphics.DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single, DashStyle)

DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single, DashStyle, Single[])

Declaration
public void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.Rectangle bounds

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

Implements
IGraphics.DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single, DashStyle, Single[])

DrawRadialGradientRectangle(Rectangle, Color, Color[], PenAlignment, Single)

Declaration
public virtual void DrawRadialGradientRectangle(Rectangle rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawRadialGradientRectangle(Rectangle, Color, Color[], PenAlignment, Single)

DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single)

Declaration
public virtual void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single)

DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single, DashStyle)

Declaration
public virtual void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

Implements
IGraphics.DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single, DashStyle)

DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single, DashStyle, Single[])

Declaration
public virtual void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color color

System.Drawing.Color[] gradientColors

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

Implements
IGraphics.DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single, DashStyle, Single[])

DrawRectangle(Rectangle, Color)

Declaration
public virtual void DrawRectangle(Rectangle rectangle, Color color)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color

Implements
IGraphics.DrawRectangle(Rectangle, Color)

DrawRectangle(Rectangle, Color, PenAlignment, Single)

Declaration
public virtual void DrawRectangle(Rectangle rectangle, Color color, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawRectangle(Rectangle, Color, PenAlignment, Single)

DrawRectangle(RectangleF, Color, PenAlignment, Single)

Declaration
public virtual void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color color

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

Implements
IGraphics.DrawRectangle(RectangleF, Color, PenAlignment, Single)

DrawRectangle(RectangleF, Color, PenAlignment, Single, DashStyle)

Declaration
public virtual void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color color

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

Implements
IGraphics.DrawRectangle(RectangleF, Color, PenAlignment, Single, DashStyle)

DrawRectangle(RectangleF, Color, PenAlignment, Single, DashStyle, Single[])

Declaration
public virtual void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color color

System.Drawing.Drawing2D.PenAlignment penAlignment

System.Single penWidth

System.Drawing.Drawing2D.DashStyle dashStyle

System.Single[] dashPattern

Implements
IGraphics.DrawRectangle(RectangleF, Color, PenAlignment, Single, DashStyle, Single[])

DrawRoundRect(Rectangle, Color, Single, Int32)

Declaration
public virtual void DrawRoundRect(Rectangle rectangle, Color color, float borderWidth, int radius)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color

System.Single borderWidth

System.Int32 radius

Implements
IGraphics.DrawRoundRect(Rectangle, Color, Single, Int32)

DrawString(String, Rectangle, Font, Color, StringFormat, Orientation, Boolean)

Declaration
public virtual void DrawString(string s, Rectangle rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText)
Parameters
System.String s

System.Drawing.Rectangle rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

System.Windows.Forms.Orientation orientation

System.Boolean flipText

Implements
IGraphics.DrawString(String, Rectangle, Font, Color, StringFormat, Orientation, Boolean)

DrawString(String, Rectangle, Font, Color, StringFormat, Orientation, Boolean, CharacterRange[], Color)

Declaration
public virtual void DrawString(string s, Rectangle rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText, CharacterRange[] highlightRanges, Color highlightColor)
Parameters
System.String s

System.Drawing.Rectangle rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

System.Windows.Forms.Orientation orientation

System.Boolean flipText

System.Drawing.CharacterRange[] highlightRanges

System.Drawing.Color highlightColor

DrawString(String, Rectangle, Font, Color, StringFormat, ShadowSettings, TextRenderingHint, Orientation, Boolean)

Declaration
public virtual void DrawString(string s, Rectangle rectangle, Font font, Color foreColor, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText)
Parameters
System.String s

System.Drawing.Rectangle rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

ShadowSettings shadow

System.Drawing.Text.TextRenderingHint textRendering

System.Windows.Forms.Orientation orientation

System.Boolean flipText

DrawString(String, Rectangle, Font, Color, StringFormat, ShadowSettings, TextRenderingHint, Orientation, Boolean, CharacterRange[], Color)

Declaration
public virtual void DrawString(string s, Rectangle rectangle, Font font, Color foreColor, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText, CharacterRange[] highlightRanges, Color highlightColor)
Parameters
System.String s

System.Drawing.Rectangle rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

ShadowSettings shadow

System.Drawing.Text.TextRenderingHint textRendering

System.Windows.Forms.Orientation orientation

System.Boolean flipText

System.Drawing.CharacterRange[] highlightRanges

System.Drawing.Color highlightColor

DrawString(String, RectangleF, Font, Color, StringFormat, Orientation, Boolean)

Declaration
public virtual void DrawString(string s, RectangleF rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText)
Parameters
System.String s

System.Drawing.RectangleF rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

System.Windows.Forms.Orientation orientation

System.Boolean flipText

Implements
IGraphics.DrawString(String, RectangleF, Font, Color, StringFormat, Orientation, Boolean)

DrawString(String, RectangleF, Font, Color, StringFormat, Orientation, Boolean, CharacterRange[], Color)

Declaration
public virtual void DrawString(string s, RectangleF rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText, CharacterRange[] highlightRanges, Color highlightColor)
Parameters
System.String s

System.Drawing.RectangleF rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

System.Windows.Forms.Orientation orientation

System.Boolean flipText

System.Drawing.CharacterRange[] highlightRanges

System.Drawing.Color highlightColor

DrawString(String, RectangleF, Font, Color, StringFormat, ShadowSettings, TextRenderingHint, Orientation, Boolean)

Declaration
public virtual void DrawString(string s, RectangleF rectangle, Font font, Color foreColor, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText)
Parameters
System.String s

System.Drawing.RectangleF rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

ShadowSettings shadow

System.Drawing.Text.TextRenderingHint textRendering

System.Windows.Forms.Orientation orientation

System.Boolean flipText

DrawString(String, RectangleF, Font, Color, StringFormat, ShadowSettings, TextRenderingHint, Orientation, Boolean, CharacterRange[], Color)

Declaration
public virtual void DrawString(string s, RectangleF rectangle, Font font, Color foreColor, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText, CharacterRange[] highlightRanges, Color highlightColor)
Parameters
System.String s

System.Drawing.RectangleF rectangle

System.Drawing.Font font

System.Drawing.Color foreColor

System.Drawing.StringFormat stringFormat

ShadowSettings shadow

System.Drawing.Text.TextRenderingHint textRendering

System.Windows.Forms.Orientation orientation

System.Boolean flipText

System.Drawing.CharacterRange[] highlightRanges

System.Drawing.Color highlightColor

DrawString(TextParams, SizeF)

Declaration
public virtual void DrawString(TextParams textParams, SizeF measuredSize)
Parameters
TextParams textParams

System.Drawing.SizeF measuredSize

Implements
IGraphics.DrawString(TextParams, SizeF)

ExcludeClip(Rectangle)

Declaration
public virtual void ExcludeClip(Rectangle rectangle)
Parameters
System.Drawing.Rectangle rectangle

Implements
IGraphics.ExcludeClip(Rectangle)

FillGellRectangle(Rectangle, Color[], Single, Single)

Declaration
public virtual void FillGellRectangle(Rectangle rectangle, Color[] colorStops, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color[] colorStops

System.Single gradientPercentage

System.Single gradientPercentage2

Implements
IGraphics.FillGellRectangle(Rectangle, Color[], Single, Single)

FillGlassRectangle(Rectangle, Color, Color, Color, Color, Single, Single)

Declaration
public virtual void FillGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color1

System.Drawing.Color color2

System.Drawing.Color color3

System.Drawing.Color color4

System.Single gradientPercentage

System.Single gradientPercentage2

Implements
IGraphics.FillGlassRectangle(Rectangle, Color, Color, Color, Color, Single, Single)

FillGlassRectangleNew(Rectangle, Color, Color, Color, Color, Single, Single)

Declaration
public virtual void FillGlassRectangleNew(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color1

System.Drawing.Color color2

System.Drawing.Color color3

System.Drawing.Color color4

System.Single gradientPercentage

System.Single gradientPercentage2

FillGradientPath(GraphicsPath, RectangleF, Color[], Single[], GradientStyles, Single, Single, Single)

Declaration
public virtual void FillGradientPath(GraphicsPath path, RectangleF rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

System.Drawing.RectangleF rectangle

System.Drawing.Color[] colorStops

System.Single[] colorOffsets

GradientStyles style

System.Single angle

System.Single gradientPercentage

System.Single gradientPercentage2

FillGradientRectangle(Rectangle, Color, Color, Color, Color, GradientStyles, Single)

Declaration
public virtual void FillGradientRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, GradientStyles style, float angle)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color1

System.Drawing.Color color2

System.Drawing.Color color3

System.Drawing.Color color4

GradientStyles style

System.Single angle

Implements
IGraphics.FillGradientRectangle(Rectangle, Color, Color, Color, Color, GradientStyles, Single)

FillGradientRectangle(Rectangle, Color, Color, Single)

Declaration
public virtual void FillGradientRectangle(Rectangle rectangle, Color color1, Color color2, float angle)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color1

System.Drawing.Color color2

System.Single angle

Implements
IGraphics.FillGradientRectangle(Rectangle, Color, Color, Single)

FillGradientRectangle(Rectangle, Color[], Single[], GradientStyles, Single, Single, Single)

Declaration
public virtual void FillGradientRectangle(Rectangle rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color[] colorStops

System.Single[] colorOffsets

GradientStyles style

System.Single angle

System.Single gradientPercentage

System.Single gradientPercentage2

Implements
IGraphics.FillGradientRectangle(Rectangle, Color[], Single[], GradientStyles, Single, Single, Single)

FillGradientRectangle(RectangleF, Color[], Single[], GradientStyles, Single, Single, Single)

Declaration
public virtual void FillGradientRectangle(RectangleF rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Color[] colorStops

System.Single[] colorOffsets

GradientStyles style

System.Single angle

System.Single gradientPercentage

System.Single gradientPercentage2

Implements
IGraphics.FillGradientRectangle(RectangleF, Color[], Single[], GradientStyles, Single, Single, Single)

FillOfficeGlassRectangle(Rectangle, Color, Color, Color, Color, Single, Single, Boolean)

Declaration
public void FillOfficeGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2, bool drawEllipse)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color1

System.Drawing.Color color2

System.Drawing.Color color3

System.Drawing.Color color4

System.Single gradientPercentage

System.Single gradientPercentage2

System.Boolean drawEllipse

Implements
IGraphics.FillOfficeGlassRectangle(Rectangle, Color, Color, Color, Color, Single, Single, Boolean)

FillPath(Color, GraphicsPath)

Declaration
public void FillPath(Color color, GraphicsPath path)
Parameters
System.Drawing.Color color

System.Drawing.Drawing2D.GraphicsPath path

Implements
IGraphics.FillPath(Color, GraphicsPath)

FillPath(Color[], Single[], Single, Single, Single, Rectangle, GraphicsPath)

Declaration
public void FillPath(Color[] colorStops, float[] colorOffsets, float angle, float gradientPercentage, float gradientPercentage2, Rectangle rectangle, GraphicsPath path)
Parameters
System.Drawing.Color[] colorStops

System.Single[] colorOffsets

System.Single angle

System.Single gradientPercentage

System.Single gradientPercentage2

System.Drawing.Rectangle rectangle

System.Drawing.Drawing2D.GraphicsPath path

Implements
IGraphics.FillPath(Color[], Single[], Single, Single, Single, Rectangle, GraphicsPath)

FillPolygon(Brush, PointF[])

Declaration
public void FillPolygon(Brush brush, PointF[] points)
Parameters
System.Drawing.Brush brush

System.Drawing.PointF[] points

Implements
IGraphics.FillPolygon(Brush, PointF[])

FillPolygon(Color, Point[])

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

System.Drawing.Point[] points

Implements
IGraphics.FillPolygon(Color, Point[])

FillPolygon(Color, PointF[])

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

System.Drawing.PointF[] points

Implements
IGraphics.FillPolygon(Color, PointF[])

FillRectangle(Rectangle, Color)

Declaration
public virtual void FillRectangle(Rectangle rectangle, Color color)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color

Implements
IGraphics.FillRectangle(Rectangle, Color)

FillRectangle(RectangleF, Color)

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

System.Drawing.Color color

Implements
IGraphics.FillRectangle(RectangleF, Color)

FillTextureRectangle(Rectangle, Image)

Declaration
public void FillTextureRectangle(Rectangle rectangle, Image texture)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Image texture

Implements
IGraphics.FillTextureRectangle(Rectangle, Image)

FillTextureRectangle(Rectangle, Image, WrapMode)

Declaration
public void FillTextureRectangle(Rectangle rectangle, Image texture, WrapMode wrapMode)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Image texture

System.Drawing.Drawing2D.WrapMode wrapMode

Implements
IGraphics.FillTextureRectangle(Rectangle, Image, WrapMode)

FillTextureRectangle(RectangleF, Image)

Declaration
public void FillTextureRectangle(RectangleF rectangle, Image texture)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Image texture

Implements
IGraphics.FillTextureRectangle(RectangleF, Image)

FillTextureRectangle(RectangleF, Image, WrapMode)

Declaration
public void FillTextureRectangle(RectangleF rectangle, Image texture, WrapMode wrapMode)
Parameters
System.Drawing.RectangleF rectangle

System.Drawing.Image texture

System.Drawing.Drawing2D.WrapMode wrapMode

Implements
IGraphics.FillTextureRectangle(RectangleF, Image, WrapMode)

FillVistaRectangle(Rectangle, Color, Color, Color, Color, Single, Single)

Declaration
public void FillVistaRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.Rectangle rectangle

System.Drawing.Color color1

System.Drawing.Color color2

System.Drawing.Color color3

System.Drawing.Color color4

System.Single gradientPercentage

System.Single gradientPercentage2

Implements
IGraphics.FillVistaRectangle(Rectangle, Color, Color, Color, Color, Single, Single)

Finalize()

Declaration
protected void Finalize()

GetOpacityAttributes(Single)

Declaration
public static ImageAttributes GetOpacityAttributes(float opacity)
Parameters
System.Single opacity

Returns
System.Drawing.Imaging.ImageAttributes

GetRoundedRect(RectangleF, Single)

Declaration
public GraphicsPath GetRoundedRect(RectangleF baseRect, float radius)
Parameters
System.Drawing.RectangleF baseRect

System.Single radius

Returns
System.Drawing.Drawing2D.GraphicsPath

GetTextMetric(Font)

Declaration
public static FontTextMetrics GetTextMetric(Font font)
Parameters
System.Drawing.Font font

Returns
FontTextMetrics

ImageFromText(String, Font, Color, Color)

Declaration
public Image ImageFromText(string strText, Font fnt, Color clrFore, Color clrBack)
Parameters
System.String strText

System.Drawing.Font fnt

System.Drawing.Color clrFore

System.Drawing.Color clrBack

Returns
System.Drawing.Image

MeasureString(String, Font, StringFormat)

Declaration
public SizeF MeasureString(string text, Font font, StringFormat stringFormat)
Parameters
System.String text

System.Drawing.Font font

System.Drawing.StringFormat stringFormat

Returns
System.Drawing.SizeF

Implements
IGraphics.MeasureString(String, Font, StringFormat)

MeasureString(String, Font, Int32, StringFormat)

Declaration
public SizeF MeasureString(string text, Font font, int availableWidth, StringFormat stringFormat)
Parameters
System.String text

System.Drawing.Font font

System.Int32 availableWidth

System.Drawing.StringFormat stringFormat

Returns
System.Drawing.SizeF

NormalizeRect(RectangleF)

Declaration
public static RectangleF NormalizeRect(RectangleF actual)
Parameters
System.Drawing.RectangleF actual

Returns
System.Drawing.RectangleF

PopCurrentClippingPath()

Declaration
public GraphicsPath PopCurrentClippingPath()
Returns
System.Drawing.Drawing2D.GraphicsPath

Implements
IGraphics.PopCurrentClippingPath()

PushCurrentClippingPath(GraphicsPath)

Declaration
public void PushCurrentClippingPath(GraphicsPath path)
Parameters
System.Drawing.Drawing2D.GraphicsPath path

Implements
IGraphics.PushCurrentClippingPath(GraphicsPath)

ResetTransform()

Declaration
public void ResetTransform()
Implements
IGraphics.ResetTransform()

RestoreOpacity()

Declaration
public void RestoreOpacity()
Implements
IGraphics.RestoreOpacity()

RestoreSmoothingMode()

Declaration
public virtual void RestoreSmoothingMode()
Implements
IGraphics.RestoreSmoothingMode()

RestoreState(Object)

Declaration
public void RestoreState(object state)
Parameters
System.Object state

Implements
IGraphics.RestoreState(Object)

RotateTransform(Single)

Declaration
public void RotateTransform(float angleInDegrees)
Parameters
System.Single angleInDegrees

Implements
IGraphics.RotateTransform(Single)

SaveState()

Declaration
public object SaveState()
Returns
System.Object

Implements
IGraphics.SaveState()

ScaleTransform(SizeF)

Declaration
public void ScaleTransform(SizeF scale)
Parameters
System.Drawing.SizeF scale

Implements
IGraphics.ScaleTransform(SizeF)

TranslateTransform(Int32, Int32)

Declaration
public void TranslateTransform(int offsetX, int offsetY)
Parameters
System.Int32 offsetX

System.Int32 offsetY

Implements
IGraphics.TranslateTransform(Int32, Int32)

TranslateTransform(Single, Single)

Declaration
public void TranslateTransform(float offsetX, float offsetY)
Parameters
System.Single offsetX

System.Single offsetY

Implements
IGraphics.TranslateTransform(Single, Single)

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.