Example #1
0
 private void PintaPixel(int x, int y, int valor, Boolean apagavel, Desenho c)
 {
     if (x >= 0 && x < pbGraficos.Image.Width && y >= 0 && y < pbGraficos.Image.Height)
     {
         if (!apagavel)
         {
             c.add(new Point(x, y));
         }
         Bitmap m = ((Bitmap)(pbGraficos.Image));
         m.SetPixel(x, y, cor);
         pbGraficos.Image = m;
     }
 }
Example #2
0
 void PontosCircunferĂȘncia(int x, int y, int cx, int cy, int valor, Boolean apagavel, Desenho circ)
 {
     PintaPixel(cx + x, cy + y, valor, apagavel, circ);
     PintaPixel(cx + y, cy + x, valor, apagavel, circ);
     PintaPixel(cx + y, cy - x, valor, apagavel, circ);
     PintaPixel(cx + x, cy - y, valor, apagavel, circ);
     PintaPixel(cx - x, cy - y, valor, apagavel, circ);
     PintaPixel(cx - y, cy - x, valor, apagavel, circ);
     PintaPixel(cx - y, cy + x, valor, apagavel, circ);
     PintaPixel(cx - x, cy + y, valor, apagavel, circ);
 }