diff --git a/src/ag-chart.c b/src/ag-chart.c index 60d1074..994d699 100644 --- a/src/ag-chart.c +++ b/src/ag-chart.c @@ -308,6 +308,33 @@ ag_chart_new_full(GsweTimestamp *timestamp, return chart; } +AgChart * +ag_chart_new_preview(GsweTimestamp *timestamp, + gdouble longitude, + gdouble latitude, + gdouble altitude, + GsweHouseSystem house_system) +{ + static const GswePlanet planets[] = { + GSWE_PLANET_SUN, + GSWE_PLANET_ASCENDANT, + GSWE_PLANET_MC + }; + static const gint planet_count = sizeof(planets) / sizeof(GswePlanet); + + AgChart *chart = ag_chart_new_generic( + timestamp, + longitude, + latitude, + altitude, + house_system + ); + + ag_chart_add_planets(chart, planets, planet_count); + + return chart; +} + void ag_chart_set_name(AgChart *chart, const gchar *name) { diff --git a/src/ag-chart.h b/src/ag-chart.h index 3d15273..a6c4dd0 100644 --- a/src/ag-chart.h +++ b/src/ag-chart.h @@ -79,6 +79,12 @@ AgChart *ag_chart_new_full(GsweTimestamp *timestamp, gdouble altitude, GsweHouseSystem house_system); +AgChart *ag_chart_new_preview(GsweTimestamp *timestamp, + gdouble longitude, + gdouble latitude, + gdouble altitude, + GsweHouseSystem house_system); + AgChart *ag_chart_load_from_agc(GFile *file, GError **err);