Class
Surface

Definition

Namespace:Telerik.WinControls.Drawing

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public abstract class Surface

Inheritance: objectSurface

Derived Classes: GdiSurface

Constructors

Surface()

Declaration

cs-api-definition
public Surface()

Surface(object)

Declaration

cs-api-definition
public Surface(object deviceContext)

Parameters

deviceContext

object

Properties

DeviceContext

Declaration

cs-api-definition
public object DeviceContext { get; }

Property Value

object

Graphics

Declaration

cs-api-definition
protected abstract Graphics Graphics { get; }

Property Value

Graphics

Opacity

Declaration

cs-api-definition
public float Opacity { get; set; }

Property Value

float

Resources

Declaration

cs-api-definition
public Dictionary<string, object> Resources { get; }

Property Value

Dictionary<string, object>

Methods

BeginDraw(params object[])

Declaration

cs-api-definition
public abstract void BeginDraw(params object[] resources)

Parameters

resources

object[]

BeginEffects(Size)

Declaration

cs-api-definition
public virtual void BeginEffects(Size viewportSize)

Parameters

viewportSize

Size

CreateDisplacementMapEffect()

Declaration

cs-api-definition
public virtual RadDisplacementMapEffect CreateDisplacementMapEffect()

Returns

RadDisplacementMapEffect

CreateGaussianBlurEffect()

Declaration

cs-api-definition
public virtual RadGaussianBlurEffect CreateGaussianBlurEffect()

Returns

RadGaussianBlurEffect

CreateLinearGradientBrush(RectangleF, GradientStop[], RadLinearGradientMode)

Declaration

cs-api-definition
public abstract RadBrush CreateLinearGradientBrush(RectangleF rectangle, GradientStop[] colorStops, RadLinearGradientMode mode)

Parameters

rectangle

RectangleF

colorStops

GradientStop[]

mode

RadLinearGradientMode

Returns

RadBrush

CreateLinearGradientBrush(RectangleF, GradientStop[], float)

Declaration

cs-api-definition
public abstract RadBrush CreateLinearGradientBrush(RectangleF rectangle, GradientStop[] colorStops, float angle)

Parameters

rectangle

RectangleF

colorStops

GradientStop[]

angle

float

Returns

RadBrush

CreateMorphologyEffect()

Declaration

cs-api-definition
public virtual RadMorphologyEffect CreateMorphologyEffect()

Returns

RadMorphologyEffect

CreatePath()

Declaration

cs-api-definition
public abstract Path CreatePath()

Returns

Path

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

Declaration

cs-api-definition
public abstract RadBrush CreateRadialBrush(PointF center, float xRadius, float yRadius, GradientStop[] colorStops)

Parameters

center

PointF

xRadius

float

yRadius

float

colorStops

GradientStop[]

Returns

RadBrush

CreateRoundedRectangle(RectangleF, float)

Declaration

cs-api-definition
public abstract RoundedRectangle CreateRoundedRectangle(RectangleF rect, float radius)

Parameters

rect

RectangleF

radius

float

Returns

RoundedRectangle

CreateSolidBrush(Color)

Declaration

cs-api-definition
public abstract RadBrush CreateSolidBrush(Color color)

Parameters

color

Color

Returns

RadBrush

DrawBorder(IBorderElement, Path)

Declaration

cs-api-definition
public abstract void DrawBorder(IBorderElement element, Path path)

Parameters

element

IBorderElement

path

Path

DrawBorder(IBorderElement, RectangleF)

Declaration

cs-api-definition
public abstract void DrawBorder(IBorderElement element, RectangleF rect)

Parameters

element

IBorderElement

rect

RectangleF

DrawEllipse(RectangleF, RadBrush, float)

Declaration

cs-api-definition
protected void DrawEllipse(RectangleF rectangle, RadBrush brush, float width)

Parameters

rectangle

RectangleF

brush

RadBrush

width

float

DrawImage(IImageElement, RectangleF)

Declaration

cs-api-definition
public abstract void DrawImage(IImageElement element, RectangleF rect)

Parameters

element

IImageElement

rect

RectangleF

DrawImage(Image, RectangleF)

Declaration

cs-api-definition
public abstract void DrawImage(Image image, RectangleF rect)

Parameters

image

Image

rect

RectangleF

DrawLine(RadBrush, float, float, float, float)

Declaration

cs-api-definition
public abstract void DrawLine(RadBrush brush, float x1, float y1, float x2, float y2)

Parameters

brush

RadBrush

x1

float

y1

float

x2

float

y2

float

DrawPathCore(Path, RadBrush, float)

Declaration

cs-api-definition
protected abstract void DrawPathCore(Path path, RadBrush brush, float width)

Parameters

path

Path

brush

RadBrush

width

float

DrawRectangle(RadBrush, float, float, float, float)

Declaration

cs-api-definition
public abstract void DrawRectangle(RadBrush brush, float x1, float y1, float x2, float y2)

