// C# 程序
Rectangle rect = new Rectangle(Point.Empty, targetWindow.ClientSize);
using (Surface rt = device.CreateRenderTarget(rect.Width, rect.Height,
Format.X8R8G8B8, MultiSampleType.None, 0, false))
{
using (Surface backSurface = device.GetBackBuffer(0, 0, BackBufferType.Mono))
{
device.StretchRectangle(backSurface, rect, rt, rect, TextureFilter.None);
}
using (Surface surface = Device.CreateOffscreenPlainSurface(rect.Width, rect.Height,
Format.X8R8G8B8, Pool.SystemMemory))
{
device.GetRenderTargetData(rt, surface);
using (Stream stream = SurfaceLoader.SaveToStream(ImageFileFormat.Bmp, surface))
{
result = new Bitmap(stream);
}
}
}
08-11
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交