コード例 #1
0
        void DisplayZoomBox(int nX)
        {
            Int64 Low         = -1;
            Int64 High        = -1;
            int   SampleCount = -1;

            DetermineNewFrequencyRange(nX, ref Low, ref High, ref SampleCount);

            int X1 = GraphConfig.GetXFromFrequency(Low);
            int X2 = GraphConfig.GetXFromFrequency(High);

            if (X1 < GraphConfig.LeftBorder)
            {
                X1 = GraphConfig.LeftBorder;
            }

            if (X2 > Size.Width - GraphConfig.RightBorder)
            {
                X2 = Size.Width - GraphConfig.RightBorder;
            }


            int nWidh = X2 - X1;



            HUDGraphics.Clear(Color.Transparent);
            Brush brush = new SolidBrush(Color.FromArgb(10, 255, 0, 0));

            //Brush brushText = new SolidBrush(Color.FromArgb(10, 255, 0, 0));

            HUDGraphics.FillRectangle(brush, X1, GraphConfig.UpBorder, nWidh, Size.Height - GraphConfig.LowBorder - GraphConfig.UpBorder);
            Pen RecPen = new Pen(Color.FromArgb(100, 255, 0, 0), 2);

            HUDGraphics.DrawRectangle(RecPen, X1, GraphConfig.UpBorder, nWidh, Size.Height - GraphConfig.LowBorder - GraphConfig.UpBorder);

            //HUDGraphics.DrawString("F1 & F2 to ajust size", new Font(FontFamily.GenericMonospace, 10), brushText, new PointF(X1, Size.Height - GraphConfig.LowBorder-20));
            //ForeGroundImageGraphics.
            this.Invalidate();
            //ImageUpdate();
        }
コード例 #2
0
        void DisplayZoomBox(int nX)
        {
            Int64 Low         = -1;
            Int64 High        = -1;
            int   SampleCount = -1;

            DetermineNewFrequencyRange(nX, ref Low, ref High, ref SampleCount);

            int X1 = GraphConfig.GetXFromFrequency(Low);
            int X2 = GraphConfig.GetXFromFrequency(High);

            if (X1 < GraphConfig.LeftBorder)
            {
                X1 = GraphConfig.LeftBorder;
            }

            if (X2 > Size.Width - GraphConfig.RightBorder)
            {
                X2 = Size.Width - GraphConfig.RightBorder;
            }


            int nWidh = X2 - X1;



            ForeGroundImageGraphics.Clear(Color.Transparent);
            Brush brush = new SolidBrush(Color.FromArgb(50, 255, 0, 0));

            //Brush brushText = new SolidBrush(Color.FromArgb(50, 255, 0, 0));

            ForeGroundImageGraphics.FillRectangle(brush, X1, GraphConfig.UpBorder, nWidh, Size.Height - GraphConfig.LowBorder - GraphConfig.UpBorder);
            //ForeGroundImageGraphics.DrawString("F1 & F2 to ajust size", new Font("Arial", 10), brushText, new PointF(X1, Size.Height - GraphConfig.LowBorder));
            //ForeGroundImageGraphics.
            Image = ForeGroundImageBitmap;
        }