
前田稔(Maeda Minoru)の超初心者のプログラム入門
![]()
![]()
public Bitmap Bmp;
public Bitmap RBmp;
RBmp = new Bitmap(Bmp);
RBmp.RotateFlip(RotateFlipType.Rotate180FlipNone);
|
public void RView(Graphics g, int n, int x, int y)
{
int num;
num = 49 - n;
if (num < 0) num = 48;
Rectangle des = new Rectangle(x, y, W, H);
Rectangle sou = new Rectangle((num%N)*W,(num/N)*H,W,H);
if (RBmp != null)
g.DrawImage(RBmp,des,sou,GraphicsUnit.Pixel);
}
|
private void MyHandler(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
if (App.Bmp == null) Application.Exit();
App.View(g,5,10,10);
App.RView(g,5,60,10);
App.View(g,30,150,10);
App.RView(g,30,210,10);
}
|
![]()
private void MyHandler(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
if (App.Bmp == null) Application.Exit();
for(int i=0; i<10; i++)
App.RView(g,i+30,i*15,100);
}
|
![]()