Esempio n. 1
0
        private void panel_Paint(object sender, PaintEventArgs e)
        {
            myImage.getXView = panel.Width;  // -panel.Margin.Right;
            myImage.getYView = panel.Height; // -panel.Margin.Bottom;
            e.Graphics.Clear(Color.White);
            if (isZoomAll)
            {
                myImage.zoomExtent(e.Graphics);
            }
            else
            {
                myImage.zoomImage(e.Graphics, IIF(needZoomOut, 0, 1));
                needZoomOut = true;
            }
            this.statusStrip.Refresh();

            string imageType = "";

            if (myImage.MyImageType == 0)
            {
                imageType = "8Bits";
            }
            if (myImage.MyImageType == 1)
            {
                imageType = "24Bits";
            }
            gTransForm.onMainRefresh       += new GrayTransForm.mainRefresh(dataRefresh);
            palForm.onMainRefresh2         += new PaletteForm.mainRefreshPal(dataRefresh2);
            this.toolStripStatusLabel2.Text = myImage.MWidth.ToString() + "(w) x" + myImage.MHeight.ToString() + "(H) x" + " " + imageType;
        }
Esempio n. 2
0
 private void pictureRGB_Paint(object sender, PaintEventArgs e)
 {
     pImage.getXView = pictureRGB.Width;
     pImage.getYView = pictureRGB.Height;
     for (i = 0; i < pImage.MHeight; i++)
     {
         for (j = 0; j < pImage.MWidth; j++)
         {
             pos = i * pImage.MCWidth + 3 * j;
             pImage.ImageC[pos]     = tempImageC[pos];
             pImage.ImageC[pos + 1] = tempImageC[pos + 1];
             pImage.ImageC[pos + 2] = tempImageC[pos + 2];
         }
     }
     pImage.ImageC = tempImageC;
     pImage.putBitMapData();
     e.Graphics.Clear(Color.White);
     pImage.zoomImage(e.Graphics);
 }