Parameters

brush

RadBrush

x1

float

y1

float

x2

float

y2

float

DrawRectangle(RectangleF, RadBrush, float)

Declaration

cs-api-definition
protected void DrawRectangle(RectangleF rectangle, RadBrush brush, float width)

Parameters

rectangle

RectangleF

brush

RadBrush

width

float

DrawText(ITextElement, RadBrush, RectangleF)

Declaration

cs-api-definition
public abstract void DrawText(ITextElement element, RadBrush brush, RectangleF rect)

Parameters

element

ITextElement

brush

RadBrush

rect

RectangleF

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

Declaration

cs-api-definition
public abstract void DrawText(string text, Font font, RadBrush brush, RectangleF rect, TextFormat textFormat)

Parameters

text

string

font

Font

brush

RadBrush

rect

RectangleF

textFormat

TextFormat

EndDraw()

Declaration

cs-api-definition
public abstract void EndDraw()

EndEffects(EffectCollection)

Declaration

cs-api-definition
public virtual void EndEffects(EffectCollection effects)

Parameters

effects

EffectCollection

FillEllipse(RectangleF, RadBrush)

Declaration

cs-api-definition
protected void FillEllipse(RectangleF rectangle, RadBrush brush)

Parameters

rectangle

RectangleF

brush

RadBrush

FillOfficeGlass(Path, Color, Color, Color, Color, float, float, bool)

Declaration

cs-api-definition
protected virtual void FillOfficeGlass(Path inputPath, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2, bool fillEllipse)

Parameters

inputPath

Path

color1

Color

color2

Color

color3

Color

color4

Color

gradientPercentage

float

gradientPercentage2

float

fillEllipse

bool

FillOfficeGlassBottomGlow(Graphics, Color, Color, RectangleF, int, bool)

Declaration

cs-api-definition
protected virtual bool FillOfficeGlassBottomGlow(Graphics graphics, Color color3, Color color4, RectangleF originalRectangle, int topHeight, bool fillEllipse)

Parameters

graphics

Graphics

color3

Color

color4

Color

originalRectangle

RectangleF

topHeight

int

fillEllipse

bool

Returns

bool

FillOfficeGlassMain(Color, RectangleF, bool)

Declaration

cs-api-definition
protected virtual void FillOfficeGlassMain(Color color3, RectangleF innerRectangle, bool fillEllipse)

Parameters

color3

Color

innerRectangle

RectangleF

fillEllipse

bool

FillOfficeGlassOuterBorder(RectangleF, Color, int, bool)

Declaration

cs-api-definition
protected virtual void FillOfficeGlassOuterBorder(RectangleF originalRectangle, Color color3, int borderThicness, bool fillEllipse)

Parameters

originalRectangle

RectangleF

color3

Color

borderThicness

int

fillEllipse

bool

FillOfficeGlassTopInnerBorder(RectangleF, Color, Color, int, bool)

Declaration

cs-api-definition
protected virtual void FillOfficeGlassTopInnerBorder(RectangleF originalRectangle, Color color1, Color color4, int borderThicness, bool fillEllipse)

Parameters

originalRectangle

RectangleF

color1

Color

color4

Color

borderThicness

int

fillEllipse

bool

FillOfficeGlassTopInnerGlow(Graphics, Color, Color, RectangleF, bool)

Declaration

cs-api-definition
protected virtual bool FillOfficeGlassTopInnerGlow(Graphics graphics, Color color2, Color color3, RectangleF originalRectangle, bool fillEllipse)

Parameters

graphics

Graphics

color2

Color

color3

Color

originalRectangle

RectangleF

fillEllipse

bool

Returns

bool

FillOfficeGlassTopLightGlow(Graphics, Color, Color, RectangleF, float, bool)

Declaration

cs-api-definition
protected virtual void FillOfficeGlassTopLightGlow(Graphics graphics, Color color1, Color color2, RectangleF originalRectangle, float gradientPercentage, bool fillEllipse)

Parameters

graphics

Graphics

color1

Color

color2

Color

originalRectangle

RectangleF

gradientPercentage

float

fillEllipse

bool

FillPath(IFillElement, Path)

Declaration

cs-api-definition
public void FillPath(IFillElement element, Path path)

Parameters

element

IFillElement

path

Path

FillPathCore(Path, RadBrush)

Declaration

cs-api-definition
protected abstract void FillPathCore(Path path, RadBrush brush)

Parameters

path

Path

brush

RadBrush

FillPolygon(RadBrush, PointF[])

Declaration

cs-api-definition
public abstract void FillPolygon(RadBrush brush, PointF[] points)

Parameters

brush

RadBrush

points

PointF[]

FillRectangle(IFillElement, RectangleF)

Declaration

cs-api-definition
public void FillRectangle(IFillElement element, RectangleF rect)

Parameters

element

IFillElement

rect

RectangleF

