Ejemplo n.º 1
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="index"></param>
		/// <param name="rectangle"></param>
		public void SetClipRectangle ( int index, Rectangle rectangle, Color color )
		{
			if (index<0 || index>=MaxSpriteFrames) {
				throw new ArgumentOutOfRangeException("index", "must be greater or equal to zero and less than MaxClipRectangles (" + MaxSpriteFrames.ToString() + ")");
			}

			var rect	=	new RectangleF( rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height );
			var color4	=	color.ToColor4();
			
			framesData[ index ] = new SpriteFrame( rect, color4 );

			dirty	=	true;
		}