RadGdiGraphics
Provides GDI+ graphics implementation for RadControls with optimized drawing operations and text rendering.
Definition
Namespace:Telerik.WinControls.Paint
Assembly:Telerik.WinControls.dll
Syntax:
public class RadGdiGraphics : IGraphics, IDisposable
Inheritance: objectRadGdiGraphics
Implements:
Constructors
Initializes a new instance of RadGdiGraphics class using GDI graphics context.
Fields
public static readonly int GdiMaximumDrawRectangleLimit
public static readonly int GdiMinimumDrawRectangleLimit
public static readonly int GdiStringLengthLimit
Properties
Gets the clipping rectangle; the rectangle which needs redrawing.
public Rectangle ClipRectangle { get; set; }
Implements:
Gets or sets current GDI+ graphics context.
public Graphics Graphics { get; set; }
public static Graphics MeasurementGraphics { get; }
Gets or sets the opacity level of the device context.
public double Opacity { get; }
Implements:
Gets the current context device - graphics object.
public object UnderlayGraphics { get; }
Implements:
Methods
protected ~RadGdiGraphics()
Changes the opacity level of the current device context.
Saves the current smothingMode, and changes the smoothingmode for the current device context.
public virtual void ChangeSmoothingMode(SmoothingMode smoothingMode)
Implements:
Disposes the object.
public void Destroy()
Disposes the GDI+ graphics context.
public void Dispose()
Implements:
Draws a bitmap image specified by image object, position from the left-upper corner of the current device context, opacity and specified size.
Draws a blur shadow effect for the specified graphics path.
public void DrawBlurShadow(GraphicsPath path, Rectangle r, float offset, Color color)
The GraphicsPath for which to draw the shadow.
rRectangleThe bounding rectangle for the shadow effect.
offsetfloatThe offset distance of the shadow from the original path.
colorColorThe Color of the shadow.
Implements:
Draws a border specified by rectangle structure, IBorderElement.
public virtual void DrawBorder(RectangleF rectangle, IBorderElement borderElement)
Implements:
public void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
public void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Draws a custom gradient path specified by GraphicsPath, GraphicsPath for the gradient, color, gradient color array, penalignment and penwidth.
public void DrawCustomGradientPath(GraphicsPath path, GraphicsPath gradientPath, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Implements:
Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment and penwidth.
public virtual void DrawCustomGradientRectangle(Rectangle rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Implements:
Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment, penwidth and DashStyle.
public virtual void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Implements:
Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment, penwidth and DashStyle.
public virtual void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Implements:
Draws a custom gradient rectangle specified by rectangle structure, graphicsPath, color, color array for the gradient effect, penalignment and penwidth.
public virtual void DrawCustomGradientRectangle(RectangleF rectangle, GraphicsPath path, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Implements:
Draws the specified Image object with the specified Rectangle, Image, ContentAlignment and disable flag.
public virtual void DrawImage(Rectangle rectangle, Image image, ContentAlignment alignment, bool enabled)
Implements:
Draws a line specified by color, DashStyle, initial x point, initial y point, final x final y point and width.
Draws a linear gradient path specified by GraphicsPath, bounding Rectangle, color gradient array, penalignment, penwidth, angle and DashStyle.
public void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPattern)
Implements:
Draws a linear gradient path specified by GraphicsPath, bounding Rectangle, color gradient array, penalignment, penwidth, angle and DashStyle.
public void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)
Implements:
Draws a linear gradient path specified by GraphicsPath, bounding Rectangle, color gradient array, penalignment, penwidth and angle.
public void DrawLinearGradientPath(GraphicsPath path, RectangleF bounds, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)
Implements:
Draws a linear gradient rectangle specified by rectangle structure, color array, penalignment, penWidth, angle and DashStyle.
public virtual void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle, float[] dashPattern)
Implements:
Draws a linear gradient rectangle specified by rectangle structure, color array, penalignment, penWidth, angle and DashStyle.
public virtual void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle, DashStyle dashStyle)
Implements:
Draws a linear gradient rectangle specified by rectangle structure, color array, penalignment, penWidth and angle.
public virtual void DrawLinearGradientRectangle(RectangleF rectangle, Color[] gradientColors, PenAlignment penAlignment, float penWidth, float angle)
Implements:
Draws a path specified by GraphicsPath, color, pen alignment, pen width and DashStyle.
public virtual void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Implements:
Draws a path specified by GraphicsPath, color, pen alignment, pen width and DashStyle.
public virtual void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Implements:
Draws a path specified by GraphicsPath, color, pen alignment and pen width.
public virtual void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth)
Implements:
Draws a redial gradient path specified by Graphics path, bounding rectangle, color, color gradient array, pen alignment and pen width.
public void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Implements:
Draws a redial gradient path specified by Graphics path, bounding rectangle, color, color gradient array, pen alignment and pen width.
public void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Implements:
Draws a redial gradient path specified by Graphicspath, bounding rectangle, color, color gradient array, penalignment and penwidth.
public void DrawRadialGradientPath(GraphicsPath path, Rectangle bounds, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Implements:
Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment and penWidth.
public virtual void DrawRadialGradientRectangle(Rectangle rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Implements:
Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment, penWidth and DashStyle.
public virtual void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Implements:
Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment, penWidth and DashStyle.
public virtual void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Implements:
Draws a radial gradient rectangle specified by rectangle structure, color, color array for gradient effect, penalignment and penWidth.
public virtual void DrawRadialGradientRectangle(RectangleF rectangle, Color color, Color[] gradientColors, PenAlignment penAlignment, float penWidth)
Implements:
Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.
public virtual void DrawRectangle(Rectangle rectangle, Color color, PenAlignment penAlignment, float penWidth)
Implements:
Draws a rectangle specified by rectangle structure, color, PenAlignment, pen width and DashStyle.
public virtual void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle, float[] dashPattern)
Implements:
Draws a rectangle specified by rectangle structure, color, PenAlignment, pen width and DashStyle.
public virtual void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth, DashStyle dashStyle)
Implements:
Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.
public virtual void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth)
Implements:
DrawString(string, Rectangle, Font, Color, StringFormat, Orientation, bool, CharacterRange[], Color)
public virtual void DrawString(string s, Rectangle rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText, CharacterRange[] highlightRanges, Color highlightColor)
Draws the specified text string with specified Rectangle, Font, Color, ContentAlignment, StringFormat and Orientation.
public virtual void DrawString(string s, Rectangle rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText)
Implements:
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)
public virtual void DrawString(string s, Rectangle rectangle, Font font, Color foreColor, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText)
public virtual void DrawString(string s, RectangleF rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText, CharacterRange[] highlightRanges, Color highlightColor)
public virtual void DrawString(string s, RectangleF rectangle, Font font, Color foreColor, StringFormat stringFormat, Orientation orientation, bool flipText)
Implements:
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)
public virtual void DrawString(string s, RectangleF rectangle, Font font, Color foreColor, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText)
public virtual void DrawString(TextParams textParams, SizeF measuredSize)
Implements:
Updates the clipping region of the current Graphics object to exclude the area specified by a Rectangle structure.
Fills the gel gradient rectangle specified by rectangle structure, color, color, and gradientPercentage.
Fills the glass gradient rectangle specified by rectangle structure, color, color, color, color, and gradient percentage.
public virtual void FillGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2)
Implements:
public virtual void FillGradientPath(GraphicsPath path, RectangleF rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Fills gradient rectangle specified by rectangle structure, color, color, color, color, GradientStyles, and angle.
Fills the gradient rectangle specified by rectangle structure, color gradient array, float offset array, GradientStyles, angle, gradientPercentage, and gradientPercentage2.
Fills the gradient rectangle specified by rectangle structure, color gradient array, float offset array, GradientStyles, angle, gradientPercentage, and gradientPercentage2.
public virtual void FillGradientRectangle(Rectangle rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Implements:
public virtual void FillGradientRectangle(RectangleF rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Implements:
Fills the office glass gradient rectangle specified by rectangle structure, color, color, color, color, and gradientPercentage and gradientPercentage2.
public void FillOfficeGlassRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, float gradientPercentage, float gradientPercentage2, bool drawEllipse)
Implements:
Fills the specified graphics path with a solid color.
public void FillPath(Color color, GraphicsPath path)
The Color to use for filling the path.
pathGraphicsPathThe GraphicsPath to fill.
Implements:
Fills the specified graphics path with a gradient using the provided color stops and offsets.
public void FillPath(Color[] colorStops, float[] colorOffsets, float angle, float gradientPercentage, float gradientPercentage2, Rectangle rectangle, GraphicsPath path)
An array of colors that define the gradient.
colorOffsetsfloat[]An array of float values that specify the positions of the color stops along the gradient.
anglefloatThe angle of the gradient direction in degrees.
gradientPercentagefloatThe first gradient percentage value.
gradientPercentage2floatThe second gradient percentage value.
rectangleRectangleThe bounding rectangle for the gradient.
pathGraphicsPathThe GraphicsPath to fill with the gradient.
Implements:
public virtual void FillRectangle(RectangleF rectangle, Color color)
Implements:
Fills a rectangle using the image as texture.
Fills a rectangle using the image as texture.
public void FillTextureRectangle(RectangleF rectangle, Image texture, WrapMode wrapMode)
The rectangle to fill.
textureImageThe image to use as a texture.
wrapModeWrapModeDefines the way the image is populated in the rectangle
Implements:
Fills a rectangle using the image as texture.
public void FillTextureRectangle(RectangleF rectangle, Image texture)
The rectangle to fill.
textureImageThe image to use as a texture.
Implements:
Fills the vista gradient rectangle specified by rectangle structure, color, color, color, color, gradient percentage, and gradientPercentage2.
public static ImageAttributes GetOpacityAttributes(float opacity)
public GraphicsPath GetRoundedRect(RectangleF baseRect, float radius)
public SizeF MeasureString(string text, Font font, int availableWidth, StringFormat stringFormat)
public SizeF MeasureString(string text, Font font, StringFormat stringFormat)
Implements:
Resets the world transformation matrix of this Graphics to the identity matrix.
public void ResetTransform()
Implements:
Restores the opacity of the current device context to the previous value.
public void RestoreOpacity()
Implements:
Restores the smoothing mode to the previous value.
public virtual void RestoreSmoothingMode()
Implements:
Rotates the local geometric transformation by the specified angle. This method prepends the rotation to the transformation.
Saves the current graphics state and returns a state object.
public object SaveState()
An object representing the saved graphics state, which can be passed to RestoreState(object) to restore the graphics context.
Implements:
Scales the world transformation matrix by the specified amount.