绘制一个平行四边形是很好的支持与Graphics.DrawImage:
Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height);
using (Graphics gr = new Graphics.FromImage(destImage))
{
Point[] destPts = new Point[] { new PointF(x1, y1),
new PointF(x2, y2), new PointF(x4, y4)};
gr.DrawImage(srcImage, destPts);
怎么样,你是做4点(很明显,以下是不支持的,但是这是被通缉):
Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height);
using (Graphics gr = new Graphics.FromImage(destImage))
{
Point[] destPts = new Point[] { new PointF(x1, y1), new PointF(x2, y2),
new PointF(x3, y3), new PointF(x4, y4)};
gr.DrawImage(srcImage, destPts);
}
最近的我能找到的是this information,这是非常laggy。
通常你会用一个3x3矩阵做到这一点,但Matrix类只允许你指定6个值,而不是9.您可能能够做到这一点的直接X.
当3D工具将如何处理它想...试着画一个半的三角形,然后另一个三角形的另一半。所以,如果你有点A,B,C,&d;你会画(用裁剪平面)A,B,C,然后B,C,d,或类似的东西。