示例#1
0
        public void GenerateGrid()
        {
            byte[]   bRes     = System.Text.Encoding.ASCII.GetBytes("300".ToCharArray());
            string[] parts    = FileName.StrData.Split('.');
            string   axesFile = parts[0] + "_AXES." + parts[1];

            byte[] byte_fileName = Encoding.ASCII.GetBytes(axesFile.ToCharArray());

            char[] result = new char[100];

            byte[] bResult = System.Text.Encoding.ASCII.GetBytes(result);

            PythonFunctions.PyCall(PythonModuleName.ByteData,
                                   PythonAxesFunction.ByteData,
                                   bResult, 11,
                                   XL.ByteData, XU.ByteData, YL.ByteData, YU.ByteData,
                                   RAxisColor.ByteData, GAxisColor.ByteData, BAxisColor.ByteData,
                                   AAxisColor.ByteData, bRes,
                                   ResourceFolder.ByteData, byte_fileName);

            for (int j = 0; j < bResult.Length; j++)
            {
                result[j] = (char)bResult[j];
            }
        }
示例#2
0
        public void GeneratePlot(int curveNum)
        {
            byte[]   bxPoint   = Encoding.ASCII.GetBytes("2".ToCharArray());
            byte[]   bAlpha    = Encoding.ASCII.GetBytes("1".ToCharArray());
            byte[]   bRes      = Encoding.ASCII.GetBytes("300".ToCharArray());
            string[] parts     = FileName.StrData.Split('.');
            string   curveFile = parts[0] + "_" + curveNum + "." + parts[1];

            byte[] bFileName = Encoding.ASCII.GetBytes(curveFile.ToCharArray());

            char[] result = new char[100];

            byte[] bResult = Encoding.ASCII.GetBytes(result);

            PythonFunctions.PyCall(PythonModuleName.ByteData, PythonPlotFunction.ByteData,
                                   bResult, 13,
                                   Curves[curveNum].Expr.ByteData, Curves[curveNum].Var.ByteData,
                                   Curves[curveNum].XStart.ByteData, Curves[curveNum].XStop.ByteData,
                                   Curves[curveNum].XStep.ByteData,
                                   bxPoint,
                                   Curves[curveNum].RPlotColor.ByteData, Curves[curveNum].GPlotColor.ByteData,
                                   Curves[curveNum].BPlotColor.ByteData, bAlpha,
                                   bRes,
                                   ResourceFolder.ByteData, bFileName);

            for (int j = 0; j < bResult.Length; j++)
            {
                result[j] = (char)bResult[j];
            }
        }
示例#3
0
        public void GenerateEqImage()
        {
            byte[] bAlpha = System.Text.Encoding.ASCII.GetBytes("0".ToCharArray());
            byte[] bRes   = System.Text.Encoding.ASCII.GetBytes("300".ToCharArray());

            char[] result = new char[100];

            byte[] bResult = System.Text.Encoding.ASCII.GetBytes(result);

            PythonFunctions.PyCall(PythonModuleName.ByteData, PythonExprFunction.ByteData,
                                   bResult, 8,
                                   ExprString.ByteData,
                                   REqColor.ByteData, GEqColor.ByteData, BEqColor.ByteData,
                                   bAlpha, bRes,
                                   ResourceFolder.ByteData, FileName.ByteData);

            for (int j = 0; j < bResult.Length; j++)
            {
                result[j] = (char)bResult[j];
            }
        }