Interface
IGraphics

Defines a graphics abstraction interface for drawing operations in RadControls. Provides a unified API for various rendering backends including GDI+, DirectX, and other graphics systems.

Definition

Namespace:Telerik.WinControls.Paint

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public interface IGraphics

Properties

ClipRectangle

Gets the clipping rectangle; the rectangle which needs redrawing.

Declaration

cs-api-definition
Rectangle ClipRectangle { get; }

Property Value

Rectangle

Opacity

Gets or sets the opacity level of the device context.

Declaration

cs-api-definition
double Opacity { get; }

Property Value

double

UnderlayGraphics

Gets the current context device - graphics object.

Declaration

cs-api-definition
object UnderlayGraphics { get; }

Property Value

object

Methods

ChangeOpacity(double)

Changes the opacity level of the current device context.

Declaration

cs-api-definition
void ChangeOpacity(double opacity)

Parameters

opacity

double

ChangeSmoothingMode(SmoothingMode)

Saves the current smothingMode, and changes the smoothingmode for the current device context.

Declaration

cs-api-definition
void ChangeSmoothingMode(SmoothingMode smoothingMode)

Parameters

smoothingMode

SmoothingMode

CreateBitmapMask(Color, Bitmap)

Creates a mask specified by color and bitmap.

Declaration

cs-api-definition
Bitmap CreateBitmapMask(Color maskColor, Bitmap bitmap)

Parameters

maskColor

Color

bitmap

Bitmap

Returns

Bitmap

DrawBitmap(Image, int, int)

Draws a bitmap image specified by image object and position from the left-upper corner of the current device context.

Declaration

cs-api-definition
void DrawBitmap(Image image, int x, int y)

Parameters

image

Image

x

int

y

int

DrawBitmap(Image, int, int, double)

Draws a bitmap image specified by image object and position from the left-upper corner of the current device context and specified opacity.

Declaration

cs-api-definition
void DrawBitmap(Image image, int x, int y, double opacity)

Parameters

image

Image

x

int

y

int

opacity

double

DrawBitmap(Image, int, int, int, int)

Draws a bitmap image specified by image object, position from the left-upper corner of the current device context and specified size.

Declaration

cs-api-definition
void DrawBitmap(Image image, int x, int y, int width, int height)

Parameters

image

Image

x

int

y

int

width

int

height

int

DrawBitmap(Image, int, int, int, int, double)

Draws a bitmap image specified by image object, position from the left-upper corner of the current device context, opacity and specified size.

Declaration

cs-api-definition
void DrawBitmap(Image image, int x, int y, int width, int height, double opacity)

Parameters

image

Image

x

int

y

int

width

int

height

int

opacity

double

DrawBlurShadow(GraphicsPath, Rectangle, float, Color)

Draws a blur shadow effect for the specified graphics path.

Declaration

cs-api-definition
void DrawBlurShadow(GraphicsPath path, Rectangle r, float offset, Color color)

Parameters

path

GraphicsPath

The GraphicsPath for which to draw the shadow.

r

Rectangle

The bounding rectangle for the shadow effect.

offset

float

The offset distance of the shadow from the original path.

color

Color

The Color of the shadow.

DrawBorder(RectangleF, IBorderElement)

Declaration

cs-api-definition
void DrawBorder(RectangleF rectangle, IBorderElement borderElement)

Parameters

rectangle

RectangleF

borderElement

IBorderElement

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

Draws a custom gradient path specified by GraphicsPath, GraphicsPath for the gradient, color, gradient color array, penalignment and penwidth.

Declaration

cs-api-definition
void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)

Parameters

path

GraphicsPath

gradientPath

GraphicsPath

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

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

Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment and penwidth.

Declaration

cs-api-definition
void DrawCustomGradientRectangle(Rectangle rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)

Parameters

rectangle

Rectangle

path

GraphicsPath

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

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

Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment and penwidth.

