// ----- 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);
    }
Пример #2
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);
            }
        }
Пример #3
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);
            }
        }
Пример #4
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);
        }
      }
    }