private voidDrawLastImage()
{float rate = dpi / 96;int reWidth = (int)(Width *rate);int reHeight = (int)(Height *rate);using (Bitmap allBmp = newBitmap(
reWidth, reHeight, PixelFormat.Format32bppArgb))
{
allBmp.SetResolution(dpi,dpi);using (Graphics allGraphics =Graphics.FromImage(allBmp))
{
allGraphics.InterpolationMode=InterpolationMode.HighQualityBicubic;
allGraphics.SmoothingMode=SmoothingMode.AntiAlias;
allGraphics.DrawImage(
BackgroundImage,
Point.Empty);
DrawOperate(allGraphics);
allGraphics.Flush();
Rectangle reSelectImageRect= newRectangle();
reSelectImageRect.X= (int)(SelectImageRect.X *rate);
reSelectImageRect.Y= (int)(SelectImageRect.Y *rate);
reSelectImageRect.Width= (int)(SelectImageRect.Width *rate);
reSelectImageRect.Height= (int)(SelectImageRect.Height *rate);
Bitmap bmp= newBitmap(
reSelectImageRect.Width,
reSelectImageRect.Height,
PixelFormat.Format32bppArgb);
bmp.SetResolution(dpi, dpi);
Graphics g=Graphics.FromImage(bmp);
g.DrawImage(
allBmp,0,0,
reSelectImageRect,
GraphicsUnit.Pixel);
g.Flush();
g.Dispose();
_image=bmp;
}
}
}