我试图旋转图片以使其看起来像3D效果,我使用的是Graphics.DrawImage(Image,Point []),我在修复新点时遇到了一个真正的问题
private void button1_Click_1(object sender, EventArgs e)
{
Point[] destinationPoints = {
new Point(200, 20), // destination for upper-left point of
// original
new Point(110, 100), // destination for upper-right point of
// original
new Point(250, 30)}; // destination for lower-left point of
// original
if (pictureBox.Image != null)
{
Image image = new Bitmap(this.imageFiles[(this.selected) % this.imageFiles.Length]);
g = Graphics.FromImage(pictureBox.Image);
// pictureBox.Image = null;
// Draw the image unaltered with its upper-left corner at (0, 0).
// g.DrawImage(image,150, 150);
// Draw the image mapped to the parallelogram.
g.Clear(pictureBox.BackColor);
g.DrawImage(image, destinationPoints);
pictureBox.Refresh();
// Bitmap image2 = new Bitmap(image);
// image = RotateImage(image2,0 );
// g.Dispose();
//pictureBox.Invalidate();
// pictureBox.Image = image2;
};
有任何帮助吗? Example :