我已经想过如何用纹理填充多边形,但只是作为一个平铺(我会做的,不是有平铺的图像,用所需的图片填充多边形)。
private void frontWall1()
{
Graphics gr = playerView.CreateGraphics();
//Front Wall 1
Point fw1a = new Point(99, 61); Point fw1b = new Point(382, 61); Point fw1c = new Point(382, 259); Point fw1d = new Point(99, 259);
Point[] fw1 = { fw1a, fw1b, fw1c, fw1d };
gr.DrawPolygon(bluepen, fw1);
gr.FillPolygon(blueBrush, fw1, newFillMode);
}
有了这面墙,为它贴上一个纹理来展示一面墙。关于如何使用它的任何想法?我无法处理平铺图片,因为我正在使用它来制作一个假的3D地下城第一人称,一些墙需要这个点。