Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
 /// <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);
 }
Exemplo n.º 5
0
        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));
            }
        }
Exemplo n.º 6
0
 /// <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);
 }
Exemplo n.º 7
0
        /// <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));
            }
        }
Exemplo n.º 8
0
 /// <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);
 }
Exemplo n.º 9
0
 /// <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);
 }
Exemplo n.º 10
0
        /// <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);
        }
Exemplo n.º 11
0
        /// <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);
        }
Exemplo n.º 12
0
        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);
        }
Exemplo n.º 13
0
 /// <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);
     }
 }
Exemplo n.º 14
0
 public void Restore(GraphicsState gstate)
 {
     RenderingObject.Restore(gstate);
 }
Exemplo n.º 15
0
 public GraphicsState Save()
 {
     return(RenderingObject.Save());
 }
Exemplo n.º 16
0
 public SizeF MeasureString(string text, Font font)
 {
     return(RenderingObject.MeasureString(text, font));
 }
Exemplo n.º 17
0
 public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat)
 {
     return(RenderingObject.MeasureString(text, font, layoutArea, stringFormat));
 }
Exemplo n.º 18
0
 public void FillPolygon(Brush brush, PointF[] points)
 {
     RenderingObject.FillPolygon(brush, points);
 }
Exemplo n.º 19
0
 public void FillRectangle(Brush brush, RectangleF rect)
 {
     RenderingObject.FillRectangle(brush, rect);
 }
Exemplo n.º 20
0
 public void FillRegion(Brush brush, Region region)
 {
     RenderingObject.FillRegion(brush, region);
 }
Exemplo n.º 21
0
 public void FillPath(Brush brush, GraphicsPath path, float angle, bool useBrushOffset, bool circularFill)
 {
     RenderingObject.FillPath(brush, path, angle, useBrushOffset, circularFill);
 }
Exemplo n.º 22
0
 public void BeginSelection(string hRef, string title)
 {
     RenderingObject.BeginSelection(hRef, title);
 }
Exemplo n.º 23
0
 public void SetClip(GraphicsPath path, CombineMode combineMode)
 {
     RenderingObject.SetClip(path, combineMode);
 }
Exemplo n.º 24
0
 public void ResetClip()
 {
     RenderingObject.ResetClip();
 }
Exemplo n.º 25
0
 public void SetClip(RectangleF rect)
 {
     RenderingObject.SetClip(rect);
 }
Exemplo n.º 26
0
 public void DrawEllipse(Pen pen, RectangleF rect)
 {
     RenderingObject.DrawEllipse(pen, rect);
 }
Exemplo n.º 27
0
 public void TranslateTransform(float dx, float dy)
 {
     RenderingObject.TranslateTransform(dx, dy);
 }
Exemplo n.º 28
0
 public void DrawLines(Pen pen, PointF[] points)
 {
     RenderingObject.DrawLines(pen, points);
 }
Exemplo n.º 29
0
 public void EndSelection()
 {
     RenderingObject.EndSelection();
 }
Exemplo n.º 30
0
 public void FillPath(Brush brush, GraphicsPath path)
 {
     RenderingObject.FillPath(brush, path);
 }