Пример #1
0
        private void CircularCoordArc(ArcSegment arc, double ratio, double radius)
        {
            double angle = CircularConverter.CalcScaleAngle(ratio);

            arc.Point      = CircularConverter.CircularCoord(angle, radius);
            arc.IsLargeArc = (angle > System.Math.PI);
        }
Пример #2
0
        public void AddScale(float norm_value, Brush stroke, float begin_radius, float end_radius)
        {
            double ratio = Math.Abs(norm_value);
            double angle = CircularConverter.CalcScaleAngle(ratio);
            Point  p1    = CircularConverter.CircularCoord(angle, begin_radius * meter_radius);
            Point  p2    = CircularConverter.CircularCoord(angle, end_radius * meter_radius);
            Line   line  = new Line();

            line.Stroke              = stroke;
            line.StrokeThickness     = 6;
            line.Margin              = arc_path_index.Margin;
            line.HorizontalAlignment = arc_path_index.HorizontalAlignment;
            line.VerticalAlignment   = arc_path_index.VerticalAlignment;
            line.X1 = p1.X;
            line.Y1 = p1.Y;
            line.X2 = p2.X;
            line.Y2 = p2.Y;
            main_canvas.Children.Add(line);
            AdditionalList.Add(line);
        }
Пример #3
0
        private void CircularCoordLine(LineSegment line, double ratio, double radius)
        {
            double angle = CircularConverter.CalcScaleAngle(ratio);

            line.Point = CircularConverter.CircularCoord(angle, radius);
        }