public int CompareTo(object obj) { if (obj is int) { return(BufferIndex.CompareTo((int)obj)); } return(BufferIndex.CompareTo(((Mark)obj).BufferIndex)); }
/// <summary> /// This is used by the transparency z-order sorting. /// /// Therefore highest z-values (which are in the back) come /// first as they need to be drawn before front ones. /// </summary> public int CompareTo(DrawCommand other) { if (other == null) { return(1); } if (Z == other.Z) { return(BufferIndex.CompareTo(other.BufferIndex)); } // This is equal to the greater check. return(other.Z.CompareTo(Z)); }