Declaration

cs-api-definition
void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)

Parameters

rectangle

RectangleF

path

GraphicsPath

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

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

Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment, penwidth and DashStyle.

Declaration

cs-api-definition
void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)

Parameters

rectangle

RectangleF

path

GraphicsPath

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

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

Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment, penwidth and DashStyle.

Declaration

cs-api-definition
void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)

Parameters

rectangle

RectangleF

path

GraphicsPath

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

dashPattern

float[]

DrawEllipse(Rectangle, Color)

Draws an ellipse defined by a bounding rectangle and color.

Declaration

cs-api-definition
void DrawEllipse(Rectangle BorderRectangle, Color color)

Parameters

BorderRectangle

Rectangle

color

Color

DrawImage(Point, Image, bool)

Draws the specified Image object with the specified Point, Image and disable flag.

Declaration

cs-api-definition
void DrawImage(Point point, Image image, bool enabled)

Parameters

point

Point

image

Image

enabled

bool

DrawImage(Rectangle, Image, ContentAlignment, bool)

Draws the specified Image object with the specified Rectangle, Image, ContentAlignment and disable flag.

Declaration

cs-api-definition
void DrawImage(Rectangle rectangle, Image image, ContentAlignment alignment, bool enabled)

Parameters

rectangle

Rectangle

image

Image

alignment

ContentAlignment

enabled

bool

DrawLine(Color, DashStyle, int, int, int, int)

Draws a line specified by color, DashStyle, initial x point, initial y point, final x and final y point.

Declaration

cs-api-definition
void DrawLine(Color color, DashStyle dashStyle, int x1, int y1, int x2, int y2)

Parameters

color

Color

dashStyle

DashStyle

x1

int

y1

int

x2

int

y2

int

DrawLine(Color, DashStyle, int, int, int, int, float)

Draws a line specified by color, DashStyle, initial x point, initial y point, final x final y point and width.

Declaration

cs-api-definition
void DrawLine(Color color, DashStyle dashStyle, int x1, int y1, int x2, int y2, float width)

Parameters

color

Color

dashStyle

DashStyle

x1

int

y1

int

x2

int

y2

int

width

float

DrawLine(Color, float, float, float, float)

Draws a line specified by color, initial x point, initial y point, final x and final y point.

Declaration

cs-api-definition
void DrawLine(Color color, float x1, float y1, float x2, float y2)

Parameters

color

Color

x1

float

y1

float

x2

float

y2

float

DrawLine(Color, float, float, float, float, float)

Draws a line specified by color, initial x point, initial y point, final x, final y point and width

Declaration

cs-api-definition
void DrawLine(Color color, float x1, float y1, float x2, float y2, float width)

Parameters

color

Color

x1

float

y1

float

x2

float

y2

float

width

float

DrawLine(Color, int, int, int, int)

Draws a line specified by color, initial x point, initial y point, final x and final y point.

Declaration

cs-api-definition
void DrawLine(Color color, int x1, int y1, int x2, int y2)

Parameters

color

Color

x1

int

y1

int

x2

int

y2

int

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

Draws a linear gradient path specified by GraphicsPath, bounding Rectangle, color gradient array, penalignment, penwidth and angle.

Declaration

cs-api-definition
void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)

Parameters

path

GraphicsPath

bounds

RectangleF

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

angle

float

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

Draws a linear gradient path specified by GraphicsPath, bounding Rectangle, color gradient array, penalignment, penwidth, angle and DashStyle.

Declaration

cs-api-definition
void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)

Parameters

path

GraphicsPath

bounds

RectangleF

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

angle

float

dashStyle

DashStyle

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

Draws a linear gradient path specified by GraphicsPath, bounding Rectangle, color gradient array, penalignment, penwidth, angle and DashStyle.

Declaration

cs-api-definition
void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPAttern)

Parameters

path

GraphicsPath

bounds

