IfNegative() 공개 정적인 메소드

public static IfNegative ( string paramName, Percentage value ) : void
paramName string
value Percentage
리턴 void
예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MagickGeometry"/> class using the specified offsets, width and height.
        /// </summary>
        /// <param name="x">The X offset from origin.</param>
        /// <param name="y">The Y offset from origin.</param>
        /// <param name="percentageWidth">The percentage of the width.</param>
        /// <param name="percentageHeight">The percentage of the  height.</param>
        public MagickGeometry(int x, int y, Percentage percentageWidth, Percentage percentageHeight)
        {
            Throw.IfNegative(nameof(percentageWidth), percentageWidth);
            Throw.IfNegative(nameof(percentageHeight), percentageHeight);

            Initialize(x, y, (int)percentageWidth, (int)percentageHeight, true);
        }
예제 #2
0
        ///<summary>
        /// Initializes a new instance of the MagickGeometry class using the specified width and
        /// height.
        ///</summary>
        ///<param name="percentageWidth">The percentage of the width.</param>
        ///<param name="percentageHeight">The percentage of the  height.</param>
        public MagickGeometry(Percentage percentageWidth, Percentage percentageHeight)
        {
            Throw.IfNegative("percentageWidth", percentageWidth);
            Throw.IfNegative("percentageHeight", percentageHeight);

            Initialize(0, 0, (int)percentageWidth, (int)percentageHeight, true);
        }