Exemplo n.º 1
0
        public static int pixaaSizeRange(this Pixaa paa, out int pminw, out int pminh, out int pmaxw, out int pmaxh)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            return(Native.DllImports.pixaaSizeRange((HandleRef)paa, out pminw, out pminh, out pmaxw, out pmaxh));
        }
Exemplo n.º 2
0
        public static int pixaaIsFull(this Pixaa paa, out int pfull)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            return(Native.DllImports.pixaaIsFull((HandleRef)paa, out pfull));
        }
Exemplo n.º 3
0
        public static int pixaaJoin(this Pixaa paad, Pixaa paas, int istart, int iend)
        {
            if (null == paad)
            {
                throw new ArgumentNullException("pixa cannot be null");
            }

            return(Native.DllImports.pixaaJoin((HandleRef)paad, (HandleRef)paas, istart, iend));
        }
Exemplo n.º 4
0
        public static int pixaaTruncate(this Pixaa paa)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            return(Native.DllImports.pixaaTruncate((HandleRef)paa));
        }
Exemplo n.º 5
0
        public static int pixaaVerifyDepth(this Pixaa paa, out int pmaxdepth)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            return(Native.DllImports.pixaaVerifyDepth((HandleRef)paa, out pmaxdepth));
        }
Exemplo n.º 6
0
        public static int pixaaWriteStream(IntPtr fp, Pixaa paa)
        {
            if (IntPtr.Zero == fp ||
                null == paa)
            {
                throw new ArgumentNullException("fp, paa cannot be null");
            }

            return(Native.DllImports.pixaaWriteStream(fp, (HandleRef)paa));
        }
Exemplo n.º 7
0
        // Pixaa addition
        public static int pixaaAddPixa(this Pixaa paa, Pixa pixa, int copyflag)
        {
            if (null == paa ||
                null == pixa)
            {
                throw new ArgumentNullException("paa, pixa cannot be null");
            }

            return(Native.DllImports.pixaaAddPixa((HandleRef)paa, (HandleRef)pixa, copyflag));
        }
Exemplo n.º 8
0
        public static int pixaaWriteMem(out IntPtr pdata, IntPtr psize, Pixaa paa)
        {
            if (IntPtr.Zero == psize ||
                null == paa)
            {
                throw new ArgumentNullException("psize, paa cannot be null");
            }

            return(Native.DllImports.pixaaWriteMem(out pdata, psize, (HandleRef)paa));
        }
Exemplo n.º 9
0
        public static int pixaaReplacePixa(this Pixaa paa, int index, Pixa pixa)
        {
            if (null == paa ||
                null == pixa)
            {
                throw new ArgumentNullException("paa, pixa cannot be null");
            }

            return(Native.DllImports.pixaaReplacePixa((HandleRef)paa, index, (HandleRef)pixa));
        }
Exemplo n.º 10
0
        public static int pixaaAddBox(this Pixaa paa, Box box, int copyflag)
        {
            if (null == paa ||
                null == box)
            {
                throw new ArgumentNullException("paa, box cannot be null");
            }

            return(Native.DllImports.pixaaAddBox((HandleRef)paa, (HandleRef)box, copyflag));
        }
Exemplo n.º 11
0
        public static void pixaaDestroy(this Pixaa ppaa)
        {
            if (null == ppaa)
            {
                throw new ArgumentNullException("ppaa cannot be null");
            }

            var pointer = (IntPtr)ppaa;

            Native.DllImports.pixaaDestroy(ref pointer);
        }
Exemplo n.º 12
0
        public static int pixaaWrite(string filename, Pixaa paa)
        {
            if (string.IsNullOrWhiteSpace(filename))
            {
                throw new ArgumentNullException("filename cannot be null");
            }
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            return(Native.DllImports.pixaaWrite(filename, (HandleRef)paa));
        }
Exemplo n.º 13
0
        // Pixaa accessors
        public static int pixaaGetCount(this Pixaa paa, out Numa pna)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            IntPtr pnaPtr;
            var    result = Native.DllImports.pixaaGetCount((HandleRef)paa, out pnaPtr);

            pna = new Numa(pnaPtr);

            return(result);
        }
Exemplo n.º 14
0
        public static Pixaa pixaaSelectRange(this Pixaa paas, int first, int last, int copyflag)
        {
            if (null == paas)
            {
                throw new ArgumentNullException("paas cannot be null");
            }

            var pointer = Native.DllImports.pixaaSelectRange((HandleRef)paas, first, last, copyflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pixaa(pointer));
            }
        }
Exemplo n.º 15
0
        public static Pixaa pixaaScaleToSizeVar(this Pixaa paas, Numa nawd, Numa nahd)
        {
            if (null == paas)
            {
                throw new ArgumentNullException("paas cannot be null");
            }

            var pointer = Native.DllImports.pixaaScaleToSizeVar((HandleRef)paas, (HandleRef)nawd, (HandleRef)nahd);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pixaa(pointer));
            }
        }
Exemplo n.º 16
0
        public static Pixa pixaaDisplayTiledAndScaled(this Pixaa paa, int outdepth, int tilewidth, int ncols, int background, int spacing, int border)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            var pointer = Native.DllImports.pixaaDisplayTiledAndScaled((HandleRef)paa, outdepth, tilewidth, ncols, background, spacing, border);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pixa(pointer));
            }
        }
Exemplo n.º 17
0
        public static Boxa pixaaGetBoxa(this Pixaa paa, int accesstype)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            var pointer = Native.DllImports.pixaaGetBoxa((HandleRef)paa, accesstype);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxa(pointer));
            }
        }
Exemplo n.º 18
0
        public static Pix pixaaGetPix(this Pixaa paa, int index, int ipix, int accessflag)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            var pointer = Native.DllImports.pixaaGetPix((HandleRef)paa, index, ipix, accessflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Exemplo n.º 19
0
        public static Pix pixaaDisplayByPixa(this Pixaa paa, int xspace, int yspace, int maxw)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            var pointer = Native.DllImports.pixaaDisplayByPixa((HandleRef)paa, xspace, yspace, maxw);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Exemplo n.º 20
0
        public static Pixa pixaaFlattenToPixa(this Pixaa paa, out Numa pnaindex, int copyflag)
        {
            if (null == paa)
            {
                throw new ArgumentNullException("paa cannot be null");
            }

            IntPtr pnaindexPtr;
            var    pointer = Native.DllImports.pixaaFlattenToPixa((HandleRef)paa, out pnaindexPtr, copyflag);

            pnaindex = new Numa(pnaindexPtr);
            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pixa(pointer));
            }
        }
Exemplo n.º 21
0
        // Build grayscale composites(templates)
        public static Pixa jbAccumulateComposites(this Pixaa pixaa, out Numa pna, out Pta pptat)
        {
            if (null == pixaa)
            {
                throw new ArgumentNullException("pixaa cannot be null.");
            }

            IntPtr pptatPtr, pnaPtr;
            var    pointer = Native.DllImports.jbAccumulateComposites((HandleRef)pixaa, out pnaPtr, out pptatPtr);

            pna   = new Numa(pnaPtr);
            pptat = new Pta(pptatPtr);

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