📅  最后修改于: 2022-03-11 14:49:18.446000             🧑  作者: Mango
Texture2D rect = new Texture2D(graphics.GraphicsDevice, 80, 30);
Color[] data = new Color[80*30];
for(int i=0; i < data.Length; i++) data[i] = Color.Chocolate;
rect.SetData(data);
Vector2 coor = new Vector2(10, 20);
spriteBatch.Draw(rect, coor, Color.White);