Beispiel #1
0
 /// <summary>
 /// Triggered when the internal sprite triggers it.
 /// </summary>
 protected virtual void OnInvalidate(
     object sender,
     InvalidateArgs args)
 {
     if (Invalidate != null)
     {
         Invalidate(this, args);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Fires an invalidate event with the given arguments. This
        /// acts as a multiplexor for anything listening to this
        /// sprite list's invalidate (instead of registering to every
        /// sprite).
        /// </summary>
        public void FireInvalidate(InvalidateArgs args)
        {
            // Ignore if we don't have listeners
            if (Invalidate == null)
            {
                return;
            }

            // Fire it
            Invalidate(this, args);
        }
Beispiel #3
0
 /// <summary>
 /// This is triggered when a sprite is invalidated. This is
 /// used to build up the exposer/queue elements.
 /// </summary>
 private void OnInvalidated(
     object sender,
     InvalidateArgs args)
 {
     // Check for a zero
     if (invalidated.IsEmpty)
     {
         invalidated = args.Rectangle;
     }
     else
     {
         invalidated = Rectangle.Union(invalidated, args.Rectangle);
     }
 }
Beispiel #4
0
        /// <summary>
        /// Fires an invalidate event that takes the current sprite's
        /// rectangle and merges it with the given one.
        /// </summary>
        public void FireInvalidate(Rectangle rectangle)
        {
            // Ignore if we don't have listeners
            if (Invalidate == null)
            {
                return;
            }

            // Create the rectangle
            InvalidateArgs args = new InvalidateArgs();

            args.Rectangle = Rectangle.Union(Rectangle, rectangle);

            // Fire it
            Invalidate(this, args);
        }
Beispiel #5
0
        /// <summary>
        /// Fires an invalidate event to all of the listeners.
        /// </summary>
        public void FireInvalidate()
        {
            // Ignore if we don't have listeners
            if (Invalidate == null)
            {
                return;
            }

            // Create the rectangle
            InvalidateArgs args = new InvalidateArgs();

            args.Rectangle = new Rectangle(X, Y, Width, Height);

            // Fire it
            Invalidate(this, args);
        }
Beispiel #6
0
        /// <summary>
        /// Triggered when the internal sprite triggers it.
        /// </summary>
        protected virtual void OnInvalidate(
			object sender,
			InvalidateArgs args)
        {
            if (Invalidate != null)
            {
                Invalidate(this, args);
            }
        }
Beispiel #7
0
        /// <summary>
        /// Fires an invalidate event to all of the listeners.
        /// </summary>
        public void FireInvalidate()
        {
            // Ignore if we don't have listeners
            if (Invalidate == null)
            {
                return;
            }

            // Create the rectangle
            InvalidateArgs args = new InvalidateArgs();
            args.Rectangle = new Rectangle(X, Y, Width, Height);

            // Fire it
            Invalidate(this, args);
        }
Beispiel #8
0
        /// <summary>
        /// Fires an invalidate event that takes the current sprite's
        /// rectangle and merges it with the given one.
        /// </summary>
        public void FireInvalidate(Rectangle rectangle)
        {
            // Ignore if we don't have listeners
            if (Invalidate == null)
            {
                return;
            }

            // Create the rectangle
            InvalidateArgs args = new InvalidateArgs();
            args.Rectangle = Rectangle.Union(Rectangle, rectangle);

            // Fire it
            Invalidate(this, args);
        }
Beispiel #9
0
        /// <summary>
        /// This is triggered when a sprite is invalidated. This is
        /// used to build up the exposer/queue elements.
        /// </summary>
        private void OnInvalidated(
			object sender,
			InvalidateArgs args)
        {
            // Check for a zero
            if (invalidated.IsEmpty)
            {
                invalidated = args.Rectangle;
            }
            else
            {
                invalidated = Rectangle.Union(invalidated, args.Rectangle);
            }
        }
Beispiel #10
0
 /// <summary>
 /// This event is triggered when a sprite invalidate's itself.
 /// </summary>
 private void OnSpriteInvalidated(
     object sender,
     InvalidateArgs args)
 {
     FireInvalidate(args);
 }