Esempio n. 1
0
        public static int ccbaGenerateSPGlobalLocs(this CCBorda ccba, int ptsflag)
        {
            if (null == ccba)
            {
                throw new ArgumentNullException("ccba cannot be null.");
            }

            return(Native.DllImports.ccbaGenerateSPGlobalLocs((HandleRef)ccba, ptsflag));
        }
Esempio n. 2
0
        // CCBORDA accessors
        public static int ccbaGetCount(this CCBorda ccba)
        {
            if (null == ccba)
            {
                throw new ArgumentNullException("ccba cannot be null.");
            }

            return(Native.DllImports.ccbaGetCount((HandleRef)ccba));
        }
Esempio n. 3
0
        public static int ccbaStepChainsToPixCoords(this CCBorda ccba, int coordtype)
        {
            if (null == ccba)
            {
                throw new ArgumentNullException("ccba cannot be null.");
            }

            return(Native.DllImports.ccbaStepChainsToPixCoords((HandleRef)ccba, coordtype));
        }
Esempio n. 4
0
        // CCBORDA addition
        public static int ccbaAddCcb(this CCBorda ccba, CCBord ccb)
        {
            if (null == ccba ||
                null == ccb)
            {
                throw new ArgumentNullException("ccba, ccb cannot be null.");
            }

            return(Native.DllImports.ccbaAddCcb((HandleRef)ccba, (HandleRef)ccb));
        }
Esempio n. 5
0
        // SVG output
        public static int ccbaWriteSVG(string filename, CCBorda ccba)
        {
            if (null == ccba ||
                string.IsNullOrWhiteSpace(filename))
            {
                throw new ArgumentNullException("filename, ccba cannot be null.");
            }

            return(Native.DllImports.ccbaWriteSVG(filename, (HandleRef)ccba));
        }
Esempio n. 6
0
        public static int ccbaWriteStream(IntPtr fp, CCBorda ccba)
        {
            if (null == ccba ||
                IntPtr.Zero == fp)
            {
                throw new ArgumentNullException("fp, ccba cannot be null.");
            }

            return(Native.DllImports.ccbaWriteStream(fp, (HandleRef)ccba));
        }
Esempio n. 7
0
        public static void ccbaDestroy(this CCBorda pccba)
        {
            if (null == pccba)
            {
                throw new ArgumentNullException("pccba cannot be null");
            }

            var pointer = (IntPtr)pccba;

            Native.DllImports.ccbaDestroy(ref pointer);
        }
Esempio n. 8
0
        public static string ccbaWriteSVGString(string filename, CCBorda ccba)
        {
            if (null == ccba ||
                string.IsNullOrWhiteSpace(filename))
            {
                throw new ArgumentNullException("filename, ccba cannot be null.");
            }

            var pointer = Native.DllImports.ccbaWriteSVGString(filename, (HandleRef)ccba);

            return(Marshal.PtrToStringAnsi(pointer));
        }
Esempio n. 9
0
        public static CCBord ccbaGetCcb(this CCBorda ccba, int index)
        {
            if (null == ccba)
            {
                throw new ArgumentNullException("ccba cannot be null.");
            }

            var pointer = Native.DllImports.ccbaGetCcb((HandleRef)ccba, index);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new CCBord(pointer));
            }
        }
Esempio n. 10
0
        public static Pix ccbaDisplayImage2(this CCBorda ccba)
        {
            if (null == ccba)
            {
                throw new ArgumentNullException("ccba cannot be null.");
            }

            var pointer = Native.DllImports.ccbaDisplayImage2((HandleRef)ccba);

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