// ----- DrawLines ----------------------------------------------------------------------------

    public void DrawLines(XPen pen, PointF[] points)
    {
      if (this.gfx != null)
        this.gfx.DrawLines(pen.RealizeGdiPen(), points);

      if (this.pdfPage != null)
        this.pdfPage.PageContent.DrawLines(pen, points);
    }
    // ----- DrawLine -----------------------------------------------------------------------------

    public void DrawLine(XPen pen, float x1, float y1, float x2, float y2)
    {
      if (this.gfx != null)
        this.gfx.DrawLine(pen.RealizeGdiPen(), x1, y1, x2, y2);

      if (this.pdfPage != null)
        this.pdfPage.PageContent.DrawLines(pen, new PointF[2]{new PointF(x1, y1), new PointF(x2, y2)});
    }
    // ----- DrawRectangle ------------------------------------------------------------------------

    public void DrawRectangle(XPen pen, XSolidBrush brush, float x, float y, float width, float height)
    {
      if (this.gfx != null)
      {
        this.gfx.FillRectangle(brush.RealizeGdiBrush(), x, y, width, height);
        this.gfx.DrawRectangle(pen.RealizeGdiPen(), x, y, width, height);
      }
      if (this.pdfPage != null)
        this.pdfPage.PageContent.DrawRectangle(pen, brush, x, y, width, height);
    }
Ejemplo n.º 4
0
        // ----- DrawRectangle ------------------------------------------------------------------------

        public void DrawRectangle(XPen pen, XSolidBrush brush, float x, float y, float width, float height)
        {
            if (this.gfx != null)
            {
                this.gfx.FillRectangle(brush.RealizeGdiBrush(), x, y, width, height);
                this.gfx.DrawRectangle(pen.RealizeGdiPen(), x, y, width, height);
            }
            if (this.pdfPage != null)
            {
                this.pdfPage.PageContent.DrawRectangle(pen, brush, x, y, width, height);
            }
        }
Ejemplo n.º 5
0
        // ----- DrawLines ----------------------------------------------------------------------------

        public void DrawLines(XPen pen, PointF[] points)
        {
            if (this.gfx != null)
            {
                this.gfx.DrawLines(pen.RealizeGdiPen(), points);
            }

            if (this.pdfPage != null)
            {
                this.pdfPage.PageContent.DrawLines(pen, points);
            }
        }
Ejemplo n.º 6
0
        // ----- DrawEllipse --------------------------------------------------------------------------

        //public void DrawEllipse(XPen pen, Rectangle rect);
        //public void DrawEllipse(XPen pen, RectangleF rect);
        //public void DrawEllipse(XPen pen, int x, int y, int width, int height);
        //public void DrawEllipse(XPen pen, float x, float y, float width, float height);

        // ----- DrawPolygon --------------------------------------------------------------------------

        //public void DrawPolygon(XPen pen, Point[] points);
        //public void DrawPolygon(XPen pen, PointF[] points);

        // ----- DrawPath -----------------------------------------------------------------------------

        public void DrawPath(XPen pen, XSolidBrush brush, XGraphicsPath path)
        {
            if (this.gfx != null)
            {
                this.gfx.FillPath(brush.RealizeGdiBrush(), path.RealizeGdiPath());
                this.gfx.DrawPath(pen.RealizeGdiPen(), path.RealizeGdiPath());
            }
            if (this.pdfPage != null)
            {
                this.pdfPage.PageContent.DrawPath(pen, brush, path);
            }
        }
Ejemplo n.º 7
0
        // ----- DrawLine -----------------------------------------------------------------------------

        public void DrawLine(XPen pen, float x1, float y1, float x2, float y2)
        {
            if (this.gfx != null)
            {
                this.gfx.DrawLine(pen.RealizeGdiPen(), x1, y1, x2, y2);
            }

            if (this.pdfPage != null)
            {
                this.pdfPage.PageContent.DrawLines(pen, new PointF[2] {
                    new PointF(x1, y1), new PointF(x2, y2)
                });
            }
        }
Ejemplo n.º 8
0
        // ----- DrawRectangles -----------------------------------------------------------------------

        //public void DrawRectangles(XPen pen, XSolidBrush brush, Rectangle[] rects)
        //{
        //  if (this.gfx != null)
        //  {
        //    this.gfx.FillRectangles(brush.RealizeGdiBrush(), rects);
        //    this.gfx.DrawRectangles(pen.RealizeGdiPen(), rects);
        //  }
        //  if (this.pdfPage != null)
        //  {
        //    int count = rects.Length;
        //    for (int idx = 0; idx < count; idx++)
        //    {
        //      Rectangle rect = rects[idx];
        //      this.pdfPage.PageContent.DrawRectangle(pen, brush, rect.X, rect.Y, rect.Width, rect.Height);
        //    }
        //  }
        //}

        public void DrawRectangles(XPen pen, XSolidBrush brush, RectangleF[] rects)
        {
            if (this.gfx != null)
            {
                this.gfx.FillRectangles(brush.RealizeGdiBrush(), rects);
                this.gfx.DrawRectangles(pen.RealizeGdiPen(), rects);
            }
            if (this.pdfPage != null)
            {
                int count = rects.Length;
                for (int idx = 0; idx < count; idx++)
                {
                    RectangleF rect = rects[idx];
                    this.pdfPage.PageContent.DrawRectangle(pen, brush, rect.X, rect.Y, rect.Width, rect.Height);
                }
            }
        }
    // ----- DrawEllipse --------------------------------------------------------------------------

    //public void DrawEllipse(XPen pen, Rectangle rect);
    //public void DrawEllipse(XPen pen, RectangleF rect);
    //public void DrawEllipse(XPen pen, int x, int y, int width, int height);
    //public void DrawEllipse(XPen pen, float x, float y, float width, float height);

    // ----- DrawPolygon --------------------------------------------------------------------------

    //public void DrawPolygon(XPen pen, Point[] points);
    //public void DrawPolygon(XPen pen, PointF[] points);

    // ----- DrawPath -----------------------------------------------------------------------------

    public void DrawPath(XPen pen, XSolidBrush brush, XGraphicsPath path)
    {
      if (this.gfx != null)
      {
        this.gfx.FillPath(brush.RealizeGdiBrush(), path.RealizeGdiPath());
        this.gfx.DrawPath(pen.RealizeGdiPen(), path.RealizeGdiPath());
      }
      if (this.pdfPage != null)
        this.pdfPage.PageContent.DrawPath(pen, brush, path);
    }
    // ----- DrawRectangles -----------------------------------------------------------------------

    //public void DrawRectangles(XPen pen, XSolidBrush brush, Rectangle[] rects)
    //{
    //  if (this.gfx != null)
    //  {
    //    this.gfx.FillRectangles(brush.RealizeGdiBrush(), rects);
    //    this.gfx.DrawRectangles(pen.RealizeGdiPen(), rects);
    //  }
    //  if (this.pdfPage != null)
    //  {
    //    int count = rects.Length;
    //    for (int idx = 0; idx < count; idx++)
    //    {
    //      Rectangle rect = rects[idx];
    //      this.pdfPage.PageContent.DrawRectangle(pen, brush, rect.X, rect.Y, rect.Width, rect.Height);
    //    }
    //  }
    //}

    public void DrawRectangles(XPen pen, XSolidBrush brush, RectangleF[] rects)
    {
      if (this.gfx != null)
      {
        this.gfx.FillRectangles(brush.RealizeGdiBrush(), rects);
        this.gfx.DrawRectangles(pen.RealizeGdiPen(), rects);
      }
      if (this.pdfPage != null)
      {
        int count = rects.Length;
        for (int idx = 0; idx < count; idx++)
        {
          RectangleF rect = rects[idx];
          this.pdfPage.PageContent.DrawRectangle(pen, brush, rect.X, rect.Y, rect.Width, rect.Height);
        }
      }
    }