RectangleF

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

angle

float

dashStyle

DashStyle

dashPAttern

float[]

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

Draws a linear gradient rectangle specified by rectangle structure, color array, penalignment, penWidth and angle.

Declaration

cs-api-definition
void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)

Parameters

rectangle

RectangleF

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

angle

float

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

Draws a linear gradient rectangle specified by rectangle structure, color array, penalignment, penWidth, angle and DashStyle.

Declaration

cs-api-definition
void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)

Parameters

rectangle

RectangleF

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

angle

float

dashStyle

DashStyle

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

Draws a linear gradient rectangle specified by rectangle structure, color array, penalignment, penWidth, angle and DashStyle.

Declaration

cs-api-definition
void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPattern)

Parameters

rectangle

RectangleF

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

angle

float

dashStyle

DashStyle

dashPattern

float[]

DrawPath(GraphicsPath, Color, PenAlignment, float)

Draws a path specified by GraphicsPath, color, pen alignment and pen width.

Declaration

cs-api-definition
void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth)

Parameters

path

GraphicsPath

color

Color

penAlignment

PenAlignment

penWidth

float

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

Draws a path specified by GraphicsPath, color, pen alignment, pen width and DashStyle.

Declaration

cs-api-definition
void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)

Parameters

path

GraphicsPath

color

Color

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

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

Draws a path specified by GraphicsPath, color, pen alignment, pen width and DashStyle.

Declaration

cs-api-definition
void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)

Parameters

path

GraphicsPath

color

Color

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

dashPattern

float[]

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

Draws a redial gradient path specified by Graphicspath, bounding rectangle, color, color gradient array, penalignment and penwidth.

Declaration

cs-api-definition
void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)

Parameters

path

GraphicsPath

bounds

Rectangle

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

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

Draws a redial gradient path specified by Graphics path, bounding rectangle, color, color gradient array, pen alignment and pen width.

Declaration

cs-api-definition
void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)

Parameters

path

GraphicsPath

bounds

Rectangle

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

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

Draws a redial gradient path specified by Graphics path, bounding rectangle, color, color gradient array, pen alignment and pen width.

Declaration

cs-api-definition
void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPAttern)

Parameters

path

GraphicsPath

bounds

Rectangle

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

dashPAttern

float[]

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

Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment and penWidth.

Declaration

cs-api-definition
void DrawRadialGradientRectangle(Rectangle rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)

Parameters

rectangle

Rectangle

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

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

Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment and penWidth.

Declaration

cs-api-definition
void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)

Parameters

rectangle

RectangleF

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

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

Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment, penWidth and DashStyle.

Declaration

cs-api-definition
void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)

Parameters

rectangle

RectangleF

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

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

Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment, penWidth and DashStyle.

Declaration

cs-api-definition
void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)

Parameters

rectangle

RectangleF

color

Color

gradientColors

Color[]

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

dashPattern

float[]

DrawRectangle(Rectangle, Color)

Draws a rectangle specified by a rectangle structure and a color.

Declaration

cs-api-definition
void DrawRectangle(Rectangle rectangle, Color color)

Parameters

rectangle

Rectangle

color

Color

DrawRectangle(Rectangle, Color, PenAlignment, float)

Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.

Declaration

cs-api-definition
void DrawRectangle(Rectangle rectangle, Color color, PenAlignment penAlignment, float penWidth)

Parameters

rectangle

Rectangle

color

Color

penAlignment

PenAlignment

penWidth

float

DrawRectangle(RectangleF, Color, PenAlignment, float)

Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.

Declaration

cs-api-definition
void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth)

Parameters

rectangle

RectangleF

color

Color

penAlignment

PenAlignment

penWidth

float

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

Draws a rectangle specified by rectangle structure, color, PenAlignment, pen width and DashStyle.

Declaration

cs-api-definition
void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)

Parameters

rectangle

RectangleF

color

