【发布时间】:2011-04-17 21:23:41
【问题描述】:
我想要一个行和列的位图或图片(不确定),这样说如果我设置 10 行和 10 列,那么它必须构建一个类(不确定),其行和列的宽度为 10,高度为 10这样我就可以访问任何位置并在该框/位置的任何位置设置图像我该怎么做? 提前非常感谢
有点像我通过了
private printGrid(int x, int y) {
// this function will print x rows and y columns such that each box's width is 10 px and height is 10px and also a way to modify any (x,y) in this to hold an image of 5px at later time
}
private insertImage(Image img, int x, int y) {
// inserts the image in the xth row and yth column
}
我如何在 C# 中做到这一点?
【问题讨论】:
-
您能改写一下吗?我不明白你想做什么......
-
我想要的是一张动态制作的图片,它分为行和列,每个框的宽度为 10px,高度为 10px,我应该能够在 C# 中动态地将 5px 的图像插入任何框
-
你的问题还不是很清楚,但似乎你需要的只是一个图像网格。是这样吗?你需要可视化这些图像吗?它是一个 WinForms 应用程序吗? WPF?银光? ASP.NET?如果是可视化问题,仅仅说你在使用 C# 通常是不够的。
-
是的 C# windforms 中的图像网格
标签: c# bitmap grid location image