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 Surface

Inheritance
System.Object
Surface
GdiSurface
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 abstract class Surface

Constructors

Surface()

Declaration
public Surface()

Surface(Object)

Declaration
public Surface(object deviceContext)
Parameters
System.Object deviceContext

Properties

DeviceContext

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

Graphics

Declaration
protected abstract Graphics Graphics { get; }
Property Value
System.Drawing.Graphics

Opacity

Declaration
public float Opacity { get; set; }
Property Value
System.Single

Resources

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

Methods

BeginDraw(Object[])

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

BeginEffects(Size)

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

CreateDisplacementMapEffect()

Declaration
public virtual RadDisplacementMapEffect CreateDisplacementMapEffect()
Returns
RadDisplacementMapEffect

CreateGaussianBlurEffect()

Declaration
public virtual RadGaussianBlurEffect CreateGaussianBlurEffect()
Returns
RadGaussianBlurEffect

CreateLinearGradientBrush(RectangleF, GradientStop[], Single)

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

GradientStop[] colorStops

System.Single angle

Returns
RadBrush

CreateLinearGradientBrush(RectangleF, GradientStop[], RadLinearGradientMode)

Declaration
public abstract RadBrush CreateLinearGradientBrush(RectangleF rectangle, GradientStop[] colorStops, RadLinearGradientMode mode)
Parameters
System.Drawing.RectangleF rectangle

GradientStop[] colorStops

RadLinearGradientMode mode

Returns
RadBrush

CreateMorphologyEffect()

Declaration
public virtual RadMorphologyEffect CreateMorphologyEffect()
Returns
RadMorphologyEffect

CreatePath()

Declaration
public abstract Path CreatePath()
Returns
Path

CreateRadialBrush(PointF, Single, Single, GradientStop[])

Declaration
public abstract RadBrush CreateRadialBrush(PointF center, float xRadius, float yRadius, GradientStop[] colorStops)
Parameters
System.Drawing.PointF center

System.Single xRadius

System.Single yRadius

GradientStop[] colorStops

Returns
RadBrush

CreateRoundedRectangle(RectangleF, Single)

Declaration
public abstract RoundedRectangle CreateRoundedRectangle(RectangleF rect, float radius)
Parameters
System.Drawing.RectangleF rect

System.Single radius

Returns
RoundedRectangle

CreateSolidBrush(Color)

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

Returns
RadBrush

DrawBorder(IBorderElement, RectangleF)

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

System.Drawing.RectangleF rect

DrawBorder(IBorderElement, Path)

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

Path path

DrawEllipse(RectangleF, RadBrush, Single)

Declaration
protected void DrawEllipse(RectangleF rectangle, RadBrush brush, float width)
Parameters
System.Drawing.RectangleF rectangle

RadBrush brush

System.Single width

DrawImage(Image, RectangleF)

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

System.Drawing.RectangleF rect

DrawImage(IImageElement, RectangleF)

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

System.Drawing.RectangleF rect

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

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

DrawPathCore(Path, RadBrush, Single)

Declaration
protected abstract void DrawPathCore(Path path, RadBrush brush, float width)
Parameters
Path path

RadBrush brush

System.Single width

DrawRectangle(RectangleF, RadBrush, Single)

Declaration
protected void DrawRectangle(RectangleF rectangle, RadBrush brush, float width)
Parameters
System.Drawing.RectangleF rectangle

RadBrush brush

System.Single width

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

Declaration
public abstract 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, RadBrush, RectangleF, TextFormat)

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

System.Drawing.Font font

RadBrush brush

System.Drawing.RectangleF rect

TextFormat textFormat

DrawText(ITextElement, RadBrush, RectangleF)

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

RadBrush brush

System.Drawing.RectangleF rect

EndDraw()

Declaration
public abstract void EndDraw()

EndEffects(EffectCollection)

Declaration
public virtual void EndEffects(EffectCollection effects)
Parameters
EffectCollection effects

FillEllipse(RectangleF, RadBrush)

Declaration
protected void FillEllipse(RectangleF rectangle, RadBrush brush)
Parameters
System.Drawing.RectangleF rectangle

RadBrush brush

FillOfficeGlass(Path, Color, Color, Color, Color, Single, Single, Boolean)

Declaration
protected virtual void FillOfficeGlass(Path inputPath, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2, bool fillEllipse)
Parameters
Path inputPath

System.Drawing.Color color1

System.Drawing.Color color2

System.Drawing.Color color3

System.Drawing.Color color4

System.Single gradientPercentage

System.Single gradientPercentage2

System.Boolean fillEllipse

FillOfficeGlassBottomGlow(Graphics, Color, Color, RectangleF, Int32, Boolean)