FillRectangle(RadBrush, float, float, float, float)

Declaration

cs-api-definition
public abstract void FillRectangle(RadBrush brush, float x, float y, float width, float height)

Parameters

brush

RadBrush

x

float

y

float

width

float

height

float

FillRectangle(RectangleF, RadBrush)

Declaration

cs-api-definition
protected void FillRectangle(RectangleF rectangle, RadBrush brush)

Parameters

rectangle

RectangleF

brush

RadBrush

FillRoundedRectangleCore(RoundedRectangle, RadBrush)

Declaration

cs-api-definition
protected abstract void FillRoundedRectangleCore(RoundedRectangle roundedRectangle, RadBrush brush)

Parameters

roundedRectangle

RoundedRectangle

brush

RadBrush

GetColor(Color)

Declaration

cs-api-definition
protected Color GetColor(Color original)

Parameters

original

Color

Returns

Color

GetFillGelGradientStops(GradientStop[], int)

Declaration

cs-api-definition
protected virtual GradientStop[] GetFillGelGradientStops(GradientStop[] colorStops, int colorCount)

Parameters

colorStops

GradientStop[]

colorCount

int

Returns

GradientStop[]

GetFillRadialGradientStops(GradientStop[], int, float, float)

Declaration

cs-api-definition
protected virtual GradientStop[] GetFillRadialGradientStops(GradientStop[] colorStops, int colorCount, float gradientPercentage, float gradientPercentage2)

Parameters

colorStops

GradientStop[]

colorCount

int

gradientPercentage

float

gradientPercentage2

float

Returns

GradientStop[]

MeasureText(ITextElement, SizeF)

Declaration

cs-api-definition
public abstract SizeF MeasureText(ITextElement element, SizeF availableSize)

Parameters

element

ITextElement

availableSize

SizeF

Returns

SizeF

MeasureText(string, Font, SizeF, TextFormat)

Declaration

cs-api-definition
public abstract SizeF MeasureText(string text, Font font, SizeF availableSize, TextFormat textFormat)

Parameters

text

string

font

Font

availableSize

SizeF

textFormat

TextFormat

Returns

SizeF

ReduceAlphaBasedOnOriginal(int, Color)

Declaration

cs-api-definition
protected Color ReduceAlphaBasedOnOriginal(int newAlpha, Color color)

Parameters

newAlpha

int

color

Color

Returns

Color

In this article
DefinitionConstructorsSurface()Surface(object)PropertiesDeviceContextGraphicsOpacityResourcesMethodsBeginDraw(params object[])BeginEffects(Size)CreateDisplacementMapEffect()CreateGaussianBlurEffect()CreateLinearGradientBrush(RectangleF, GradientStop[], RadLinearGradientMode)CreateLinearGradientBrush(RectangleF, GradientStop[], float)CreateMorphologyEffect()CreatePath()CreateRadialBrush(PointF, float, float, GradientStop[])CreateRoundedRectangle(RectangleF, float)CreateSolidBrush(Color)DrawBorder(IBorderElement, Path)DrawBorder(IBorderElement, RectangleF)DrawEllipse(RectangleF, RadBrush, float)DrawImage(IImageElement, RectangleF)DrawImage(Image, RectangleF)DrawLine(RadBrush, float, float, float, float)DrawPathCore(Path, RadBrush, float)DrawRectangle(RadBrush, float, float, float, float)DrawRectangle(RectangleF, RadBrush, float)DrawText(ITextElement, RadBrush, RectangleF)DrawText(string, Font, RadBrush, RectangleF, TextFormat)EndDraw()EndEffects(EffectCollection)FillEllipse(RectangleF, RadBrush)FillOfficeGlass(Path, Color, Color, Color, Color, float, float, bool)FillOfficeGlassBottomGlow(Graphics, Color, Color, RectangleF, int, bool)FillOfficeGlassMain(Color, RectangleF, bool)FillOfficeGlassOuterBorder(RectangleF, Color, int, bool)FillOfficeGlassTopInnerBorder(RectangleF, Color, Color, int, bool)FillOfficeGlassTopInnerGlow(Graphics, Color, Color, RectangleF, bool)FillOfficeGlassTopLightGlow(Graphics, Color, Color, RectangleF, float, bool)FillPath(IFillElement, Path)FillPathCore(Path, RadBrush)FillPolygon(RadBrush, PointF[])FillRectangle(IFillElement, RectangleF)FillRectangle(RadBrush, float, float, float, float)FillRectangle(RectangleF, RadBrush)FillRoundedRectangleCore(RoundedRectangle, RadBrush)GetColor(Color)GetFillGelGradientStops(GradientStop[], int)GetFillRadialGradientStops(GradientStop[], int, float, float)MeasureText(ITextElement, SizeF)MeasureText(string, Font, SizeF, TextFormat)ReduceAlphaBasedOnOriginal(int, Color)
Not finding the help you need?
Contact Support