Exemple #1
0
        public override Region CreateIntersect(Region another)
        {
            CpuBlitRegion rgnB = another as CpuBlitRegion;

            if (rgnB == null)
            {
                return(null);
            }
            //
            switch (rgnB.Kind)
            {
            default: throw new System.NotSupportedException();

            case CpuBlitRegionKind.BitmapBasedRegion:
                return(CreateNewRegion((BitmapBasedRegion)rgnB, SetOperationName.Intersect));

            case CpuBlitRegionKind.MixedRegion:
                break;

            case CpuBlitRegionKind.VxsRegion:
                //TODO: review complement
                break;
            }
            return(null);
        }
Exemple #2
0
        public override Region CreateComplement(Region another)
        {
            CpuBlitRegion rgnB = another as CpuBlitRegion;

            if (rgnB == null)
            {
                return(null);
            }
            //
            //
            switch (rgnB.Kind)
            {
            default: throw new System.NotSupportedException();

            case CpuBlitRegionKind.BitmapBasedRegion:
            {
                //TODO: review here
                BitmapBasedRegion bmpRgn = (BitmapBasedRegion)rgnB;
            }
            break;

            case CpuBlitRegionKind.MixedRegion:
                break;

            case CpuBlitRegionKind.VxsRegion:
                //TODO: review complement
                break;
            }
            return(null);
        }
Exemple #3
0
        public override Region CreateXor(Region another)
        {
            CpuBlitRegion rgnB = another as CpuBlitRegion;

            if (rgnB == null)
            {
                return(null);
            }
            switch (rgnB.Kind)
            {
            default: throw new System.NotSupportedException();

            case CpuBlitRegionKind.BitmapBasedRegion:
                //another is bitmap-based rgn
                //we need to create bitmap presentation of this vxs rgn
                //and then send this bitmap to operate with another rgn

                break;

            case CpuBlitRegionKind.MixedRegion:
                break;

            case CpuBlitRegionKind.VxsRegion:
                return(new VxsRegion(VxsClipper.CombinePaths(_vxs, ((VxsRegion)another)._vxs, VxsClipperType.Xor, false, null)));
            }
            return(null);
        }
Exemple #4
0
        public override Region CreateXor(Region another)
        {
            CpuBlitRegion rgnB = another as CpuBlitRegion;

            if (rgnB == null)
            {
                return(null);
            }
            //

            return(null);
        }
Exemple #5
0
        public override Region CreateExclude(Region another)
        {
            CpuBlitRegion rgnB = another as CpuBlitRegion;

            if (rgnB == null)
            {
                return(null);
            }
            switch (rgnB.Kind)
            {
            default: throw new System.NotSupportedException();

            case CpuBlitRegionKind.BitmapBasedRegion:
                break;

            case CpuBlitRegionKind.MixedRegion:
                break;

            case CpuBlitRegionKind.VxsRegion:
                return(new VxsRegion(VxsClipper.CombinePaths(_vxs, ((VxsRegion)another)._vxs, VxsClipperType.Difference, false, null)));
            }
            return(null);
        }