Color

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

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

Draws a rectangle specified by rectangle structure, color, PenAlignment, pen width and DashStyle.

Declaration

cs-api-definition
void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)

Parameters

rectangle

RectangleF

color

Color

penAlignment

PenAlignment

penWidth

float

dashStyle

DashStyle

dashPattern

float[]

DrawRoundRect(Rectangle, Color, float, int)

Draws a round rectangle specified by Rectangle structure, color, float borderWidth, and radius in pixels.

Declaration

cs-api-definition
void DrawRoundRect(Rectangle rectangle, Color color, float borderWidth, int radius)

Parameters

rectangle

Rectangle

color

Color

borderWidth

float

radius

int

DrawString(TextParams, SizeF)

Declaration

cs-api-definition
void DrawString(TextParams textParams, SizeF measuredSize)

Parameters

textParams

TextParams

measuredSize

SizeF

DrawString(string, Rectangle, Font, Color, StringFormat, Orientation, bool)

Draws the specified text string with specified Rectangle, Font, Color, ContentAlignment, StringFormat and Orientation.

Declaration

cs-api-definition
void DrawString(string drawString, Rectangle rectangle, Font font, Color color, StringFormat stringFormat, Orientation orientation, bool flipText)

Parameters

drawString

string

rectangle

Rectangle

font

Font

color

Color

stringFormat

StringFormat

orientation

Orientation

flipText

bool

DrawString(string, RectangleF, Font, Color, StringFormat, Orientation, bool)

Declaration

cs-api-definition
void DrawString(string drawString, RectangleF rectangle, Font font, Color color, StringFormat stringFormat, Orientation orientation, bool flipText)

Parameters

drawString

string

rectangle

RectangleF

font

Font

color

Color

stringFormat

StringFormat

orientation

Orientation

flipText

bool

ExcludeClip(Rectangle)

Updates the clipping region of the current Graphics object to exclude the area specified by a Rectangle structure.

Declaration

cs-api-definition
void ExcludeClip(Rectangle rectangle)

Parameters

rectangle

Rectangle

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

Fills the gel gradient rectangle specified by rectangle structure, color, color, and gradientPercentage.

Declaration

cs-api-definition
void FillGellRectangle(Rectangle rectangle, Color[] colorStops, float gradientPercentage, float gradientPercentage2)

Parameters

rectangle

Rectangle

colorStops

Color[]

gradientPercentage

float

gradientPercentage2

float

FillGlassRectangle(Rectangle, Color, Color, Color, Color, float, float)

Fills the glass gradient rectangle specified by rectangle structure, color, color, color, color, and gradient percentage.

Declaration

cs-api-definition
void FillGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)

Parameters

rectangle

Rectangle

color1

Color

color2

Color

color3

Color

color4

Color

gradientPercentage

float

gradientPercentage2

float

FillGradientRectangle(Rectangle, Color, Color, Color, Color, GradientStyles, float)

Fills gradient rectangle specified by rectangle structure, color, color, color, color, GradientStyles, and angle.

Declaration

cs-api-definition
void FillGradientRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, GradientStyles style, float angle)

Parameters

rectangle

Rectangle

color1

Color

color2

Color

color3

Color

color4

Color

style

GradientStyles

angle

float

FillGradientRectangle(Rectangle, Color, Color, float)

Fills the gradient rectangle specified by rectangle structure, color gradient array, float offset array, GradientStyles, angle, gradientPercentage, and gradientPercentage2.

Declaration

cs-api-definition
void FillGradientRectangle(Rectangle rectangle, Color color1, Color color2, float angle)

Parameters

rectangle

Rectangle

color1

Color

color2

Color

angle

float

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

Fills the gradient rectangle specified by rectangle structure, color gradient array, float offset array, GradientStyles, angle, gradientPercentage, and gradientPercentage2.

Declaration

cs-api-definition
void FillGradientRectangle(Rectangle rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)

