예제 #1
0
        public static Pta generatePtaHashBoxa(this Boxa boxa, int spacing, int width, int orient, int outline, int removedups)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null");
            }

            var pointer = Native.DllImports.generatePtaHashBoxa((HandleRef)boxa, spacing, width, orient, outline, removedups);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pta(pointer));
            }
        }
예제 #2
0
        public static Boxa boxaPermuteRandom(this Boxa boxad, Boxa boxas)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaPermuteRandom((HandleRef)boxad, (HandleRef)boxas);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #3
0
        // Boxa sequence fitting
        public static Boxa boxaSmoothSequenceLS(this Boxa boxas, float factor, int subflag, int maxdiff, int debug)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaSmoothSequenceLS((HandleRef)boxas, factor, subflag, maxdiff, debug);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #4
0
        public static Numa boxaFindInvalidBoxes(this Boxa boxa)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null");
            }

            var pointer = Native.DllImports.boxaFindInvalidBoxes((HandleRef)boxa);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Numa(pointer));
            }
        }
예제 #5
0
        public static Boxa boxaSelectByWHRatio(this Boxa boxas, float ratio, int relation, out int pchanged)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaSelectByWHRatio((HandleRef)boxas, ratio, relation, out pchanged);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #6
0
        public static Boxa boxaSetSide(this Boxa boxad, Boxa boxas, int side, int val, int thresh)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null");
            }

            var pointer = Native.DllImports.boxaSetSide((HandleRef)boxad, (HandleRef)boxas, side, val, thresh);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #7
0
        // Helpers
        public static Boxa boxaPruneSortedOnOverlap(Boxa boxas, float maxoverlap)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaPruneSortedOnOverlap((HandleRef)boxas, maxoverlap);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #8
0
        public static Numa boxaMakeSizeIndicator(this Boxa boxa, int width, int height, LocationFilterFlags type, SizeFilterFlags relation)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null.");
            }

            var pointer = Native.DllImports.boxaMakeSizeIndicator((HandleRef)boxa, width, height, (int)type, (int)relation);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Numa(pointer));
            }
        }
예제 #9
0
        // Boxa and Boxaa range selection
        public static Boxa boxaSelectRange(this Boxa boxas, int first, int last, int copyflag)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaSelectRange((HandleRef)boxas, first, last, copyflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #10
0
        public static Boxa boxaReconcileEvenOddHeight(this Boxa boxas, int sides, int delh, int op, float factor, int start)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaReconcileEvenOddHeight((HandleRef)boxas, sides, delh, op, factor, start);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #11
0
        public static Boxa boxaFillSequence(this Boxa boxas, int useflag, int debug)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaFillSequence((HandleRef)boxas, useflag, debug);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #12
0
        public static Boxa boxaConstrainSize(this Boxa boxas, int width, int widthflag, int height, int heightflag)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaConstrainSize((HandleRef)boxas, width, widthflag, height, heightflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #13
0
        public static Boxa boxaWindowedMedian(this Boxa boxas, int halfwin, int debug)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaWindowedMedian((HandleRef)boxas, halfwin, debug);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #14
0
        public static Boxa boxaLinearFit(this Boxa boxas, float factor, int debug)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaLinearFit((HandleRef)boxas, factor, debug);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #15
0
        public static Box boxaGetNearestToLine(this Boxa boxa, int x, int y)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null");
            }

            var pointer = Native.DllImports.boxaGetNearestToLine((HandleRef)boxa, x, y);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Box(pointer));
            }
        }
예제 #16
0
        public static Boxa boxaSelectByArea(this Boxa boxas, int area, SizeFilterFlags relation, out int pchanged)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaSelectByArea((HandleRef)boxas, area, (int)relation, out pchanged);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #17
0
        public static Boxa boxaAdjustSides(this Boxa boxas, int delleft, int delright, int deltop, int delbot)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null");
            }

            var pointer = Native.DllImports.boxaAdjustSides((HandleRef)boxas, delleft, delright, deltop, delbot);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #18
