Beispiel #1
0
        public void SetScale(double sS)
        {
            scaleGreen  = 0;
            scaleYellow = 0;
            scaleOrange = 0;
            scaleRed    = AHUtil.GetMapScale(maxRange);
            if (sS >= .25d)
            {
                // draw orange circle
                scaleOrange = AHUtil.GetMapScale(AHUtil.GetDistanceFor(.25d * (1d / sS), maxRange));
            }
            if (sS >= .5d)
            {
                // draw yellow circle
                scaleYellow = AHUtil.GetMapScale(AHUtil.GetDistanceFor(.5d * (1d / sS), maxRange));
            }
            if (sS >= .75d)
            {
                // draw green circle
                scaleGreen = AHUtil.GetMapScale(AHUtil.GetDistanceFor(.75d * (1d / sS), maxRange));
            }
            if (sS == 1d)
            {
                scaleGreen  = AHUtil.GetMapScale(AHUtil.GetDistanceFor(75, maxRange));
                scaleYellow = AHUtil.GetMapScale(AHUtil.GetDistanceFor(50, maxRange));
                scaleOrange = AHUtil.GetMapScale(AHUtil.GetDistanceFor(25, maxRange));
            }

            scale = sS;
        }