Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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);
        }
Beispiel #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));
        }
Beispiel #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));
            }
        }
Beispiel #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));
            }
        }