Parameters

rectangle

Rectangle

colorStops

Color[]

colorOffsets

float[]

style

GradientStyles

angle

float

gradientPercentage

float

gradientPercentage2

float

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

Declaration

cs-api-definition
void FillGradientRectangle(RectangleF rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)

Parameters

rectangle

RectangleF

colorStops

Color[]

colorOffsets

float[]

style

GradientStyles

angle

float

gradientPercentage

float

gradientPercentage2

float

FillOfficeGlassRectangle(Rectangle, Color, Color, Color, Color, float, float, bool)

Fills the office glass gradient rectangle specified by rectangle structure, color, color, color, color, and gradientPercentage and gradientPercentage2.

Declaration

cs-api-definition
void FillOfficeGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2, bool drawEllipse)

Parameters

rectangle

Rectangle

color1

Color

color2

Color

color3

Color

color4

Color

gradientPercentage

float

gradientPercentage2

float

drawEllipse

bool

FillPath(Color, GraphicsPath)

Fills the specified graphics path with a solid color.

Declaration

cs-api-definition
void FillPath(Color color, GraphicsPath path)

Parameters

color

Color

The Color to use for filling the path.

path

GraphicsPath

The GraphicsPath to fill.

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

Fills the specified graphics path with a gradient using the provided color stops and offsets.

Declaration

cs-api-definition
void FillPath(Color[] colorStops, float[] colorOffsets, float angle, float gradientPercentage, float gradientPercentage2, Rectangle rectangle, GraphicsPath path)

Parameters

colorStops

Color[]

An array of colors that define the gradient.

colorOffsets

float[]

An array of float values that specify the positions of the color stops along the gradient.

angle

float

The angle of the gradient direction in degrees.

gradientPercentage

float

The first gradient percentage value.

gradientPercentage2

float

The second gradient percentage value.

rectangle

Rectangle

The bounding rectangle for the gradient.

path

GraphicsPath

The GraphicsPath to fill with the gradient.

FillPolygon(Brush, PointF[])

Fills the interior of a polygon defined by brush and an array of points specified by Point structures.

Declaration

cs-api-definition
void FillPolygon(Brush brush, PointF[] points)

Parameters

brush

Brush

points

PointF[]

FillPolygon(Color, PointF[])

Fills the interior of a polygon defined by color and an array of points specified by Point structures.

Declaration

cs-api-definition
void FillPolygon(Color color, PointF[] points)

Parameters

color

Color

points

PointF[]

FillPolygon(Color, Point[])

Fills the interior of a polygon defined by an array of points specified by Point structures and color.

Declaration

cs-api-definition
void FillPolygon(Color color, Point[] points)

Parameters

color

Color

points

Point[]

FillRectangle(Rectangle, Color)

Fills the interior of a rectangle specified by the borderRectangle and using for color the second argument.

Declaration

cs-api-definition
void FillRectangle(Rectangle BorderRectangle, Color color)

Parameters

BorderRectangle

Rectangle

color

Color

FillRectangle(RectangleF, Color)

Declaration

cs-api-definition
void FillRectangle(RectangleF BorderRectangle, Color color)

Parameters

BorderRectangle

RectangleF

color

Color

FillTextureRectangle(Rectangle, Image)

Fills a rectangle using the image as texture.

Declaration

cs-api-definition
void FillTextureRectangle(Rectangle rectangle, Image texture)

Parameters

rectangle

Rectangle

The rectangle to fill.

texture

Image

The image to use as a texture.

FillTextureRectangle(Rectangle, Image, WrapMode)

Fills a rectangle using the image as texture.

Declaration

cs-api-definition
void FillTextureRectangle(Rectangle rectangle, Image texture, WrapMode wrapMode)

Parameters

rectangle

Rectangle

The rectangle to fill.

texture

Image

The image to use as a texture.

wrapMode

WrapMode

Defines the way the image is populated in the rectangle

FillTextureRectangle(RectangleF, Image)

Fills a rectangle using the image as texture.

Declaration

cs-api-definition
void FillTextureRectangle(RectangleF rectangle, Image texture)

Parameters

rectangle

RectangleF

The rectangle to fill.

texture

Image

The image to use as a texture.

FillTextureRectangle(RectangleF, Image, WrapMode)

Fills a rectangle using the image as texture.

Declaration

cs-api-definition
void FillTextureRectangle(RectangleF rectangle, Image texture, WrapMode wrapMode)

Parameters

rectangle

RectangleF

The rectangle to fill.

texture

Image

The image to use as a texture.

wrapMode

WrapMode

Defines the way the image is populated in the rectangle

FillVistaRectangle(Rectangle, Color, Color, Color, Color, float, float)

Fills the vista gradient rectangle specified by rectangle structure, color, color, color, color, gradient percentage, and gradientPercentage2.

Declaration

cs-api-definition
void FillVistaRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)

Parameters

rectangle

Rectangle

color1

Color

color2

Color

color3

Color

color4

Color

gradientPercentage

float

gradientPercentage2

float

MeasureString(string, Font, StringFormat)

Declaration

cs-api-definition
SizeF MeasureString(string text, Font font, StringFormat stringFormat)

Parameters

text

string

font

Font

stringFormat

StringFormat

Returns

SizeF

PopCurrentClippingPath()

Declaration

cs-api-definition
GraphicsPath PopCurrentClippingPath()

Returns

GraphicsPath

PushCurrentClippingPath(GraphicsPath)

Declaration

cs-api-definition
void PushCurrentClippingPath(GraphicsPath path)

Parameters

path

GraphicsPath

ResetTransform()

<span id="ctl00_ContentPlaceHolder1_src1_resRC_ctl01_LabelAbstract">Resets the

world transformation matrix of this Graphics to the identity matrix.

Declaration

cs-api-definition
void ResetTransform()

RestoreOpacity()

Restores the opacity of the current device context to the previous value.

Declaration

cs-api-definition
void RestoreOpacity()

RestoreSmoothingMode()

Restores the smoothing mode to the previous value.

Declaration

cs-api-definition
void RestoreSmoothingMode()

RestoreState(object)

Restores the graphics state to a previously saved state.

Declaration

cs-api-definition
void RestoreState(object state)

Parameters

state

object

The state object returned by a previous call to SaveState().

RotateTransform(float)

Rotates the local geometric transformation by the specified angle. This method prepends the rotation to the transformation.

Declaration

cs-api-definition
void RotateTransform(float angleInDegrees)

Parameters

angleInDegrees

float

SaveState()

Saves the current graphics state and returns a state object.

Declaration

cs-api-definition
object SaveState()

Returns

object

An object representing the saved graphics state, which can be passed to RestoreState(object) to restore the graphics context.

ScaleTransform(SizeF)

Scales the world transformation matrix by the specified amount.

Declaration

cs-api-definition
void ScaleTransform(SizeF scale)

Parameters

scale

SizeF

TranslateTransform(float, float)

Translates the local geometric transformation of this TextureBrush object by the specified dimensions. This method prepends the translation to the transformation.

Declaration

cs-api-definition
void TranslateTransform(float offsetX, float offsetY)

Parameters

offsetX

float

offsetY

float

TranslateTransform(int, int)

Translates the local geometric transformation of this TextureBrush object by the specified dimensions. This method prepends the translation to the transformation.

Declaration

cs-api-definition
void TranslateTransform(int offsetX, int offsetY)

Parameters

offsetX

int

offsetY

int

