try
{
int width = this
int height = this
Graphics g = this
g
Bitmap bitmap = new Bitmap(width
int x =
while (x <= width /
{
for (int i =
{
bitmap
}
for (int i =
{
bitmap
MyBitmap
}
x++;
this
g
System
}
}
catch (Exception ex)
{
MessageBox
}
}
七
原理: 計算圖像位置和高度後以寬度的一半為軸進行對換左右半邊的圖像
代碼:
private void button
{
//以左右反轉方式顯示圖像
try
{
int width = this
int height = this
Graphics g = this
g
for (int j =
{
g
int i = Convert
Rectangle DestRect = new Rectangle(width /
Rectangle SrcRect = new Rectangle(
g
System
}
}
catch (Exception ex)
{
MessageBox
}
}
[
From:http://tw.wingwit.com/Article/program/net/201311/14931.html