IfNegative() public static method

public static IfNegative ( string paramName, Percentage value ) : void
paramName string
value Percentage
return void
コード例 #1
0
ファイル: MagickGeometry.cs プロジェクト: orf53975/Magick.NET
        /// <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
ファイル: MagickGeometry.cs プロジェクト: levesque/Magick.NET
        ///<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);
        }