コード例 #1
0
        private unsafe int[] GetBufferUsedColorArray(int *src)
        {
            LightCollection <int> colors = new LightCollection <int>();

            for (int i = 0; i < _pixelsCount; i++)
            {
                int c = *((int *)src);
                if (!colors.Contains(c))
                {
                    colors.Add(c);
                }
                src++;
            }
            return(colors.GetItems());
        }
コード例 #2
0
        /// <summary>
        /// Gets the full path.
        /// </summary>
        /// <returns>System.String.</returns>
        public string GetFullPath()
        {
            LightCollection <string> paths = new LightCollection <string>();

            paths.Add(_id);
            TreeItem <T> parent = this.Parent;

            while (parent != null)
            {
                paths.Add(parent.Id);
                parent = parent.Parent;
            }
            paths.Reverse();
            string fullPath = string.Join("/", paths.GetItems());

            return(fullPath);
        }
コード例 #3
0
ファイル: PixelBuffer.cs プロジェクト: westybsa/MP.LSharp
 private unsafe int[] GetBufferUsedColorArray(int* src)
 {
     LightCollection<int> colors = new LightCollection<int>();
     for (int i = 0; i < _pixelsCount; i++)
     {
         int c = *((int*)src);
         if (!colors.Contains(c))
         {
             colors.Add(c);
         }
         src++;
     }
     return colors.GetItems();
 }
コード例 #4
0
 public string[] GetItems()
 {
     return(_coll.GetItems());
 }