void imgproc::dilate::run(GimpRunMode, gint32 /*imageId*/, gint32 drawableId) { boost::optional<Arguments> arguments = presentDialog(); if (!arguments) { return; } GimpDrawable* const drawable = gimp_drawable_get(drawableId); try { cv::Mat src = drawableToMat(drawable); cv::Mat dst; cv::dilate(src, dst, UNPACK_TUPLE(*arguments, 0, 4)); setMatToDrawable(dst, drawable); } catch (cv::Exception const& e) { messageDialog(e.what()); } catch (IncompatibleMat const& e) { messageDialog(e.what()); } gimp_displays_flush(); gimp_drawable_detach(drawable); }
void AndroidExporter::ShowProjectExportDialog(gd::Project& project) { #if !defined(GD_NO_WX_GUI) AndroidExportDialog dialog(nullptr); if (dialog.ShowModal() != wxID_OK) return; ExportWholeProject(project, dialog.GetExportPath()); wxMessageDialog messageDialog( nullptr, _("The project was exported to \"") + dialog.GetExportPath() + _("\".\nFollow the instructions on the wiki to know how to build the " "android package from the exported files."), _("Android export"), wxOK | wxCENTRE | wxHELP); #else gd::LogError( "BAD USE: Tried to call AndroidExporter::ShowProjectExportDialog with " "support for wxWidgets disabled!"); #endif }