diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-01-04 23:08:02 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2017-01-04 23:08:02 +0000 |
| commit | b6200950a88ac9b1bb7eee4fb7f86b01e323dbcc (patch) | |
| tree | 9b1840cc9bc11003a5444995c9d4ac69812c9d88 /src/ui | |
| parent | increased space for font-size. (diff) | |
| download | inkscape-b6200950a88ac9b1bb7eee4fb7f86b01e323dbcc.tar.gz inkscape-b6200950a88ac9b1bb7eee4fb7f86b01e323dbcc.zip | |
antialiasing options on export
(bzr r15391)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/export.cpp | 15 | ||||
| -rw-r--r-- | src/ui/dialog/export.h | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index 9bebde00f..1bb952de4 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -151,8 +151,10 @@ Export::Export (void) : zlib_compression(), pHYs_label(_("pHYs dpi")), pHYs_sb(pHYs_adj, 1.0, 2), + antialiasing_label(_("Antialiasing")), + antialiasing_cb(), hide_box(false, 5), - hide_export(_("Hide a_ll except selected"), _("In the exported image, hide all objects except those that are selected")), + hide_export(_("Hide all except selected"), _("In the exported image, hide all objects except those that are selected")), closeWhenDone(_("Close when complete"), _("Once the export completes, close this dialog")), button_box(false, 3), _prog(), @@ -340,6 +342,10 @@ Export::Export (void) : pHYs_sb.set_width_chars(7); pHYs_sb.set_tooltip_text( _("Will force-set the physical dpi for the png file. Set this to 72 if you're planning to work on your png with Photoshop") ); zlib_compression.set_hexpand(); + const char* const antialising_list[] = {"CAIRO_ANTIALIAS_NONE","CAIRO_ANTIALIAS_FAST","CAIRO_ANTIALIAS_GOOD (default)","CAIRO_ANTIALIAS_BEST"}; + for(int i=0; i<4; ++i) + antialiasing_cb.append(antialising_list[i]); + antialiasing_cb.set_active_text(antialising_list[2]); auto table = new Gtk::Grid(); gtk_container_add(GTK_CONTAINER(expander.gobj()), (GtkWidget*)(table->gobj())); table->attach(interlacing,0,0,1,1); @@ -349,6 +355,8 @@ Export::Export (void) : table->attach(zlib_compression,1,2,1,1); table->attach(pHYs_label,0,3,1,1); table->attach(pHYs_sb,1,3,1,1); + table->attach(antialiasing_label,0,4,1,1); + table->attach(antialiasing_cb,1,4,1,1); table->show(); /* Main dialog */ @@ -984,6 +992,7 @@ void Export::onExport () int bitdepths[] = {1,2,4,8,16,8,16,8,16,8,16}; int color_type = colortypes[bitdepth_cb.get_active_row_number()] ; int bit_depth = bitdepths[bitdepth_cb.get_active_row_number()] ; + int antialiasing = antialiasing_cb.get_active_row_number(); if (batch_export.get_active ()) { @@ -1052,7 +1061,7 @@ void Export::onExport () onProgressCallback, (void*)prog_dlg, TRUE, // overwrite without asking hide ? selected : x, - do_interlace, color_type, bit_depth, zlib + do_interlace, color_type, bit_depth, zlib, antialiasing )) { gchar * error = g_strdup_printf(_("Could not export to filename %s.\n"), safeFile); @@ -1145,7 +1154,7 @@ void Export::onExport () onProgressCallback, (void*)prog_dlg, FALSE, hide ? selected : x, - do_interlace, color_type, bit_depth, zlib + do_interlace, color_type, bit_depth, zlib, antialiasing ); if (status == EXPORT_ERROR) { gchar * safeFile = Inkscape::IO::sanitizeString(path.c_str()); diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h index f64d92341..1f8e87dbc 100644 --- a/src/ui/dialog/export.h +++ b/src/ui/dialog/export.h @@ -327,6 +327,8 @@ private: Gtk::Label pHYs_label; Glib::RefPtr<Gtk::Adjustment> pHYs_adj; Gtk::SpinButton pHYs_sb; + Gtk::Label antialiasing_label; + Gtk::ComboBoxText antialiasing_cb; /* Export Button widgets */ Gtk::HBox button_box; |
