InterfaceIGraphics
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:
public interface IGraphics
Properties
ClipRectangle
Gets the clipping rectangle; the rectangle which needs redrawing.
Opacity
Gets or sets the opacity level of the device context.
UnderlayGraphics
Gets the current context device - graphics object.
Methods
ChangeOpacity(double)
Changes the opacity level of the current device context.
ChangeSmoothingMode(SmoothingMode)
Saves the current smothingMode, and changes the smoothingmode for the current device context.
Declaration
void ChangeSmoothingMode(SmoothingMode smoothingMode)
Parameters
smoothingMode
CreateBitmapMask(Color, Bitmap)
Creates a mask specified by color and 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.
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.
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.
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.
DrawBlurShadow(GraphicsPath, Rectangle, float, Color)
Draws a blur shadow effect for the specified graphics path.
Declaration
void DrawBlurShadow(GraphicsPath path, Rectangle r, float offset, Color color)
Parameters
path
The GraphicsPath for which to draw the shadow.
r
The bounding rectangle for the shadow effect.
offset
The offset distance of the shadow from the original path.
color
The Color of the shadow.
DrawBorder(RectangleF, IBorderElement)
Declaration
void DrawBorder(RectangleF rectangle, IBorderElement borderElement)
Parameters
rectangle
borderElement
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
void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
path
gradientPath
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawCustomGradientRectangle(Rectangle rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
rectangle
path
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
rectangle
path
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
rectangle
path
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
rectangle
path
color
gradientColors
Color[]
penAlignment
penWidth
dashStyle
dashPattern
float[]
DrawEllipse(Rectangle, Color)
Draws an ellipse defined by a bounding rectangle and color.
DrawImage(Point, Image, bool)
Draws the specified Image object with the specified Point, Image and disable flag.
DrawImage(Rectangle, Image, ContentAlignment, bool)
Draws the specified Image object with the specified Rectangle, Image, ContentAlignment and disable flag.
Declaration
void DrawImage(Rectangle rectangle, Image image, ContentAlignment alignment, bool enabled)
Parameters
rectangle
image
alignment
enabled
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.
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.
DrawLine(Color, float, float, float, float)
Draws a line specified by color, initial x point, initial y point, final x and final y point.
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
DrawLine(Color, int, int, int, int)
Draws a line specified by color, initial x point, initial y point, final x and final y point.
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
void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)
Parameters
path
bounds
gradientColors
Color[]
penAlignment
penWidth
angle
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
void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)
Parameters
path
bounds
gradientColors
Color[]
penAlignment
penWidth
angle
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
void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPAttern)
Parameters
path
bounds
gradientColors
Color[]
penAlignment
penWidth
angle
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
void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)
Parameters
rectangle
gradientColors
Color[]
penAlignment
penWidth
angle
DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, float, float, DashStyle)
Draws a linear gradient rectangle specified by rectangle structure, color array, penalignment, penWidth, angle and DashStyle.
Declaration
void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)
Parameters
rectangle
gradientColors
Color[]
penAlignment
penWidth
angle
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
void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPattern)
Parameters
rectangle
gradientColors
Color[]
penAlignment
penWidth
angle
dashStyle
dashPattern
float[]
DrawPath(GraphicsPath, Color, PenAlignment, float)
Draws a path specified by GraphicsPath, color, pen alignment and pen width.
Declaration
void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth)
Parameters
path
color
penAlignment
penWidth
DrawPath(GraphicsPath, Color, PenAlignment, float, DashStyle)
Draws a path specified by GraphicsPath, color, pen alignment, pen width and DashStyle.
Declaration
void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
path
color
penAlignment
penWidth
dashStyle
DrawPath(GraphicsPath, Color, PenAlignment, float, DashStyle, float[])
Draws a path specified by GraphicsPath, color, pen alignment, pen width and DashStyle.
Declaration
void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
path
color
penAlignment
penWidth
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
void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
path
bounds
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
path
bounds
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPAttern)
Parameters
path
bounds
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawRadialGradientRectangle(Rectangle rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
rectangle
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Parameters
rectangle
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
rectangle
color
gradientColors
Color[]
penAlignment
penWidth
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
void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
rectangle
color
gradientColors
Color[]
penAlignment
penWidth
dashStyle
dashPattern
float[]
DrawRectangle(Rectangle, Color)
Draws a rectangle specified by a rectangle structure and a color.
DrawRectangle(Rectangle, Color, PenAlignment, float)
Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.
Declaration
void DrawRectangle(Rectangle rectangle, Color color, PenAlignment penAlignment, float penWidth)
Parameters
rectangle
color
penAlignment
penWidth
DrawRectangle(RectangleF, Color, PenAlignment, float)
Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.
Declaration
void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth)
Parameters
rectangle
color
penAlignment
penWidth
DrawRectangle(RectangleF, Color, PenAlignment, float, DashStyle)
Draws a rectangle specified by rectangle structure, color, PenAlignment, pen width and DashStyle.
Declaration
void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Parameters
rectangle
color
penAlignment
penWidth
dashStyle
DrawRectangle(RectangleF, Color, PenAlignment, float, DashStyle, float[])
Draws a rectangle specified by rectangle structure, color, PenAlignment, pen width and DashStyle.
Declaration
void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Parameters
rectangle
color
penAlignment
penWidth
dashStyle
dashPattern
float[]
DrawRoundRect(Rectangle, Color, float, int)
Draws a round rectangle specified by Rectangle structure, color, float borderWidth, and radius in pixels.
DrawString(TextParams, SizeF)
Declaration
void DrawString(TextParams textParams, SizeF measuredSize)
Parameters
textParams
measuredSize
DrawString(string, Rectangle, Font, Color, StringFormat, Orientation, bool)
Draws the specified text string with specified Rectangle, Font, Color, ContentAlignment, StringFormat and Orientation.
Declaration
void DrawString(string drawString, Rectangle rectangle, Font font, Color color, StringFormat stringFormat, Orientation orientation, bool flipText)
Parameters
drawString
rectangle
font
color
stringFormat
orientation
flipText
DrawString(string, RectangleF, Font, Color, StringFormat, Orientation, bool)
Declaration
void DrawString(string drawString, RectangleF rectangle, Font font, Color color, StringFormat stringFormat, Orientation orientation, bool flipText)
Parameters
drawString
rectangle
font
color
stringFormat
orientation
flipText
ExcludeClip(Rectangle)
Updates the clipping region of the current Graphics object to exclude the area specified by a Rectangle structure.
FillGellRectangle(Rectangle, Color[], float, float)
Fills the gel gradient rectangle specified by rectangle structure, color, color, and gradientPercentage.
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
void FillGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)
Parameters
rectangle
color1
color2
color3
color4
gradientPercentage
gradientPercentage2
FillGradientRectangle(Rectangle, Color, Color, Color, Color, GradientStyles, float)
Fills gradient rectangle specified by rectangle structure, color, color, color, color, GradientStyles, and angle.
FillGradientRectangle(Rectangle, Color, Color, float)
Fills the gradient rectangle specified by rectangle structure, color gradient array, float offset array, GradientStyles, angle, gradientPercentage, and gradientPercentage2.
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
void FillGradientRectangle(Rectangle rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Parameters
rectangle
colorStops
Color[]
colorOffsets
float[]
style
angle
gradientPercentage
gradientPercentage2
FillGradientRectangle(RectangleF, Color[], float[], GradientStyles, float, float, float)
Declaration
void FillGradientRectangle(RectangleF rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Parameters
rectangle
colorStops
Color[]
colorOffsets
float[]
style
angle
gradientPercentage
gradientPercentage2
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
void FillOfficeGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2, bool drawEllipse)
Parameters
rectangle
color1
color2
color3
color4
gradientPercentage
gradientPercentage2
drawEllipse
FillPath(Color, GraphicsPath)
Fills the specified graphics path with a solid color.
Declaration
void FillPath(Color color, GraphicsPath path)
Parameters
color
The Color to use for filling the path.
path
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
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
The angle of the gradient direction in degrees.
gradientPercentage
The first gradient percentage value.
gradientPercentage2
The second gradient percentage value.
rectangle
The bounding rectangle for the gradient.
path
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.
FillPolygon(Color, PointF[])
Fills the interior of a polygon defined by color and an array of points specified by Point structures.
FillPolygon(Color, Point[])
Fills the interior of a polygon defined by an array of points specified by Point structures and color.
FillRectangle(Rectangle, Color)
Fills the interior of a rectangle specified by the borderRectangle and using for color the second argument.
FillRectangle(RectangleF, Color)
Declaration
void FillRectangle(RectangleF BorderRectangle, Color color)
Parameters
BorderRectangle
color
FillTextureRectangle(Rectangle, Image)
Fills a rectangle using the image as texture.
FillTextureRectangle(Rectangle, Image, WrapMode)
Fills a rectangle using the image as texture.
FillTextureRectangle(RectangleF, Image)
Fills a rectangle using the image as texture.
Declaration
void FillTextureRectangle(RectangleF rectangle, Image texture)
Parameters
rectangle
The rectangle to fill.
texture
The image to use as a texture.
FillTextureRectangle(RectangleF, Image, WrapMode)
Fills a rectangle using the image as texture.
Declaration
void FillTextureRectangle(RectangleF rectangle, Image texture, WrapMode wrapMode)
Parameters
rectangle
The rectangle to fill.
texture
The image to use as a texture.
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
void FillVistaRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)
Parameters
rectangle
color1
color2
color3
color4
gradientPercentage
gradientPercentage2
MeasureString(string, Font, StringFormat)
Declaration
SizeF MeasureString(string text, Font font, StringFormat stringFormat)
Parameters
text
font
stringFormat
Returns
PushCurrentClippingPath(GraphicsPath)
Declaration
void PushCurrentClippingPath(GraphicsPath path)
Parameters
path
ResetTransform()
<span id="ctl00_ContentPlaceHolder1_src1_resRC_ctl01_LabelAbstract">Resets the
world transformation matrix of this Graphics to the identity matrix.
Declaration
void ResetTransform()
RestoreOpacity()
Restores the opacity of the current device context to the previous value.
Declaration
void RestoreOpacity()
RestoreSmoothingMode()
Restores the smoothing mode to the previous value.
Declaration
void RestoreSmoothingMode()
RestoreState(object)
Restores the graphics state to a previously saved state.
RotateTransform(float)
Rotates the local geometric transformation by the specified angle. This method prepends the rotation to the transformation.
Declaration
void RotateTransform(float angleInDegrees)
Parameters
angleInDegrees
SaveState()
Saves the current graphics state and returns a state object.
Declaration
object SaveState()
Returns
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.
TranslateTransform(float, float)
Translates the local geometric transformation of this TextureBrush object by the specified dimensions. This method prepends the translation to the transformation.
TranslateTransform(int, int)
Translates the local geometric transformation of this TextureBrush object by the specified dimensions. This method prepends the translation to the transformation.