In this article
DefinitionPropertiesClipRectangleOpacityUnderlayGraphicsMethodsChangeOpacity(double)ChangeSmoothingMode(SmoothingMode)CreateBitmapMask(Color, Bitmap)DrawBitmap(Image, int, int)DrawBitmap(Image, int, int, double)DrawBitmap(Image, int, int, int, int)DrawBitmap(Image, int, int, int, int, double)DrawBlurShadow(GraphicsPath, Rectangle, float, Color)DrawBorder(RectangleF, IBorderElement)DrawCustomGradientPath(GraphicsPath, GraphicsPath, Color, Color[], PenAlignment, float)DrawCustomGradientRectangle(Rectangle, GraphicsPath, Color, Color[], PenAlignment, float)DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, float)DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, float, DashStyle)DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, float, DashStyle, float[])DrawEllipse(Rectangle, Color)DrawImage(Point, Image, bool)DrawImage(Rectangle, Image, ContentAlignment, bool)DrawLine(Color, DashStyle, int, int, int, int)DrawLine(Color, DashStyle, int, int, int, int, float)DrawLine(Color, float, float, float, float)DrawLine(Color, float, float, float, float, float)DrawLine(Color, int, int, int, int)DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, float, float)DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, float, float, DashStyle)DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, float, float, DashStyle, float[])DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, float, float)DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, float, float, DashStyle)DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, float, float, DashStyle, float[])DrawPath(GraphicsPath, Color, PenAlignment, float)DrawPath(GraphicsPath, Color, PenAlignment, float, DashStyle)DrawPath(GraphicsPath, Color, PenAlignment, float, DashStyle, float[])DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, float)DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, float, DashStyle)DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, float, DashStyle, float[])DrawRadialGradientRectangle(Rectangle, Color, Color[], PenAlignment, float)DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, float)DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, float, DashStyle)DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, float, DashStyle, float[])DrawRectangle(Rectangle, Color)DrawRectangle(Rectangle, Color, PenAlignment, float)DrawRectangle(RectangleF, Color, PenAlignment, float)DrawRectangle(RectangleF, Color, PenAlignment, float, DashStyle)DrawRectangle(RectangleF, Color, PenAlignment, float, DashStyle, float[])DrawRoundRect(Rectangle, Color, float, int)DrawString(TextParams, SizeF)DrawString(string, Rectangle, Font, Color, StringFormat, Orientation, bool)DrawString(string, RectangleF, Font, Color, StringFormat, Orientation, bool)ExcludeClip(Rectangle)FillGellRectangle(Rectangle, Color[], float, float)FillGlassRectangle(Rectangle, Color, Color, Color, Color, float, float)FillGradientRectangle(Rectangle, Color, Color, Color, Color, GradientStyles, float)FillGradientRectangle(Rectangle, Color, Color, float)FillGradientRectangle(Rectangle, Color[], float[], GradientStyles, float, float, float)FillGradientRectangle(RectangleF, Color[], float[], GradientStyles, float, float, float)FillOfficeGlassRectangle(Rectangle, Color, Color, Color, Color, float, float, bool)FillPath(Color, GraphicsPath)FillPath(Color[], float[], float, float, float, Rectangle, GraphicsPath)FillPolygon(Brush, PointF[])FillPolygon(Color, PointF[])FillPolygon(Color, Point[])FillRectangle(Rectangle, Color)FillRectangle(RectangleF, Color)FillTextureRectangle(Rectangle, Image)FillTextureRectangle(Rectangle, Image, WrapMode)FillTextureRectangle(RectangleF, Image)FillTextureRectangle(RectangleF, Image, WrapMode)FillVistaRectangle(Rectangle, Color, Color, Color, Color, float, float)MeasureString(string, Font, StringFormat)PopCurrentClippingPath()PushCurrentClippingPath(GraphicsPath)ResetTransform()RestoreOpacity()RestoreSmoothingMode()RestoreState(object)RotateTransform(float)SaveState()ScaleTransform(SizeF)TranslateTransform(float, float)TranslateTransform(int, int)
Not finding the help you need?
Contact Support