我想从洪水福彩12选5走势图算法中获取点,是否有任何洪水福彩12选5走势图方法返回已福彩12选5走势图的点?
- 我在圆中有一个矩形,并且该矩形被一条线分隔,并且如果用户单击该矩形的任何部分,我将获得单击的鼠标点,并且我想为该矩形的单击部分着色。图像
- 我也想保存福彩12选5走势图的色点以备将来使用。
- 我在C#中使用泛洪福彩12选5走势图算法实现了代码,但是它没有按预期运行,因为我遇到了内存不足异常,我无法找到代码的问题所在。
code:
void FillZone(Bitmap image,int initialX, int initialY,Color fillColor,Color boundaryColor,List<Point> savePoint)
{
Stack<Point> points=new Stack<Point>();
points.Push(new Point(initialX,initialY));
while(points.Count>0)
{
Point currentPoin=poins.Pop();
int x=currentPoin.X;
int y=currentPoin.Y;
if((x>0&& x<pictureBoxImage.Width)&&(y>0&&y<pictureBoxImage.Height))
{
Color current=image.GetPixel(x,y);
if((current!=boundaryColor))&&(current!=fillColor))
{
image.SetPixel(x,y,fillColor);
savePoints.Add(new Point(x,y));
points.Push(new Point(x+1,y));
points.Push(new Point(x-1,y));
points.Push(new Point(x,y-1));
points.Push(new Point(x,y+1));
}
}
}
}
private void MenuItem_Select_Click(object sender,EventArgs e)
{
Point p=new Point();
p.X=m_right_button_X1;
p.Y=m_right_button_Y1;
Bitmap pic=(Bitmap)pictureBoxImage.Image.Clone();
List<Point>regionPoints=new List<Point>();
FillZone(pic,p.X,p.Y,Color.Red,Color.Black,regionPoints);
}
Last edited: