Пример #1
0
        public Overlay(PolygonControl container, int division, Color scaleColor) : this(container, scaleColor)
        {
            OverlayHands newHands = new OverlayHands(container, division);

            HandSets.Add(division, newHands);

            //ScaleColor = scaleColor;
            //Circles = new CircleSet(Container);
            //Circles.Add(container.radius - overlayMargin);

            //Circles.Add(container.radius - overlayMargin, new SolidBrush(WeightedColor(ScaleColor, 0.2f)), new Pen(WeightedColor(ScaleColor), 2));
            //Circles.Add(3f, null, new Pen(WeightedColor(ScaleColor, 0.5f), 2));

            //TicksAndLables = new AngledItemSet(container);
            //SetScale();

            //Scale = new Dialer(container, true, container.radius -3, 15, 15, 5, -1, 30, 1f, Color.FromArgb(0, Color.Yellow), Color.Transparent,
            //    Color.FromArgb(0, Color.Turquoise), Color.FromArgb(127, Color.LightSkyBlue), Color.FromArgb(127, Color.Orange));
            //ShowScale = true;
            //Scale.Circles.Add(1f, null, new Pen(WeightedColor(ScaleColor, 0.5f), 2));

            //Scale = new Dialer(container, true, radius - Dialer.DefaultLoopWidthInPoints, radius, 1,
            //    WeightedColor(ScaleColor, 1f), Color.Transparent, WeightedColor(ScaleColor, 0.8f),
            //    WeightedColor(Dialer.DefaultLoopColor, 0.5f), WeightedColor(Dialer.DefaultLabelColor));

            //AddOrShowHands(division, 1f);
        }
Пример #2
0
        //public void Resize(float factor)
        //{
        //    foreach (CircleItem circle in Circles)
        //    {
        //        if (circle.radius != Math.Round(circle.radius))
        //            circle.radius *= factor;
        //    }

        //    foreach (AngledItem item in TicksAndLables)
        //    {
        //        item.Distance *= factor;
        //    }
        //}

        //public void SetScale()
        //{
        //    float scaleDistance = Container.radius - overlayMargin;
        //Circles.Add(InsideRadius, Brushes.AliceBlue, Pens.White);

        //TicksAndLables.AddTicks(InsideRadius, -0.4f, new Pen(ScaleColor, 3), 15);
        //TicksAndLables.AddTicks(InsideRadius, -0.2f, new Pen(ScaleColor, 2), 5, 15);
        //TicksAndLables.AddTicks(InsideRadius, -0.2f, new Pen(ScaleColor, 1), 2, 5);

        //List<string> signs = new List<string>();
        //for (char c = 'a'; c < 'm'; c++)
        //{
        //    signs.Add(c.ToString());
        //}

        //TicksAndLables.AddLables(signs, new Font("AstroGadget", 24f, FontStyle.Bold), new SolidBrush(IsTransparent ? Color.FromArgb(0, Color.Crimson) : Color.Crimson),
        //    InsideRadius + 0.1f, SignOffset, 90f, null, null);
        //TicksAndLables.AddLables(new Font("AstroGadget", 9f, FontStyle.Regular), new SolidBrush(WeightedColor(ScaleColor, 0.5f)),
        //    InsideRadius - 0.9f, 15f, null, null);
        //}

        public void AddOrShowHands(int divisions, float orb)
        {
            if (!HandSets.ContainsKey(divisions))
            {
                OverlayHands hands = new OverlayHands(Container, divisions);
                HandSets.Add(divisions, hands);
            }
            else
            {
                if (!HandSets[divisions].IsVisble)
                {
                    HandSets[divisions].IsVisble = true;
                }
            }

            HandSets[divisions].Scheme.Orb = orb;
        }
Пример #3
0
 public OverlayHands(OverlayHands old)
     : this(old.Container, old.Hands.Repetition)
 {
     IsVisble    = old.IsVisble;
     AngleOffset = old.AngleOffset;
 }