Exemple #1
0
        public void SettingCanvas(string sFileName, Canvas canvas)
        {
            double timex, timey;

            string[] aryLine;
            int      max, idx;

            m_Canvas = canvas;
            timex    = m_Canvas.Width / 210.0;
            timey    = m_Canvas.Height / 297.0;
            if (timex < timey)
            {
                m_dTime = timex;
            }
            else
            {
                m_dTime = timey;
            }
            m_dBaseX = 0;
            m_dBaseY = 0;

            aryLine = m_libCmn.LoadFileLineSJIS(sFileName);

            m_libCanvas.setFontSize(24.0);
            m_libCanvas.setFontName("MS ゴシック");
            m_libCanvas.setFontNomal();
            m_libCanvas.setBrushFill(-1, -1, -1);
            m_libCanvas.setBrushStroke(0, 0, 0, 1, 0);
            m_libCanvas.setBrushText(0, 0, 0);

            max = aryLine.Length;
            for (idx = 0; idx < max; idx++)
            {
                analysisLine(aryLine[idx]);
            }
        }
Exemple #2
0
        private void drawWakuImage(int lineidx, int topx, int topy, string sWakuFileName)
        {
            int    len;
            string sEnvFileName;
            string sName;

            string[] aryLine;
            int      max, idx;

            string[] ary;
            double   dXBase, dYBase;
            double   sx, sy, ex, ey;
            double   wd, hi;

            dXBase       = m_dXSize;
            dYBase       = m_dYSize;
            len          = sWakuFileName.Length;
            sEnvFileName = sWakuFileName.Substring(0, len - 3) + "env";
            aryLine      = m_libCmn.LoadFileLineSJIS(sEnvFileName);
            if (11 <= aryLine.Length)
            {
                ary    = aryLine[10].Split(' ');
                dXBase = m_libCmn.StrToDouble(ary[0]);
                dYBase = m_libCmn.StrToDouble(ary[1]);
            }
            calcBaseTimeOffset(topx, topy, dXBase, dYBase);

            if (lineidx == m_nSlctIdx)
            {
                m_libCanvas.setBrushStroke(0xff, 0, 0, 1.0, 0);
            }
            else
            {
                m_libCanvas.setBrushStroke(0, 0, 0, 1.0, 0);
            }
            sx = 0;
            sy = 0;
            ex = dXBase;
            ey = dYBase;
            drawBoxs(sx, sy, ex, ey);
            sName = System.IO.Path.GetFileName(sWakuFileName);
            len   = sName.Length;
            sName = sName.Substring(0, len - 4);
            sx    = topx;
            sy    = topy + Constants.ONEBLOCKSIZE;
            m_libCanvas.setBrushStroke(0, 0, 0, 1.0, 0);
            m_libCanvas.setFontSize(20);
            m_libCanvas.drawYokoStrg(canvasWakuImage, sx, sy, 0.0, 1.0, sName);

            aryLine = m_libCmn.LoadFileLineSJIS(sWakuFileName);
            max     = aryLine.Length;
            for (idx = 0; idx < max; idx++)
            {
                ary = aryLine[idx].Split(',');
                if (14 <= ary.Length)
                {
                    sx = m_libCmn.StrToDouble(ary[3]);
                    sy = m_libCmn.StrToDouble(ary[4]);
                    wd = m_libCmn.StrToDouble(ary[5]);
                    hi = m_libCmn.StrToDouble(ary[6]);
                    ex = sx + wd;
                    ey = sy + hi;
                    drawBoxs(sx, sy, ex, ey);
                }
            }
        }