Exemplo n.º 1
0
 public int CompareTo(object obj)
 {
     if (obj is int)
     {
         return(BufferIndex.CompareTo((int)obj));
     }
     return(BufferIndex.CompareTo(((Mark)obj).BufferIndex));
 }
Exemplo n.º 2
0
        /// <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));
        }