ImageMagick.MagickGeometry.ToString C# (CSharp) Method

ToString() public method

Returns a string that represents the current MagickGeometry.
public ToString ( ) : string
return string
    public override string ToString()
    {
      string result = null;

      if (Width > 0)
        result += Width;

      if (Height > 0)
        result += "x" + Height;

      if (X != 0 || Y != 0)
      {
        if (X >= 0)
          result += '+';

        result += X;

        if (Y >= 0)
          result += '+';

        result += Y;
      }

      if (IsPercentage)
        result += '%';

      if (IgnoreAspectRatio)
        result += '!';

      if (Greater)
        result += '>';

      if (Less)
        result += '<';

      if (FillArea)
        result += '^';

      if (LimitPixels)
        result += '@';

      return result;
    }
  }

Same methods

MagickGeometry::ToString ( MagickGeometry value ) : string

Usage Example

        private static string Convert(MagickGeometry geometry)
        {
            if (geometry == null)
            {
                return(null);
            }

            return(geometry.ToString());
        }
All Usage Examples Of ImageMagick.MagickGeometry::ToString