示例#1
0
 // constructors
 /// <summary>Creates a new instance of this structure.</summary>
 /// <param name="transparentColor">The color in the texture that should become transparent.</param>
 /// <param name="horizontalWrapMode">The horizontal wrap mode for this texture.</param>
 /// <param name="verticalWrapMode">The vertical wrap mode for this texture.</param>
 /// <param name="clipRegion">The region of the texture to be extracted, or a null reference for the entire texture.</param>
 public TextureParameters(Color.TransparentColor transparentColor, TextureWrapMode horizontalWrapMode, TextureWrapMode verticalWrapMode, TextureClipRegion clipRegion)
 {
     this.TransparentColor = transparentColor;
     this.HorizontalWrapMode = horizontalWrapMode;
     this.VerticalWrapMode = verticalWrapMode;
     this.ClipRegion = clipRegion;
 }
示例#2
0
 // static functions
 /// <summary>Checks two texture clip regions for equality.</summary>
 /// <param name="a">The first texture clip region.</param>
 /// <param name="b">The second texture clip region.</param>
 /// <returns>A boolean indicating whether the two texture clip regions are equal.</returns>
 public static bool Equals(TextureClipRegion a, TextureClipRegion b)
 {
     if (a == null & b == null) {
         return true;
     } else if (a == null | b == null) {
         return false;
     } else {
         return a.Left == b.Left & a.Top == b.Top & a.Width == b.Width & a.Height == b.Height;
     }
 }