/// <summary> /// Draws an ellipse defined by a bounding rectangle specified by /// a pair of coordinates, a height, and a width. /// </summary> /// <param name="pen">Pen object that determines the color, width, and style of the ellipse.</param> /// <param name="x">x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.</param> /// <param name="y">y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.</param> /// <param name="width">Width of the bounding rectangle that defines the ellipse.</param> /// <param name="height">Height of the bounding rectangle that defines the ellipse.</param> internal void DrawEllipse( Pen pen, float x, float y, float width, float height ) { RenderingObject.DrawEllipse(pen, x, y, width, height); }
/// <summary> /// Draws a rectangle specified by a coordinate pair, a width, and a height. /// </summary> /// <param name="pen">Pen object that determines the color, width, and style of the rectangle.</param> /// <param name="x">x-coordinate of the upper-left corner of the rectangle to draw.</param> /// <param name="y">y-coordinate of the upper-left corner of the rectangle to draw.</param> /// <param name="width">Width of the rectangle to draw.</param> /// <param name="height">Height of the rectangle to draw.</param> internal void DrawRectangle( Pen pen, int x, int y, int width, int height ) { RenderingObject.DrawRectangle(pen, x, y, width, height); }
/// <summary> /// Draws a line connecting the two points specified by coordinate pairs. /// </summary> /// <param name="pen">Pen object that determines the color, width, and style of the line.</param> /// <param name="x1">x-coordinate of the first point.</param> /// <param name="y1">y-coordinate of the first point.</param> /// <param name="x2">x-coordinate of the second point.</param> /// <param name="y2">y-coordinate of the second point.</param> internal void DrawLine( Pen pen, float x1, float y1, float x2, float y2 ) { RenderingObject.DrawLine(pen, x1, y1, x2, y2); }
/// <summary> /// Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height. /// </summary> /// <param name="brush">Brush object that determines the characteristics of the fill.</param> /// <param name="x">x-coordinate of the upper-left corner of the rectangle to fill.</param> /// <param name="y">y-coordinate of the upper-left corner of the rectangle to fill.</param> /// <param name="width">Width of the rectangle to fill.</param> /// <param name="height">Height of the rectangle to fill.</param> internal void FillRectangle( Brush brush, float x, float y, float width, float height ) { RenderingObject.FillRectangle(brush, x, y, width, height); }
internal void StartHotRegion(DataPoint point, bool labelRegion) { string empty = string.Empty; string text = labelRegion ? point.LabelToolTip : point.ToolTip; empty = (labelRegion ? point.LabelHref : point.Href); if (empty.Length > 0 || text.Length > 0) { RenderingObject.BeginSelection(point.ReplaceKeywords(empty), point.ReplaceKeywords(text)); } }
/// <summary> /// Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, and a height and two radial lines. /// </summary> /// <param name="pen">Pen object that determines the color, width, and style of the pie shape.</param> /// <param name="x">x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.</param> /// <param name="y">y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.</param> /// <param name="width">Width of the bounding rectangle that defines the ellipse from which the pie shape comes.</param> /// <param name="height">Height of the bounding rectangle that defines the ellipse from which the pie shape comes.</param> /// <param name="startAngle">Angle measured in degrees clockwise from the x-axis to the first side of the pie shape.</param> /// <param name="sweepAngle">Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.</param> internal void DrawPie( Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle ) { RenderingObject.DrawPie(pen, x, y, width, height, startAngle, sweepAngle); }
/// <summary> /// This method starts SVG Selection mode /// </summary> /// <param name="point">Data Point which properties are used for SVG selection</param> /// <param name="labelRegion">Indicates if point label region is processed.</param> internal void StartHotRegion(DataPoint point, bool labelRegion) { string hRef = string.Empty; string tooltip = (labelRegion) ? point.LabelToolTip : point.ToolTip; if (hRef.Length > 0 || tooltip.Length > 0) { RenderingObject.BeginSelection( point.ReplaceKeywords(hRef), point.ReplaceKeywords(tooltip)); } }
/// <summary> /// Fills the interior of a pie section defined by an ellipse /// specified by a pair of coordinates, a width, and a height /// and two radial lines. /// </summary> /// <param name="brush">Brush object that determines the characteristics of the fill.</param> /// <param name="x">x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.</param> /// <param name="y">y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.</param> /// <param name="width">Width of the bounding rectangle that defines the ellipse from which the pie section comes.</param> /// <param name="height">Height of the bounding rectangle that defines the ellipse from which the pie section comes.</param> /// <param name="startAngle">Angle in degrees measured clockwise from the x-axis to the first side of the pie section.</param> /// <param name="sweepAngle">Angle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.</param> internal void FillPie( Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle ) { RenderingObject.FillPie(brush, x, y, width, height, startAngle, sweepAngle); }
/// <summary> /// Draws the specified portion of the specified Image object at the specified location and with the specified size. /// </summary> /// <param name="image">Image object to draw.</param> /// <param name="destRect">Rectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.</param> /// <param name="srcX">x-coordinate of the upper-left corner of the portion of the source image to draw.</param> /// <param name="srcY">y-coordinate of the upper-left corner of the portion of the source image to draw.</param> /// <param name="srcWidth">Width of the portion of the source image to draw.</param> /// <param name="srcHeight">Height of the portion of the source image to draw.</param> /// <param name="srcUnit">Member of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.</param> /// <param name="imageAttrs">ImageAttributes object that specifies recoloring and gamma information for the image object.</param> internal void DrawImage( System.Drawing.Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs ) { RenderingObject.DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttrs); }
/// <summary> /// Draws a GraphicsPath object. /// </summary> /// <param name="pen">Pen object that determines the color, width, and style of the path.</param> /// <param name="path">GraphicsPath object to draw.</param> internal void DrawPath( Pen pen, GraphicsPath path ) { // Check if path is empty if (path == null || path.PointCount == 0) { return; } RenderingObject.DrawPath(pen, path); }
/// <summary> /// Fills the interior of a GraphicsPath object. /// </summary> /// <param name="brush">Brush object that determines the characteristics of the fill.</param> /// <param name="path">GraphicsPath object that represents the path to fill.</param> internal void FillPath( Brush brush, GraphicsPath path ) { // Check if path is empty if (path == null || path.PointCount == 0) { return; } RenderingObject.FillPath(brush, path); }
public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension) { ChartGraphics chartGraphics = this as ChartGraphics; if (chartGraphics == null || !chartGraphics.IsMetafile) { RenderingObject.DrawCurve(pen, points, offset, numberOfSegments, tension); return; } PointF[] array = null; if (offset == 0 && numberOfSegments == points.Length - 1) { RenderingObject.DrawCurve(pen, points, offset, numberOfSegments, tension); return; } if (offset == 0 && numberOfSegments < points.Length - 1) { array = new PointF[numberOfSegments + 2]; for (int i = 0; i < numberOfSegments + 2; i++) { array[i] = points[i]; } } else if (offset > 0 && offset + numberOfSegments == points.Length - 1) { array = new PointF[numberOfSegments + 2]; for (int j = 0; j < numberOfSegments + 2; j++) { array[j] = points[offset + j - 1]; } offset = 1; } else if (offset > 0 && offset + numberOfSegments < points.Length - 1) { array = new PointF[numberOfSegments + 3]; for (int k = 0; k < numberOfSegments + 3; k++) { array[k] = points[offset + k - 1]; } offset = 1; } RenderingObject.DrawCurve(pen, array, offset, numberOfSegments, tension); }
/// <summary> /// Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting properties of the specified StringFormat object. /// </summary> /// <param name="s">String to draw.</param> /// <param name="font">Font object that defines the text format of the string.</param> /// <param name="brush">Brush object that determines the color and texture of the drawn text.</param> /// <param name="layoutRectangle">RectangleF structure that specifies the location of the drawn text.</param> /// <param name="format">StringFormat object that specifies formatting properties, such as line spacing and alignment, that are applied to the drawn text.</param> internal void DrawString( string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format ) { using (StringFormat fmt = (StringFormat)format.Clone()) { if (IsRightToLeft) { fmt.FormatFlags |= StringFormatFlags.DirectionRightToLeft; } if (!IsTextClipped && (fmt.FormatFlags & StringFormatFlags.NoClip) != StringFormatFlags.NoClip) { fmt.FormatFlags |= StringFormatFlags.NoClip; } RenderingObject.DrawString(s, font, brush, layoutRectangle, fmt); } }
public void Restore(GraphicsState gstate) { RenderingObject.Restore(gstate); }
public GraphicsState Save() { return(RenderingObject.Save()); }
public SizeF MeasureString(string text, Font font) { return(RenderingObject.MeasureString(text, font)); }
public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat) { return(RenderingObject.MeasureString(text, font, layoutArea, stringFormat)); }
public void FillPolygon(Brush brush, PointF[] points) { RenderingObject.FillPolygon(brush, points); }
public void FillRectangle(Brush brush, RectangleF rect) { RenderingObject.FillRectangle(brush, rect); }
public void FillRegion(Brush brush, Region region) { RenderingObject.FillRegion(brush, region); }
public void FillPath(Brush brush, GraphicsPath path, float angle, bool useBrushOffset, bool circularFill) { RenderingObject.FillPath(brush, path, angle, useBrushOffset, circularFill); }
public void BeginSelection(string hRef, string title) { RenderingObject.BeginSelection(hRef, title); }
public void SetClip(GraphicsPath path, CombineMode combineMode) { RenderingObject.SetClip(path, combineMode); }
public void ResetClip() { RenderingObject.ResetClip(); }
public void SetClip(RectangleF rect) { RenderingObject.SetClip(rect); }
public void DrawEllipse(Pen pen, RectangleF rect) { RenderingObject.DrawEllipse(pen, rect); }
public void TranslateTransform(float dx, float dy) { RenderingObject.TranslateTransform(dx, dy); }
public void DrawLines(Pen pen, PointF[] points) { RenderingObject.DrawLines(pen, points); }
public void EndSelection() { RenderingObject.EndSelection(); }
public void FillPath(Brush brush, GraphicsPath path) { RenderingObject.FillPath(brush, path); }