MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / ExportImage

Method ExportImage

Explore/CartogramNewView.cpp:1243–1263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1241}
1242
1243void 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}

Callers

nothing calls this directly

Calls 4

GetPrintLayerMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45
GetProjectTitleMethod · 0.45

Tested by

no test coverage detected