using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Globe.Graphics.Bidimensional.Common; namespace Globe.Graphics.Bidimensional.Base { /// <summary> /// Ghost used by multi select tool. /// </summary> [Serializable] public class MultiSelectGhost : Ghost { #region Constructors /// <summary> /// Default constructor. /// </summary> public MultiSelectGhost() : base(new Rectangle()) { _brush = new System.Drawing.SolidBrush(System.Drawing.Color.FromArgb(100, System.Drawing.Color.LightBlue)); } #endregion #region IActions Interface /// <summary> /// Paint function /// </summary> /// <param name="document">Informations transferred from DrawingPanel</param> /// <param name="e">PaintEventArgs</param> public override void Paint(IDocument document, PaintEventArgs e) { if (!Visible) return; e.Graphics.FillRectangle(_brush, System.Drawing.Rectangle.Round(new System.Drawing.RectangleF(Location, Dimension))); e.Graphics.DrawRectangle(System.Drawing.Pens.Black, System.Drawing.Rectangle.Round(Geometric.GetBounds())); } #endregion #region Properties System.Drawing.SolidBrush _brush = null; /// <summary> /// Gets or sets the brush to draw. /// </summary> protected System.Drawing.SolidBrush DrawingBrush { get { return _brush; } set { _brush = value; } } #endregion } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)