示例#1
0
 protected override Point[] GetTickLine(IScaleTickBase tick)
 {
     return(new Point[2]
     {
         this.GetTickPoint(tick, (float)this.Radius),
         this.GetTickPoint(tick, (float)(this.Radius + tick.Length))
     });
 }
示例#2
0
        protected override Point[] GetTickLine(IScaleTickBase tick)
        {
            Point tickPoint = this.GetTickPoint(tick);
            int   num       = (this.Direction != 0) ? (-tick.Length) : tick.Length;
            Point point     = (this.Orientation != Orientation.Vertical) ? new Point(tickPoint.X, tickPoint.Y + num) : new Point(tickPoint.X + num, tickPoint.Y);

            return(new Point[2]
            {
                tickPoint,
                point
            });
        }
示例#3
0
        private Point GetTickPoint(IScaleTickBase tick, float radius)
        {
            double angle = this.I_Range.ValueToAngle(tick.Value);
            double num;

            switch ((!(tick is ScaleTickMinor)) ? ((tick is ScaleTickMid) ? (tick as ScaleTickMid).Alignment : AlignmentStyle.Near) : (tick as ScaleTickMinor).Alignment)
            {
            case AlignmentStyle.Center:
                num = (double)((float)(base.TickMajor.Length - tick.Length) / 2f);
                break;

            case AlignmentStyle.Far:
                num = (double)(base.TickMajor.Length - tick.Length);
                break;

            default:
                num = 0.0;
                break;
            }
            return(Math2.ToRotatedPoint(angle, (double)(radius + (float)this.Margin) + num, this.CenterPoint));
        }
示例#4
0
        protected override Point GetTickPoint(IScaleTickBase tick)
        {
            int num = 0;

            switch ((!(tick is ScaleTickMinor)) ? ((tick is ScaleTickMid) ? (tick as ScaleTickMid).Alignment : AlignmentStyle.Near) : (tick as ScaleTickMinor).Alignment)
            {
            case AlignmentStyle.Center:
                num += (base.TickMajor.Length - tick.Length) / 2;
                break;

            case AlignmentStyle.Far:
                num += base.TickMajor.Length - tick.Length;
                break;
            }
            int num2 = this.ValueToPixels(tick.Value);
            int num3 = (this.Direction != 0) ? (base.EdgeRef - num) : (base.EdgeRef + num);

            if (this.Orientation == Orientation.Vertical)
            {
                return(new Point(num3, num2));
            }
            return(new Point(num2, num3));
        }
示例#5
0
 protected override void DrawTickLine(PaintArgs p, IScaleTickBase tick)
 {
     Point[] tickLine = this.GetTickLine(tick);
     p.Graphics.DrawLine(p.Graphics.Pen(tick.Color, (float)tick.Thickness), tickLine[0], tickLine[1]);
 }
示例#6
0
 protected override Point GetTickPoint(IScaleTickBase tick)
 {
     return(this.GetTickPoint(tick, (float)this.Radius));
 }
示例#7
0
 void IScaleDisplay.DrawTickLine(PaintArgs p, IScaleTickBase tick)
 {
     this.DrawTickLine(p, tick);
 }
示例#8
0
 protected abstract void DrawTickLine(PaintArgs p, IScaleTickBase tick);
示例#9
0
 protected abstract Point[] GetTickLine(IScaleTickBase tick);
示例#10
0
 protected abstract Point GetTickPoint(IScaleTickBase tick);