Interface IGraphics
Classes that implement IGraphics interface are capable of drawing on the computer screen. Classes that implement this interface can use different APIs to perform the actual drawing: GDI+, DirectX, etc.
Namespace: Telerik.WinControls.Paint
Assembly: Telerik.WinControls.dll
Syntax
public interface IGraphics
Properties
ClipRectangle
Gets the clipping rectangle; the rectangle which needs redrawing.
Declaration
Rectangle ClipRectangle { get; }
Property Value
System.Drawing.Rectangle
|
Opacity
Gets or sets the opacity level of the device context.
Declaration
double Opacity { get; }
Property Value
System.Double
|
UnderlayGraphics
Gets the current context device - graphics object.
Declaration
object UnderlayGraphics { get; }
Property Value
System.Object
|
Methods
ChangeOpacity(Double)
Changes the opacity level of the current device context.
Declaration
void ChangeOpacity(double opacity)
Parameters
System.Double
opacity
|
ChangeSmoothingMode(SmoothingMode)
Saves the current smothingMode, and changes the smoothingmode for the current device context.
Declaration
void ChangeSmoothingMode(SmoothingMode smoothingMode)
Parameters
System.Drawing.Drawing2D.SmoothingMode
smoothingMode
|
CreateBitmapMask(Color, Bitmap)
Creates a mask specified by color and bitmap.
Declaration
Bitmap CreateBitmapMask(Color maskColor, Bitmap bitmap)
Parameters
System.Drawing.Color
maskColor
|
System.Drawing.Bitmap
bitmap
|
Returns
System.Drawing.Bitmap
|
DrawBitmap(Image, Int32, Int32)
Draws a bitmap image specified by image object and position from the left-upper corner of the current device context.
Declaration
void DrawBitmap(Image image, int x, int y)
Parameters
System.Drawing.Image
image
|
System.Int32
x
|
System.Int32
y
|
DrawBitmap(Image, Int32, Int32, 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
void DrawBitmap(Image image, int x, int y, double opacity)
Parameters
System.Drawing.Image
image
|
System.Int32
x
|
System.Int32
y
|
System.Double
opacity
|
DrawBitmap(Image, Int32, Int32, Int32, Int32)
Draws a bitmap image specified by image object, position from the left-upper corner of the current device context and specified size.
Declaration
void DrawBitmap(Image image, int x, int y, int width, int height)
Parameters
System.Drawing.Image
image
|
System.Int32
x
|
System.Int32
y
|
System.Int32
width
|
System.Int32
height
|
DrawBitmap(Image, Int32, Int32, Int32, Int32, 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
void DrawBitmap(Image image, int x, int y, int width, int height, double opacity)
Parameters
System.Drawing.Image
image
|
System.Int32
x
|
System.Int32
y
|
System.Int32
width
|
System.Int32
height
|
System.Double
opacity
|
DrawBlurShadow(GraphicsPath, Rectangle, Single, Color)
Declaration
void DrawBlurShadow(GraphicsPath path, Rectangle r, float offset, Color color)
Parameters
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Rectangle
r
|
System.Single
offset
|
System.Drawing.Color
color
|
DrawBorder(RectangleF, IBorderElement)
Declaration
void DrawBorder(RectangleF rectangle, IBorderElement borderElement)
Parameters
System.Drawing.RectangleF
rectangle
|
IBorderElement
borderElement
|
DrawCustomGradientPath(GraphicsPath, GraphicsPath, Color, Color[], PenAlignment, Single)
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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Drawing2D.GraphicsPath
gradientPath
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawCustomGradientRectangle(Rectangle, GraphicsPath, Color, Color[], PenAlignment, Single)
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
System.Drawing.Rectangle
rectangle
|
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single)
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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single, 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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
DrawCustomGradientRectangle(RectangleF, GraphicsPath, Color, Color[], PenAlignment, Single, DashStyle, Single[])
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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Single[]
dashPattern
|
DrawEllipse(Rectangle, Color)
Draws an ellipse defined by a bounding rectangle and color.
Declaration
void DrawEllipse(Rectangle BorderRectangle, Color color)
Parameters
System.Drawing.Rectangle
BorderRectangle
|
System.Drawing.Color
color
|
DrawImage(Point, Image, Boolean)
Draws the specified Image object with the specified Point, Image and disable flag.
Declaration
void DrawImage(Point point, Image image, bool enabled)
Parameters
System.Drawing.Point
point
|
System.Drawing.Image
image
|
System.Boolean
enabled
|
DrawImage(Rectangle, Image, ContentAlignment, Boolean)
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
System.Drawing.Rectangle
rectangle
|
System.Drawing.Image
image
|
System.Drawing.ContentAlignment
alignment
|
System.Boolean
enabled
|
DrawLine(Color, DashStyle, Int32, Int32, Int32, Int32)
Draws a line specified by color, DashStyle, initial x point, initial y point, final x and final y point.
Declaration
void DrawLine(Color color, DashStyle dashStyle, int x1, int y1, int x2, int y2)
Parameters
System.Drawing.Color
color
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Int32
x1
|
System.Int32
y1
|
System.Int32
x2
|
System.Int32
y2
|
DrawLine(Color, DashStyle, Int32, Int32, Int32, Int32, Single)
Draws a line specified by color, DashStyle, initial x point, initial y point, final x final y point and width.
Declaration
void DrawLine(Color color, DashStyle dashStyle, int x1, int y1, int x2, int y2, float width)
Parameters
System.Drawing.Color
color
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Int32
x1
|
System.Int32
y1
|
System.Int32
x2
|
System.Int32
y2
|
System.Single
width
|
DrawLine(Color, Int32, Int32, Int32, Int32)
Draws a line specified by color, initial x point, initial y point, final x and final y point.
Declaration
void DrawLine(Color color, int x1, int y1, int x2, int y2)
Parameters
System.Drawing.Color
color
|
System.Int32
x1
|
System.Int32
y1
|
System.Int32
x2
|
System.Int32
y2
|
DrawLine(Color, Single, Single, Single, Single)
Draws a line specified by color, initial x point, initial y point, final x and final y point.
Declaration
void DrawLine(Color color, float x1, float y1, float x2, float y2)
Parameters
System.Drawing.Color
color
|
System.Single
x1
|
System.Single
y1
|
System.Single
x2
|
System.Single
y2
|
DrawLine(Color, Single, Single, Single, Single, Single)
Draws a line specified by color, initial x point, initial y point, final x, final y point and width
Declaration
void DrawLine(Color color, float x1, float y1, float x2, float y2, float width)
Parameters
System.Drawing.Color
color
|
System.Single
x1
|
System.Single
y1
|
System.Single
x2
|
System.Single
y2
|
System.Single
width
|
DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single)
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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.RectangleF
bounds
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Single
angle
|
DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single, 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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.RectangleF
bounds
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Single
angle
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
DrawLinearGradientPath(GraphicsPath, RectangleF, Color[], PenAlignment, Single, Single, DashStyle, Single[])
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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.RectangleF
bounds
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Single
angle
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Single[]
dashPAttern
|
DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single)
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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Single
angle
|
DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single, 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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Single
angle
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
DrawLinearGradientRectangle(RectangleF, Color[], PenAlignment, Single, Single, DashStyle, Single[])
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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Single
angle
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Single[]
dashPattern
|
DrawPath(GraphicsPath, Color, PenAlignment, Single)
Draws a path specified by GraphicsPath, color, pen alignment and pen width.
Declaration
void DrawPath(GraphicsPath path, Color color, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Color
color
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawPath(GraphicsPath, Color, PenAlignment, Single, 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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Color
color
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
DrawPath(GraphicsPath, Color, PenAlignment, Single, DashStyle, Single[])
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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Color
color
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Single[]
dashPattern
|
DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single)
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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Rectangle
bounds
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single, 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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Rectangle
bounds
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
DrawRadialGradientPath(GraphicsPath, Rectangle, Color, Color[], PenAlignment, Single, DashStyle, Single[])
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
System.Drawing.Drawing2D.GraphicsPath
path
|
System.Drawing.Rectangle
bounds
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Single[]
dashPAttern
|
DrawRadialGradientRectangle(Rectangle, Color, Color[], PenAlignment, Single)
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
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single)
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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single, 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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
DrawRadialGradientRectangle(RectangleF, Color, Color[], PenAlignment, Single, DashStyle, Single[])
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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Color[]
gradientColors
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Single[]
dashPattern
|
DrawRectangle(Rectangle, Color)
Draws a rectangle specified by a rectangle structure and a color.
Declaration
void DrawRectangle(Rectangle rectangle, Color color)
Parameters
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color
|
DrawRectangle(Rectangle, Color, PenAlignment, Single)
Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.
Declaration
void DrawRectangle(Rectangle rectangle, Color color, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawRectangle(RectangleF, Color, PenAlignment, Single)
Draws a rectangle specified by rectangle structure, color, PenAlignment and pen width.
Declaration
void DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, float penWidth)
Parameters
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
DrawRectangle(RectangleF, Color, PenAlignment, Single, 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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
DrawRectangle(RectangleF, Color, PenAlignment, Single, DashStyle, Single[])
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
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color
color
|
System.Drawing.Drawing2D.PenAlignment
penAlignment
|
System.Single
penWidth
|
System.Drawing.Drawing2D.DashStyle
dashStyle
|
System.Single[]
dashPattern
|
DrawRoundRect(Rectangle, Color, Single, Int32)
Draws a round rectangle specified by Rectangle structure, color, float borderWidth, and radius in pixels.
Declaration
void DrawRoundRect(Rectangle rectangle, Color color, float borderWidth, int radius)
Parameters
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color
|
System.Single
borderWidth
|
System.Int32
radius
|
DrawString(String, Rectangle, Font, Color, ContentAlignment, StringFormat, ShadowSettings, TextRenderingHint, Orientation, Boolean)
Obsolete. Use the overload without ContentAlignment parameter. ContentAlignment should be provided through the StringFormat parameter.
Declaration
[Obsolete("Use the overload without ContentAlignment parameter. ContentAlignment should be provided through the StringFormat parameter.")]
void DrawString(string drawString, Rectangle rectangle, Font font, Color color, ContentAlignment alignment, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText)
Parameters
System.String
drawString
|
System.Drawing.Rectangle
rectangle
|
System.Drawing.Font
font
|
System.Drawing.Color
color
|
System.Drawing.ContentAlignment
alignment
|
System.Drawing.StringFormat
stringFormat
|
ShadowSettings
shadow
|
System.Drawing.Text.TextRenderingHint
textRendering
|
System.Windows.Forms.Orientation
orientation
|
System.Boolean
flipText
|
DrawString(String, Rectangle, Font, Color, StringFormat, Orientation, Boolean)
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
System.String
drawString
|
System.Drawing.Rectangle
rectangle
|
System.Drawing.Font
font
|
System.Drawing.Color
color
|
System.Drawing.StringFormat
stringFormat
|
System.Windows.Forms.Orientation
orientation
|
System.Boolean
flipText
|
DrawString(String, RectangleF, Font, Color, ContentAlignment, StringFormat, ShadowSettings, TextRenderingHint, Orientation, Boolean)
Obsolete. Use the overload without ContentAlignment parameter. ContentAlignment should be provided through the StringFormat parameter.
Declaration
void DrawString(string drawString, RectangleF rectangle, Font font, Color color, ContentAlignment alignment, StringFormat stringFormat, ShadowSettings shadow, TextRenderingHint textRendering, Orientation orientation, bool flipText)
Parameters
System.String
drawString
|
System.Drawing.RectangleF
rectangle
|
System.Drawing.Font
font
|
System.Drawing.Color
color
|
System.Drawing.ContentAlignment
alignment
|
System.Drawing.StringFormat
stringFormat
|
ShadowSettings
shadow
|
System.Drawing.Text.TextRenderingHint
textRendering
|
System.Windows.Forms.Orientation
orientation
|
System.Boolean
flipText
|
DrawString(String, RectangleF, Font, Color, StringFormat, Orientation, Boolean)
Declaration
void DrawString(string drawString, RectangleF rectangle, Font font, Color color, StringFormat stringFormat, Orientation orientation, bool flipText)
Parameters
System.String
drawString
|
System.Drawing.RectangleF
rectangle
|
System.Drawing.Font
font
|
System.Drawing.Color
color
|
System.Drawing.StringFormat
stringFormat
|
System.Windows.Forms.Orientation
orientation
|
System.Boolean
flipText
|
DrawString(TextParams, SizeF)
Declaration
void DrawString(TextParams textParams, SizeF measuredSize)
Parameters
TextParams
textParams
|
System.Drawing.SizeF
measuredSize
|
ExcludeClip(Rectangle)
Updates the clipping region of the current Graphics object to exclude the area specified by a Rectangle structure.
Declaration
void ExcludeClip(Rectangle rectangle)
Parameters
System.Drawing.Rectangle
rectangle
|
FillGellRectangle(Rectangle, Color[], Single, Single)
Fills the gel gradient rectangle specified by rectangle structure, color, color, and gradientPercentage.
Declaration
void FillGellRectangle(Rectangle rectangle, Color[] colorStops, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color[]
colorStops
|
System.Single
gradientPercentage
|
System.Single
gradientPercentage2
|
FillGlassRectangle(Rectangle, Color, Color, Color, Color, Single, Single)
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
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color1
|
System.Drawing.Color
color2
|
System.Drawing.Color
color3
|
System.Drawing.Color
color4
|
System.Single
gradientPercentage
|
System.Single
gradientPercentage2
|
FillGradientRectangle(Rectangle, Color, Color, Color, Color, GradientStyles, Single)
Fills gradient rectangle specified by rectangle structure, color, color, color, color, GradientStyles, and angle.
Declaration
void FillGradientRectangle(Rectangle rectangle, Color color1, Color color2, Color color3, Color color4, GradientStyles style, float angle)
Parameters
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color1
|
System.Drawing.Color
color2
|
System.Drawing.Color
color3
|
System.Drawing.Color
color4
|
GradientStyles
style
|
System.Single
angle
|
FillGradientRectangle(Rectangle, Color, Color, Single)
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 color1, Color color2, float angle)
Parameters
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color1
|
System.Drawing.Color
color2
|
System.Single
angle
|
FillGradientRectangle(Rectangle, Color[], Single[], GradientStyles, Single, Single, Single)
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
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color[]
colorStops
|
System.Single[]
colorOffsets
|
GradientStyles
style
|
System.Single
angle
|
System.Single
gradientPercentage
|
System.Single
gradientPercentage2
|
FillGradientRectangle(RectangleF, Color[], Single[], GradientStyles, Single, Single, Single)
Declaration
void FillGradientRectangle(RectangleF rectangle, Color[] colorStops, float[] colorOffsets, GradientStyles style, float angle, float gradientPercentage, float gradientPercentage2)
Parameters
System.Drawing.RectangleF
rectangle
|
System.Drawing.Color[]
colorStops
|
System.Single[]
colorOffsets
|
GradientStyles
style
|
System.Single
angle
|
System.Single
gradientPercentage
|
System.Single
gradientPercentage2
|
FillOfficeGlassRectangle(Rectangle, Color, Color, Color, Color, Single, Single, Boolean)
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
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color1
|
System.Drawing.Color
color2
|
System.Drawing.Color
color3
|
System.Drawing.Color
color4
|
System.Single
gradientPercentage
|
System.Single
gradientPercentage2
|
System.Boolean
drawEllipse
|
FillPath(Color, GraphicsPath)
Declaration
void FillPath(Color color, GraphicsPath path)
Parameters
System.Drawing.Color
color
|
System.Drawing.Drawing2D.GraphicsPath
path
|
FillPath(Color[], Single[], Single, Single, Single, Rectangle, GraphicsPath)
Declaration
void FillPath(Color[] colorStops, float[] colorOffsets, float angle, float gradientPercentage, float gradientPercentage2, Rectangle rectangle, GraphicsPath path)
Parameters
System.Drawing.Color[]
colorStops
|
System.Single[]
colorOffsets
|
System.Single
angle
|
System.Single
gradientPercentage
|
System.Single
gradientPercentage2
|
System.Drawing.Rectangle
rectangle
|
System.Drawing.Drawing2D.GraphicsPath
path
|
FillPolygon(Brush, PointF[])
Fills the interior of a polygon defined by brush and an array of points specified by Point structures.
Declaration
void FillPolygon(Brush brush, PointF[] points)
Parameters
System.Drawing.Brush
brush
|
System.Drawing.PointF[]
points
|
FillPolygon(Color, Point[])
Fills the interior of a polygon defined by an array of points specified by Point structures and color.
Declaration
void FillPolygon(Color color, Point[] points)
Parameters
System.Drawing.Color
color
|
System.Drawing.Point[]
points
|
FillPolygon(Color, PointF[])
Fills the interior of a polygon defined by color and an array of points specified by Point structures.
Declaration
void FillPolygon(Color color, PointF[] points)
Parameters
System.Drawing.Color
color
|
System.Drawing.PointF[]
points
|
FillRectangle(Rectangle, Color)
Fills the interior of a rectangle specified by the borderRectangle and using for color the second argument.
Declaration
void FillRectangle(Rectangle BorderRectangle, Color color)
Parameters
System.Drawing.Rectangle
BorderRectangle
|
System.Drawing.Color
color
|
FillRectangle(RectangleF, Color)
Declaration
void FillRectangle(RectangleF BorderRectangle, Color color)
Parameters
System.Drawing.RectangleF
BorderRectangle
|
System.Drawing.Color
color
|
FillTextureRectangle(Rectangle, Image)
Fills a rectangle using the image as texture.
Declaration
void FillTextureRectangle(Rectangle rectangle, Image texture)
Parameters
System.Drawing.Rectangle
rectangle
The rectangle to fill. |
System.Drawing.Image
texture
The image to use as a texture. |
FillTextureRectangle(Rectangle, Image, WrapMode)
Fills a rectangle using the image as texture.
Declaration
void FillTextureRectangle(Rectangle rectangle, Image texture, WrapMode wrapMode)
Parameters
System.Drawing.Rectangle
rectangle
The rectangle to fill. |
System.Drawing.Image
texture
The image to use as a texture. |
System.Drawing.Drawing2D.WrapMode
wrapMode
Defines the way the image is populated in the rectangle |
FillTextureRectangle(RectangleF, Image)
Fills a rectangle using the image as texture.
Declaration
void FillTextureRectangle(RectangleF rectangle, Image texture)
Parameters
System.Drawing.RectangleF
rectangle
The rectangle to fill. |
System.Drawing.Image
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
System.Drawing.RectangleF
rectangle
The rectangle to fill. |
System.Drawing.Image
texture
The image to use as a texture. |
System.Drawing.Drawing2D.WrapMode
wrapMode
Defines the way the image is populated in the rectangle |
FillVistaRectangle(Rectangle, Color, Color, Color, Color, Single, Single)
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
System.Drawing.Rectangle
rectangle
|
System.Drawing.Color
color1
|
System.Drawing.Color
color2
|
System.Drawing.Color
color3
|
System.Drawing.Color
color4
|
System.Single
gradientPercentage
|
System.Single
gradientPercentage2
|
MeasureString(String, Font, StringFormat)
Declaration
SizeF MeasureString(string text, Font font, StringFormat stringFormat)
Parameters
System.String
text
|
System.Drawing.Font
font
|
System.Drawing.StringFormat
stringFormat
|
Returns
System.Drawing.SizeF
|
PopCurrentClippingPath()
Declaration
GraphicsPath PopCurrentClippingPath()
Returns
System.Drawing.Drawing2D.GraphicsPath
|
PushCurrentClippingPath(GraphicsPath)
Declaration
void PushCurrentClippingPath(GraphicsPath path)
Parameters
System.Drawing.Drawing2D.GraphicsPath
path
|
ResetTransform()
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)
Declaration
void RestoreState(object state)
Parameters
System.Object
state
|
RotateTransform(Single)
Rotates the local geometric transformation by the specified angle. This method prepends the rotation to the transformation.
Declaration
void RotateTransform(float angleInDegrees)
Parameters
System.Single
angleInDegrees
|
SaveState()
Declaration
object SaveState()
Returns
System.Object
|
ScaleTransform(SizeF)
Scales the world transformation matrix by the specified amount.
Declaration
void ScaleTransform(SizeF scale)
Parameters
System.Drawing.SizeF
scale
|
TranslateTransform(Int32, Int32)
Translates the local geometric transformation of this TextureBrush object by the specified dimensions. This method prepends the translation to the transformation.
Declaration
void TranslateTransform(int offsetX, int offsetY)
Parameters
System.Int32
offsetX
|
System.Int32
offsetY
|
TranslateTransform(Single, Single)
Translates the local geometric transformation of this TextureBrush object by the specified dimensions. This method prepends the translation to the transformation.
Declaration
void TranslateTransform(float offsetX, float offsetY)
Parameters
System.Single
offsetX
|
System.Single
offsetY
|