Exemplo n.º 1
0
 public LineScale(CanvasParam _cp, AxisLineParam lp) : base(_cp)
 {
     cp          = _cp;
     this.lp     = lp;
     StartPointX = cp.OriginX;
     StartPointY = cp.OriginY;
     ScaleCount  = (lp.MaxScale - lp.MinScale) / lp.CellScale;            //计算多少刻度
     Hlength     = cp.HorizontalLength - cp.ArrowLength - cp.BlankLegend; //减去箭头的长度
     Vlength     = cp.VerticalLength - cp.ArrowLength - cp.BlankLegend;
 }
Exemplo n.º 2
0
        public void coordinate()
        {
            canvasparam.factory          = factory;
            canvasparam.dwFactory        = dwfactory;
            canvasparam.ArrowLength      = 6;
            canvasparam._renderTarget    = _renderTarget;
            canvasparam.OriginX          = 30;
            canvasparam.OriginY          = 300;
            canvasparam.VerticalLength   = 280;
            canvasparam.HorizontalLength = 600;
            canvasparam.BlankLegend      = 30;
            canvasparam.ScaleLength      = 5;
            canvasparam.ScalePadding     = 0;
            canvasparam.showcursordata   = ShowCursorData.Hide;
            canvasparam.showdatapoint    = ShowDataPoint.Hide;
            AxisLineParam bHParam = new AxisLineParam();

            bHParam.Direction       = LineDirection.Horizontal;
            bHParam.MaxScale        = 10000;
            bHParam.MinScale        = 0;
            bHParam.CellScale       = 1000;
            bHParam.showVirtualLine = ShowVirtualLine.Visible;
            bHParam.Caption         = "Time(Min)";
            bHParam.Attributes      = "Time";
            BaseLine bH = new AxisLine(canvasparam, bHParam);

            bH.color = color;
            //bH.Draw();

            AxisLineParam bVParam = new AxisLineParam();

            bVParam.lineVisible     = LineVisiable.Visible;
            bVParam.Direction       = LineDirection.Vertical;
            bVParam.showVirtualLine = ShowVirtualLine.Visible;
            bVParam.MaxScale        = 40;
            bVParam.MinScale        = -40;
            bVParam.CellScale       = 10;
            bVParam.Caption         = "Temp";
            bVParam.Attributes      = "Temp";
            BaseLine bV = new AxisLine(canvasparam, bVParam);

            bV.color = color;
            //bV.Draw();

            AxisLineParam PowerParam = new AxisLineParam();

            PowerParam.lineVisible     = LineVisiable.Visible;
            PowerParam.Direction       = LineDirection.Vertical;
            PowerParam.showVirtualLine = ShowVirtualLine.Hide;
            PowerParam.lineLocation    = LineLocation.Right;
            PowerParam.MaxScale        = 500;
            PowerParam.MinScale        = 0;
            PowerParam.CellScale       = 100;
            PowerParam.Caption         = "功率";
            PowerParam.Attributes      = "Power";
            PowerParam.Index           = 0;
            BaseLine bPower = new AxisLine(canvasparam, PowerParam);

            bPower.color = color;
            //bPower.Draw();
            listBaseLine.Add(bV);
            listBaseLine.Add(bH);
            listBaseLine.Add(bPower);
            listAxisParam.Add(bVParam);
            listAxisParam.Add(bHParam);
            listAxisParam.Add(PowerParam);
        }
Exemplo n.º 3
0
 public AxisLine(CanvasParam _cp, AxisLineParam axislineparam) : base(_cp)
 {
     cp = _cp;
     this.axislineparam = axislineparam;
 }