Пример #1
0
        public InsideTestResult IsInside(IShape4D shape, out bool transformedShape)
        {
            transformedShape = true;
            shape.Transform(this.matrix4D_0);
            InsideTestResult insideTestResult = ClipUtil.IsInside((IClipper4D)this.blinnClipper4D_0, shape, this.double_1);

            shape.Transform(this.matrix4D_1);
            return(insideTestResult);
        }
Пример #2
0
        public IShape4D Transform(IShape4D shape)
        {
            switch (shape.CheckClipping((IInsideTester4D)this.interface32_0))
            {
            case InsideTestResult.None:
            case InsideTestResult.Outside:
                return(NullShape4D.Instance);

            case InsideTestResult.Inside:
                shape.Transform(this.matrix4D_0);
                return(shape);

            default:
                IList <Polyline4D> polylines4D    = shape.ToPolylines4D(this.double_0);
                List <Polyline4D>  polyline4DList = new List <Polyline4D>(polylines4D.Count);
                int count = polylines4D.Count;
                for (int index = 0; index < count; ++index)
                {
                    polyline4DList.AddRange((IEnumerable <Polyline4D>) this.interface32_0.Clip(polylines4D[index], shape.IsFilled));
                }
                IShape4D shape4D = (IShape4D) new PolylineShape4D((IList <Polyline4D>)polyline4DList, shape.IsFilled);
                shape4D.Transform(this.matrix4D_0);
                return(shape4D);
            }
        }
Пример #3
0
        public void DrawCharPath(
            IShape2D path,
            Matrix4D transform,
            Color color,
            short lineWeight,
            bool filled,
            double extrusion)
        {
            IShape4D shape = (IShape4D) new FlatShape4D(path, filled);

            shape.Transform(transform);
            this.ipathDrawer_0.DrawCharPath(this.iclippingTransformer_0.Transform(shape).ToShape2D(Matrix4D.Identity), Matrix4D.Identity, color, lineWeight, filled, extrusion);
        }
Пример #4
0
        public IShape4D Transform(IShape4D shape)
        {
            shape.Transform(this.matrix4D_0);
            switch (shape.CheckClipping((IInsideTester4D)this.blinnClipper4D_0))
            {
            case InsideTestResult.None:
            case InsideTestResult.Outside:
                return(NullShape4D.Instance);

            case InsideTestResult.Inside:
                shape.Transform(this.matrix4D_1);
                return(shape);

            default:
                IList <Polyline4D> polylines4D     = shape.ToPolylines4D(this.double_0);
                List <Polyline4D>  polyline4DList1 = new List <Polyline4D>(polylines4D.Count);
                int  count = polylines4D.Count;
                bool flag  = true;
                for (int index = 0; index < count; ++index)
                {
                    Polyline4D         polyline        = polylines4D[index];
                    IList <Polyline4D> polyline4DList2 = this.blinnClipper4D_0.Clip(polyline, shape.IsFilled);
                    if (polyline4DList2.Count != 1 || polyline4DList2[0] != polyline)
                    {
                        flag = false;
                    }
                    polyline4DList1.AddRange((IEnumerable <Polyline4D>)DxfUtil.GetTransformed((IEnumerable <Polyline4D>)polyline4DList2, this.matrix4D_1));
                }
                if (!flag)
                {
                    return((IShape4D) new PolylineShape4D((IList <Polyline4D>)polyline4DList1, shape.IsFilled));
                }
                shape.Transform(this.matrix4D_1);
                return(shape);
            }
        }
Пример #5
0
        public InsideTestResult IsInside(IShape4D shape, out bool transformedShape)
        {
            transformedShape = false;
            InsideTestResult insideTestResult1 = InsideTestResult.None;

            foreach (IClippingTransformer clippingTransformer in this.linkedList_0)
            {
                bool             transformedShape1;
                InsideTestResult insideTestResult2 = clippingTransformer.IsInside(shape, out transformedShape1);
                transformedShape |= transformedShape1;
                if (insideTestResult2 == InsideTestResult.Outside)
                {
                    return(insideTestResult2);
                }
                insideTestResult1 |= insideTestResult2;
                if (!transformedShape1)
                {
                    shape.Transform(clippingTransformer.Matrix);
                    transformedShape = true;
                }
            }
            return(insideTestResult1);
        }
Пример #6
0
 public IShape4D Transform(IShape4D shape)
 {
     shape.Transform(this.matrix4D_0);
     return(shape);
 }