0
        public static Boxaa boxaEncapsulateAligned(this Boxa boxa, int num, AccessAndStorageFlags copyflag)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null.");
            }

            var pointer = Native.DllImports.boxaEncapsulateAligned((HandleRef)boxa, num, (int)copyflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxaa(pointer));
            }
        }
예제 #19
0
        public static Boxa boxaAdjustHeightToTarget(this Boxa boxad, Boxa boxas, int sides, int target, int thresh)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null");
            }

            var pointer = Native.DllImports.boxaAdjustHeightToTarget((HandleRef)boxad, (HandleRef)boxas, sides, target, thresh);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #20
0
        public static Boxa boxaTransformOrdered(this Boxa boxas, int shiftx, int shifty, float scalex, float scaley, int xcen, int ycen, float angle, int order)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaTransformOrdered((HandleRef)boxas, shiftx, shifty, scalex, scaley, xcen, ycen, angle, order);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #21
0
        public static Box boxaGetValidBox(this Boxa boxa, int index, int accessflag)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null");
            }

            var pointer = Native.DllImports.boxaGetValidBox((HandleRef)boxa, index, accessflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Box(pointer));
            }
        }
예제 #22
0
        public static Boxa boxaRotateOrth(this Boxa boxas, int w, int h, int rotation)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaRotateOrth((HandleRef)boxas, w, h, rotation);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #23
0
        public static Boxa boxaSaveValid(this Boxa boxas, int copyflag)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null");
            }

            var pointer = Native.DllImports.boxaSaveValid((HandleRef)boxas, copyflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #24
0
        public static Box boxaSelectLargeULBox(this Boxa boxas, float areaslop, int yslop)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaSelectLargeULBox((HandleRef)boxas, areaslop, yslop);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Box(pointer));
            }
        }
예제 #25
0
        public static Numa boxaMakeWHRatioIndicator(this Boxa boxa, float ratio, int relation)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null.");
            }

            var pointer = Native.DllImports.boxaMakeWHRatioIndicator((HandleRef)boxa, ratio, relation);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Numa(pointer));
            }
        }
예제 #26
0
        /// <summary>
        /// See createMatrix2dScale() for details of transform.
        /// </summary>
        /// <param name="boxas"></param>
        /// <param name="scalex">horizontal scale factor</param>
        /// <param name="scaley">vertical scale factor</param>
        /// <returns>scaled boxas, or NULL on error</returns>
        public static Boxa boxaScale(this Boxa boxas, float scalex, float scaley)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaScale((HandleRef)boxas, scalex, scaley);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #27
0
        // Boxa and box conversions
        public static Pta boxaConvertToPta(this Boxa boxa, int ncorners)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null.");
            }

            var pointer = Native.DllImports.boxaConvertToPta((HandleRef)boxa, ncorners);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pta(pointer));
            }
        }
예제 #28
0
        /// <summary>
        /// See createMatrix2dRotate() for details of transform.
        /// </summary>
        /// <param name="boxas"></param>
        /// <param name="xc">location of center of rotation</param>
        /// <param name="yc">location of center of rotation</param>
        /// <param name="angle">rotation in radians; clockwise is positive</param>
        /// <returns>scaled boxas, or NULL on error</returns>
        public static Boxa boxaRotate(this Boxa boxas, float xc, float yc, float angle)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaRotate((HandleRef)boxas, xc, yc, angle);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
예제 #29
0
        public static Ptaa generatePtaaBoxa(this Boxa boxa)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null");
            }

            var pointer = Native.DllImports.generatePtaaBoxa((HandleRef)boxa);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Ptaa(pointer));
            }
        }
예제 #30
0
        public static Pix boxaDisplayTiled(this Boxa boxas, Pixa pixa, int maxwidth, int linewidth, float scalefactor, int background, int spacing, int border)
        {
            if (null == boxas ||
                null == pixa)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            var pointer = Native.DllImports.boxaDisplayTiled((HandleRef)boxas, (HandleRef)pixa, maxwidth, linewidth, scalefactor, background, spacing, border);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }