| 1241 | } |
| 1242 | |
| 1243 | void CartogramNewFrame::ExportImage(TemplateCanvas* canvas, const wxString& type) |
| 1244 | { |
| 1245 | wxLogMessage("Entering CartogramNewFrame::ExportImage"); |
| 1246 | |
| 1247 | // main map |
| 1248 | wxBitmap* main_map = template_canvas->GetPrintLayer(); |
| 1249 | int map_width = main_map->GetWidth(); |
| 1250 | int map_height = main_map->GetHeight(); |
| 1251 | |
| 1252 | // try to keep maplayout dialog fixed size |
| 1253 | int dlg_width = 900; |
| 1254 | int dlg_height = dlg_width * map_height / (double)map_width + 160; |
| 1255 | |
| 1256 | CanvasLayoutDialog ml_dlg(project->GetProjectTitle(), |
| 1257 | template_legend, template_canvas, |
| 1258 | _("Canvas Layout Preview"), |
| 1259 | wxDefaultPosition, |
| 1260 | wxSize(dlg_width, dlg_height) ); |
| 1261 | |
| 1262 | ml_dlg.ShowModal(); |
| 1263 | } |
nothing calls this directly
no test coverage detected