你们好。辛苦你们了。
按你们的回复,我修改并测试了一下。8#解决了。9#还是不行。
7#中的大部分问题解决了,只有一个还是老样子,就是清除内部还是清除外部,代码如下:
public void clearInternal()
{
imageDoChange();
// Specify a pixel in the upper left of the displayed image
// LeadPoint pt = new LeadPoint(imageViewer1.Image.ImageWidth / 8, imageViewer1.Image.ImageHeight / 8);
// Adjust the point in case the view perspective is not TopLeft
// pt = imageViewer1.Image.PointToImage(RasterViewPerspective.TopLeft, pt);
// Get the color of the specified pixel
RasterColor regionColor = RasterColor.White;// imageViewer1.Image.GetPixelColor(pt.Y, pt.X);
// Create a region that includes all pixels of that color
// imageViewer1.Image.AddColorToRegion(regionColor, RasterRegionCombineMode.Set);
// Fill the region with white
FillCommand fill = new FillCommand(regionColor);
fill.Run(imageViewer1.Image);
imageViewer1.Image.MakeRegionEmpty();
changedFlag = true;
}
9#还是不能保存。DEMO我再发一次给 keller.zhang,请帮忙解决。谢谢。 |