ImageMagick.ClipPathReader.Read C# (CSharp) Метод

Read() публичный Метод

public Read ( Byte data, int offset, int length ) : string
data Byte
offset int
length int
Результат string
    public string Read(Byte[] data, int offset, int length)
    {
      Reset(offset);

      while (_Index < offset + length)
      {
        short selector = ByteConverter.ToShort(data, ref _Index);
        switch (selector)
        {
          case 0:
          case 3:
            SetKnotCount(data);
            break;
          case 1:
          case 2:
          case 4:
          case 5:
            AddPath(data);
            break;
          case 6:
          case 7:
          case 8:
          default:
            _Index += 24;
            break;
        }
      }

      return _Path.ToString();
    }
  }

Usage Example

Пример #1
0
        private string GetClipPath(int offset, int length)
        {
            if (_width == 0 || _height == 0)
            {
                return(null);
            }

            var reader = new ClipPathReader(_width, _height);

            return(reader.Read(GetData(), offset, length));
        }
All Usage Examples Of ImageMagick.ClipPathReader::Read