Refactor ag_chart_export_jpg_to_file() as ag_chart_export_to_image()
It is capable of saving in any format (as long as GdkPixbuf supports it)
This commit is contained in:
parent
96221abec6
commit
52ff709e14
@ -1983,10 +1983,11 @@ ag_chart_get_pixbuf(AgChart *chart,
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
void
|
||||
ag_chart_export_jpg_to_file(AgChart *chart,
|
||||
static void
|
||||
ag_chart_export_to_image(AgChart *chart,
|
||||
GFile *file,
|
||||
AgDisplayTheme *theme,
|
||||
gchar *format,
|
||||
GError **err)
|
||||
{
|
||||
gchar *jpg;
|
||||
@ -2003,7 +2004,7 @@ ag_chart_export_jpg_to_file(AgChart *chart,
|
||||
pixbuf,
|
||||
&jpg,
|
||||
&jpg_length,
|
||||
"jpeg",
|
||||
format,
|
||||
err,
|
||||
NULL
|
||||
)) {
|
||||
@ -2029,6 +2030,15 @@ ag_chart_export_jpg_to_file(AgChart *chart,
|
||||
g_free(jpg);
|
||||
}
|
||||
|
||||
void
|
||||
ag_chart_export_jpg_to_file(AgChart *chart,
|
||||
GFile *file,
|
||||
AgDisplayTheme *theme,
|
||||
GError **err)
|
||||
{
|
||||
ag_chart_export_to_image(chart, file, theme, "jpeg", err);
|
||||
}
|
||||
|
||||
void
|
||||
ag_chart_set_note(AgChart *chart, const gchar *note)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user