Declaration
protected virtual bool FillOfficeGlassBottomGlow(Graphics graphics, Color color3, Color color4, RectangleF originalRectangle, int topHeight, bool fillEllipse)
Parameters
System.Drawing.Graphics graphics

System.Drawing.Color color3

System.Drawing.Color color4

System.Drawing.RectangleF originalRectangle

System.Int32 topHeight

System.Boolean fillEllipse

Returns
System.Boolean

FillOfficeGlassMain(Color, RectangleF, Boolean)

Declaration
protected virtual void FillOfficeGlassMain(Color color3, RectangleF innerRectangle, bool fillEllipse)
Parameters
System.Drawing.Color color3

System.Drawing.RectangleF innerRectangle

System.Boolean fillEllipse

FillOfficeGlassOuterBorder(RectangleF, Color, Int32, Boolean)

Declaration
protected virtual void FillOfficeGlassOuterBorder(RectangleF originalRectangle, Color color3, int borderThicness, bool fillEllipse)
Parameters
System.Drawing.RectangleF originalRectangle

System.Drawing.Color color3

System.Int32 borderThicness

System.Boolean fillEllipse

FillOfficeGlassTopInnerBorder(RectangleF, Color, Color, Int32, Boolean)

Declaration
protected virtual void FillOfficeGlassTopInnerBorder(RectangleF originalRectangle, Color color1, Color color4, int borderThicness, bool fillEllipse)
Parameters
System.Drawing.RectangleF originalRectangle

System.Drawing.Color color1

System.Drawing.Color color4

System.Int32 borderThicness

System.Boolean fillEllipse

FillOfficeGlassTopInnerGlow(Graphics, Color, Color, RectangleF, Boolean)

Declaration
protected virtual bool FillOfficeGlassTopInnerGlow(Graphics graphics, Color color2, Color color3, RectangleF originalRectangle, bool fillEllipse)
Parameters
System.Drawing.Graphics graphics

System.Drawing.Color color2

System.Drawing.Color color3

System.Drawing.RectangleF originalRectangle

System.Boolean fillEllipse

Returns
System.Boolean

FillOfficeGlassTopLightGlow(Graphics, Color, Color, RectangleF, Single, Boolean)

Declaration
protected virtual void FillOfficeGlassTopLightGlow(Graphics graphics, Color color1, Color color2, RectangleF originalRectangle, float gradientPercentage, bool fillEllipse)
Parameters
System.Drawing.Graphics graphics

System.Drawing.Color color1

System.Drawing.Color color2

System.Drawing.RectangleF originalRectangle

System.Single gradientPercentage

System.Boolean fillEllipse

FillPath(IFillElement, Path)

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

Path path

FillPathCore(Path, RadBrush)

Declaration
protected abstract void FillPathCore(Path path, RadBrush brush)
Parameters
Path path

RadBrush brush

FillPolygon(RadBrush, PointF[])

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

System.Drawing.PointF[] points

FillRectangle(RectangleF, RadBrush)

Declaration
protected void FillRectangle(RectangleF rectangle, RadBrush brush)
Parameters
System.Drawing.RectangleF rectangle

RadBrush brush

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

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

FillRoundedRectangleCore(RoundedRectangle, RadBrush)

Declaration
protected abstract void FillRoundedRectangleCore(RoundedRectangle roundedRectangle, RadBrush brush)
Parameters
RoundedRectangle roundedRectangle

RadBrush brush

GetColor(Color)

Declaration
protected Color GetColor(Color original)
Parameters
System.Drawing.Color original

Returns
System.Drawing.Color

GetFillGelGradientStops(GradientStop[], Int32)

Declaration
protected virtual GradientStop[] GetFillGelGradientStops(GradientStop[] colorStops, int colorCount)
Parameters
GradientStop[] colorStops

System.Int32 colorCount

Returns
GradientStop[]

GetFillRadialGradientStops(GradientStop[], Int32, Single, Single)

Declaration
protected virtual GradientStop[] GetFillRadialGradientStops(GradientStop[] colorStops, int colorCount, float gradientPercentage, float gradientPercentage2)
Parameters
GradientStop[] colorStops

System.Int32 colorCount

System.Single gradientPercentage

System.Single gradientPercentage2

Returns
GradientStop[]

MeasureText(String, Font, SizeF, TextFormat)

Declaration
public abstract 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 abstract SizeF MeasureText(ITextElement element, SizeF availableSize)
Parameters
ITextElement element

System.Drawing.SizeF availableSize

Returns
System.Drawing.SizeF

ReduceAlphaBasedOnOriginal(Int32, Color)

Declaration
protected Color ReduceAlphaBasedOnOriginal(int newAlpha, Color color)
Parameters
System.Int32 newAlpha

System.Drawing.Color color

Returns
System.Drawing.Color

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.