Ejemplo n.º 1
0
 public override void Invalidate(Rectangle bounds)
 {
     if (dbuffer != null)
     {
         dbuffer.Invalidate(bounds);
     }
     base.Invalidate(bounds);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Invalids the specified bounds.
        /// </summary>
        public virtual void Invalidate(Rectangle bounds)
        {
            if (Container == null)
            {
                return;
            }

            int       delta = DBufferTop - ScaledTopOffset;
            Rectangle r     = new Rectangle(bounds.X, bounds.Y - delta, bounds.Width, bounds.Height);

            if (doubleBuffer != null)
            {
                doubleBuffer.Invalidate(r);
            }
            bounds.Offset(Left, Top);
            // don't let the child control invalidate anything outside the own bounds:
            ClipRectangle(ref bounds);
            Container.Invalidate(bounds);
        }