C#与图形处理(怎么旋转它?) ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpguide/html/_gdiplus_rotating_reflecting_and_skewing_images_usecsharp.htm系统自己带的帮助 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 pictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipNone);//绕着中心旋转90度pictureBox1.Refresh();//刷新显示pictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipX);//绕着X轴旋转90度pictureBox1.Refresh();//刷新显示pictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipY);//绕着Y轴旋转90度pictureBox1.Refresh();//刷新显示pictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipXY);//绕着XY轴旋转90度pictureBox1.Refresh();//刷新显示每次旋转后要进行刷新。 public int rotateType = 1;private void menuItemRotate_Click(object sender, System.EventArgs e){ RotateForm frm = new RotateForm(); if(frm.ShowDialog() == DialogResult.OK) { switch(frm.rotateType) { case 1: image.RotateFlip(RotateFlipType.Rotate180FlipNone); break; case 2: image.RotateFlip(RotateFlipType.Rotate180FlipX); break; case 3: image.RotateFlip(RotateFlipType.Rotate180FlipXY); break; case 4: image.RotateFlip(RotateFlipType.Rotate180FlipY); break; case 5: image.RotateFlip(RotateFlipType.Rotate270FlipNone); break; case 6: image.RotateFlip(RotateFlipType.Rotate270FlipX); break; case 7: image.RotateFlip(RotateFlipType.Rotate270FlipXY); break; case 8: image.RotateFlip(RotateFlipType.Rotate270FlipXY); break; case 9: image.RotateFlip(RotateFlipType.Rotate90FlipNone); break; case 10: image.RotateFlip(RotateFlipType.Rotate90FlipX); break; case 11: image.RotateFlip(RotateFlipType.Rotate90FlipXY); break; case 12: image.RotateFlip(RotateFlipType.Rotate90FlipY); } } rect.Width = image.Width; rect.Height = image.Height; dirty = true; this.Refresh();} 上面的方法我试了,好用!1.我的图片是从Oracle9读出,在.NET 水晶报表里显示的,能转吗?2.能实现物理旋转吗? 下次就不用转了! 怎么把水晶报表的图片字段(Field1)取出来啊?King=crBlobFieldObject 求教正则 C+ 用线程刷帧,有时候很卡,会延迟. GridView 与 DropDownList 结合问题,纯后台编码 关于验证码控件的问题 C# 里的{}里面的数字什么含义 比如{0}? Visual Studio 2005 制作安装程序时如何设置为在安装之前不检查现有版本? C#调用 C++ Dll 的函数问题!! TextBox(RichTextBox)如何实现"单击"、"双击"等事件都是一直选中文本,最重要的是不要闪烁 找到的点代码 那里有有关分布式计算和多层应用的C#的资料? 小问题! Pocket PC端如何运用证书和Web Service进行认证???
pictureBox1.Refresh();//刷新显示
pictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipX);//绕着X轴旋转90度
pictureBox1.Refresh();//刷新显示
pictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipY);//绕着Y轴旋转90度pictureBox1.Refresh();//刷新显示
pictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipXY);//绕着XY轴旋转90度pictureBox1.Refresh();//刷新显示
每次旋转后要进行刷新。
{
RotateForm frm = new RotateForm();
if(frm.ShowDialog() == DialogResult.OK)
{
switch(frm.rotateType)
{
case 1:
image.RotateFlip(RotateFlipType.Rotate180FlipNone);
break;
case 2:
image.RotateFlip(RotateFlipType.Rotate180FlipX);
break;
case 3:
image.RotateFlip(RotateFlipType.Rotate180FlipXY);
break;
case 4:
image.RotateFlip(RotateFlipType.Rotate180FlipY);
break;
case 5:
image.RotateFlip(RotateFlipType.Rotate270FlipNone);
break;
case 6:
image.RotateFlip(RotateFlipType.Rotate270FlipX);
break;
case 7:
image.RotateFlip(RotateFlipType.Rotate270FlipXY);
break;
case 8:
image.RotateFlip(RotateFlipType.Rotate270FlipXY);
break;
case 9:
image.RotateFlip(RotateFlipType.Rotate90FlipNone);
break;
case 10:
image.RotateFlip(RotateFlipType.Rotate90FlipX);
break;
case 11:
image.RotateFlip(RotateFlipType.Rotate90FlipXY);
break;
case 12:
image.RotateFlip(RotateFlipType.Rotate90FlipY);
}
}
rect.Width = image.Width;
rect.Height = image.Height;
dirty = true;
this.Refresh();
}
1.我的图片是从Oracle9读出,在.NET 水晶报表里显示的,能转吗?
2.能实现物理旋转吗? 下次就不用转了!