Options to be used by various polygon operations.
Наследование: PolygonOperationOptions
Пример #1
0
 /// <summary>
 /// Creates a copy of the given object or the default object when given <c>null</c>.
 /// </summary>
 /// <param name="options">The object to clone.</param>
 /// <returns>A new object.</returns>
 public static PolygonBinaryOperationOptions CloneOrDefault(PolygonBinaryOperationOptions options)
 {
     Contract.Ensures(Contract.Result <PolygonBinaryOperationOptions>() != null);
     return(null == options
         ? new PolygonBinaryOperationOptions()
         : new PolygonBinaryOperationOptions(options));
 }
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="options">The object to copy.</param>
        public PolygonBinaryOperationOptions(PolygonBinaryOperationOptions options)
            : base(options) {
            if (null == options) throw new ArgumentNullException("options");
            Contract.EndContractBlock();

            InvertLeftHandSide = options.InvertLeftHandSide;
            InvertRightHandSide = options.InvertRightHandSide;
        }
Пример #3
0
 static PolygonUnionOperation() {
     DefaultInverseIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide = true,
         InvertRightHandSide = true,
         InvertResult = true
     };
     DefaultInverseIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseIntersectionOptions);
 }
 static PolygonDifferenceOperation() {
     DefaultInverseRightIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide = false,
         InvertRightHandSide = true,
         InvertResult = false
     };
     DefaultInverseRightIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseRightIntersectionOptions);
 }
Пример #5
0
 static PolygonDifferenceOperation()
 {
     DefaultInverseRightIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide  = false,
         InvertRightHandSide = true,
         InvertResult        = false
     };
     DefaultInverseRightIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseRightIntersectionOptions);
 }
Пример #6
0
 static PolygonUnionOperation()
 {
     DefaultInverseIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide  = true,
         InvertRightHandSide = true,
         InvertResult        = true
     };
     DefaultInverseIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseIntersectionOptions);
 }
Пример #7
0
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="options">The object to copy.</param>
        public PolygonBinaryOperationOptions(PolygonBinaryOperationOptions options)
            : base(options)
        {
            if (null == options)
            {
                throw new ArgumentNullException("options");
            }
            Contract.EndContractBlock();

            InvertLeftHandSide  = options.InvertLeftHandSide;
            InvertRightHandSide = options.InvertRightHandSide;
        }
 /// <summary>
 /// Creates a copy of the given object or the default object when given <c>null</c>.
 /// </summary>
 /// <param name="options">The object to clone.</param>
 /// <returns>A new object.</returns>
 public static PolygonBinaryOperationOptions CloneOrDefault(PolygonBinaryOperationOptions options) {
     Contract.Ensures(Contract.Result<PolygonBinaryOperationOptions>() != null);
     return null == options
         ? new PolygonBinaryOperationOptions()
         : new PolygonBinaryOperationOptions(options);
 }
Пример #9
0
 /// <summary>
 /// Constructs a new polygon intersection operation using the given options.
 /// </summary>
 /// <param name="options">The operation options to apply.</param>
 /// <remarks>
 /// Using this constructor can help optimize other operators that
 /// rely on intersection operations, such as union or difference.
 /// </remarks>
 internal PolygonIntersectionOperation(PolygonBinaryOperationOptions options)
 {
     Options = PolygonBinaryOperationOptions.CloneOrDefault(options);
 }
 /// <summary>
 /// Constructs a new polygon intersection operation using the given options.
 /// </summary>
 /// <param name="options">The operation options to apply.</param>
 /// <remarks>
 /// Using this constructor can help optimize other operators that
 /// rely on intersection operations, such as union or difference.
 /// </remarks>
 internal PolygonIntersectionOperation(PolygonBinaryOperationOptions options) {
     Options = PolygonBinaryOperationOptions.CloneOrDefault(options);
 }