Hi,
I have another problem again. I’ve seen example code which demonstrate on saving a screenshot of a map into BMP (and BPW) file, something like this:
1.
Rectangle rDrawingMap =
new
Rectangle(0, 0, winformsMap1.Width, winformsMap1.Height);
2.
using
(bitmap =
new
Bitmap(rDrawingMap.Width, rDrawingMap.Height))
3.
{
4.
winformsMap1.DrawToBitmap(bitmap, rDrawingMap);
5.
6.
//Saves the bitmap for the current extent of the map.
7.
bitmap.Save(@
“f:\data\mymap.bmp”
);
8.
}
I’ve made several function on my application, each of function when it’s called it will show map in WinformsMap (after its Refresh() is called of course) correctly according to its layer and extent, simply, they should be ready to be taken for screenshot. I plan to export that screenshots into a PDF file. To accomplish this, I plan to loop through each of those functions to take its screenshot.
Is there any way to capture (taking screenshot then save it into a file, or in memory temporary file) bitmap from LayerOverlay, or whatever it’s without showing the content first to either MapEngine or WinformsMap?
Thanks for the attention, I really appreciate it if someone can help me or give me an advice in this matter.