Example #1
0
        // pixacc.c (232, 1)
        // pixaccGetOffset(pixacc) as int
        // pixaccGetOffset(PIXACC *) as l_int32
        ///  <summary>
        /// pixaccGetOffset()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/pixaccGetOffset/*"/>
        ///  <param name="pixacc">[in] - </param>
        ///   <returns>offset, or -1 on error</returns>
        public static int pixaccGetOffset(
            Pixacc pixacc)
        {
            if (pixacc == null)
            {
                throw new ArgumentNullException("pixacc cannot be Nothing");
            }

            int _Result = Natives.pixaccGetOffset(pixacc.Pointer);

            return(_Result);
        }
Example #2
0
        // pixacc.c (297, 1)
        // pixaccMultConst(pixacc, factor) as int
        // pixaccMultConst(PIXACC *, l_float32) as l_ok
        ///  <summary>
        /// pixaccMultConst()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/pixaccMultConst/*"/>
        ///  <param name="pixacc">[in] - </param>
        ///  <param name="factor">[in] - </param>
        ///   <returns>0 if OK, 1 on error</returns>
        public static int pixaccMultConst(
            Pixacc pixacc,
            Single factor)
        {
            if (pixacc == null)
            {
                throw new ArgumentNullException("pixacc cannot be Nothing");
            }

            int _Result = Natives.pixaccMultConst(pixacc.Pointer, factor);

            return(_Result);
        }
Example #3
0
        // pixacc.c (215, 1)
        // pixaccGetPix(pixacc) as Pix
        // pixaccGetPix(PIXACC *) as PIX *
        ///  <summary>
        /// pixaccGetPix()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/pixaccGetPix/*"/>
        ///  <param name="pixacc">[in] - </param>
        ///   <returns>pix, or NULL on error</returns>
        public static Pix pixaccGetPix(
            Pixacc pixacc)
        {
            if (pixacc == null)
            {
                throw new ArgumentNullException("pixacc cannot be Nothing");
            }

            IntPtr _Result = Natives.pixaccGetPix(pixacc.Pointer);

            if (_Result == IntPtr.Zero)
            {
                return(null);
            }

            return(new Pix(_Result));
        }
Example #4
0
        // pixacc.c (275, 1)
        // pixaccSubtract(pixacc, pix) as int
        // pixaccSubtract(PIXACC *, PIX *) as l_ok
        ///  <summary>
        /// pixaccSubtract()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/pixaccSubtract/*"/>
        ///  <param name="pixacc">[in] - </param>
        ///  <param name="pix">[in] - to be subtracted</param>
        ///   <returns>0 if OK, 1 on error</returns>
        public static int pixaccSubtract(
            Pixacc pixacc,
            Pix pix)
        {
            if (pixacc == null)
            {
                throw new ArgumentNullException("pixacc cannot be Nothing");
            }

            if (pix == null)
            {
                throw new ArgumentNullException("pix cannot be Nothing");
            }

            int _Result = Natives.pixaccSubtract(pixacc.Pointer, pix.Pointer);

            return(_Result);
        }
Example #5
0
        public static L_Dewarpa dewarpaCreateFromPixacomp(this Pixacc pixac, int useboth, int sampling, int minlines, int maxdist)
        {
            if (null == pixac)
            {
                throw new ArgumentNullException("pixac cannot be null.");
            }

            var pointer = Native.DllImports.dewarpaCreateFromPixacomp((HandleRef)pixac, useboth, sampling, minlines, maxdist);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new L_Dewarpa(pointer));
            }
        }
Example #6
0
        // pixacc.c (160, 1)
        // pixaccDestroy(ppixacc) as Object
        // pixaccDestroy(PIXACC **) as void
        ///  <summary>
        /// (1) Always nulls the input ptr.
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/pixaccDestroy/*"/>
        ///  <param name="ppixacc">[in,out] - to be nulled</param>
        public static void pixaccDestroy(
            ref Pixacc ppixacc)
        {
            IntPtr ppixaccPtr = IntPtr.Zero;        if (ppixacc != null)

            {
                ppixaccPtr = ppixacc.Pointer;
            }

            Natives.pixaccDestroy(ref ppixaccPtr);
            if (ppixaccPtr == IntPtr.Zero)
            {
                ppixacc = null;
            }
            else
            {
                ppixacc = new Pixacc(ppixaccPtr);
            };
        }