Example #1
0
        public Stimulations(int width, int height, ushort stiNumber)
        {
            image1 = new Bitmap(width, height);
            g1     = Graphics.FromImage(image1);
            //使绘图质量最高,即消除锯齿
            g1.SmoothingMode      = SmoothingMode.AntiAlias;
            g1.InterpolationMode  = InterpolationMode.HighQualityBicubic;
            g1.CompositingQuality = CompositingQuality.HighQuality;
            g1.TextRenderingHint  = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
            this.width            = width;
            this.height           = height;
            this.stiNumber        = stiNumber;

            blockWidth  = 100f;
            blockHeight = 40f;

            afd      = new ArrayForDraw(width, height, 1);
            painting = afd.GiveValueForRandow();



            start       = (int)DegreeToValue(-100);
            end         = (int)DegreeToValue(100);
            positionNow = start;
        }
Example #2
0
 public void setBarWidth(float value)
 {
     barWidth = (int)(value / 360 * width);
     afd      = new ArrayForDraw(barWidth, height, 2);
     bar      = afd.GiveValueForRandow();
 }