Example #1
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));
            }
        }
Example #2
0
        public static Numa boxaMakeWHRatioIndicator(this Boxa boxa, float ratio, SizeFilterFlags relation)
        {
            if (null == boxa)
            {
                throw new ArgumentNullException("boxa cannot be null.");
            }

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

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Numa(pointer));
            }
        }
Example #3
0
        // Filters
        public static Pix pixSelectBySize(this Pix pixs, int width, int height, int connectivity, LocationFilterFlags type, SizeFilterFlags relation, out int pchanged)
        {
            if (null == pixs)
            {
                throw new ArgumentNullException("pixs cannot be null");
            }

            var pointer = Native.DllImports.pixSelectBySize((HandleRef)pixs, width, height, connectivity, (int)type, (int)relation, out pchanged);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Example #4
0
        public static Numa pixaMakeSizeIndicator(this Pixa pixa, int width, int height, LocationFilterFlags type, SizeFilterFlags relation)
        {
            if (null == pixa)
            {
                throw new ArgumentNullException("pixa cannot be null");
            }

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

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