Beispiel #1
0
        /// <summary>
        /// Clones the structure of the elipse elemenr, including all properties.
        /// </summary>
        /// <returns><see cref="Com.Delta.PrintManager.Engine.Elipse">Com.Delta.PrintManager.Engine.Elipse</see></returns>
        public override object Clone()
        {
            Elipse tmp = new Elipse(this.X, this.Y, this.Width, this.Height, this.section);

            tmp.Layout        = this.Layout;
            tmp.Color         = this.Color;
            tmp.BorderWidth   = this.BorderWidth;
            tmp.BorderColor   = this.borderColor;
            tmp.FillStyle     = this.FillStyle;
            tmp.GradientColor = tmp.GradientColor;
            tmp.GradientMode  = tmp.GradientMode;

            return(tmp);
        }
Beispiel #2
0
        private void ProcessElipse(PdfPage page, Com.Delta.PrintManager.Engine.Elipse elipse)
        {
            try
            {
                if (elipse.FillStyle == Elipse.FillStyles.Solid)
                {
                    if (elipse.BorderWidth > 0 || elipse.Color != Color.Transparent)
                    {
                        PdfCircle pdfCircle = new PdfCircle(Convert(elipse.Bounds.X), Convert(elipse.Bounds.Y), elipse.Color, elipse.BorderColor, elipse.BorderWidth);
                        pdfCircle.AxesArea = new PdfArea(pdfDocument, Convert(elipse.Bounds.X), Convert(elipse.Bounds.Y), Convert(elipse.Bounds.Width), Convert(elipse.Bounds.Height));

                        page.Add(pdfCircle);
                    }
                }
                else
                {
                    int      elipseHash = elipse.GetHashCode();
                    PdfImage image      = null;
                    if (images.Contains(elipseHash))
                    {
                        image = pdfDocument.GetObject((int)images[elipseHash]) as PdfImage;
                    }
                    else
                    {
                        image = pdfDocument.NewImage(elipse.Image);
                        images[elipseHash] = image.PublicID;
                    }

                    image.Width  = Convert(elipse.Bounds.Width);
                    image.Height = Convert(elipse.Bounds.Height);

                    page.Add(image, Convert(elipse.Bounds.X), Convert(elipse.Bounds.Y), Convert(elipse.Bounds.Width), Convert(elipse.Bounds.Height));
                }
            }
            catch (Exception e) {}
        }