Ejemplo n.º 1
0
        /// <summary>
        /// Returns a snapshot image of this group
        /// </summary>
        /// <param name="imgWidth">Width in pixels of the returned image (height is determined by the number of layers in the group)</param>
        /// <returns>Bitmap of the group and sublayers (expanded)</returns>
        public System.Drawing.Bitmap Snapshot(int imgWidth)
        {
            Bitmap    bmp = null;         // = new Bitmap(imgWidth,imgHeight);
            Rectangle rect;

            System.Drawing.Graphics g;

            bmp = new Bitmap(imgWidth, this.ExpandedHeight);
            g   = Graphics.FromImage(bmp);
            g.Clear(System.Drawing.Color.White);

            rect = new Rectangle(0, 0, imgWidth, this.ExpandedHeight);

            m_Legend.DrawGroup(g, this, rect, true);

            return(bmp);
        }