Commit Graph

67 Commits

Author SHA1 Message Date
Gergely Polonkai 8a4eb378e9 Add a theme parameter to the SVG/image generating functions
This is needed for image generation to include display themes.
Fixes #82
2014-09-21 23:05:07 +02:00
Gergely Polonkai 290d8c3f37 Add JPEG export support 2014-09-17 11:25:40 +02:00
Gergely Polonkai 7fe6a16401 Add a rendering parameter to ag_chart_create_svg()
Based upon this parameter a <rect> is included in the resulting SVG
document, providing a background color, and so is the chart CSS.
2014-09-17 11:25:40 +02:00
Gergely Polonkai 2cf75ede55 Add GDK-PixBuf and librsvg2 as a dependency
They are required for JPEG exporting
2014-09-17 11:25:40 +02:00
Gergely Polonkai 4549c9fab3 Refactor AgDb
Rename functions and type names so they are clearly related to charts.
This is required to implement display theme manipulation in the database.
2014-09-13 01:05:08 +02:00
Gergely Polonkai 4ecef146c2 Update chart XSL
• Move planet group (<g>) creation to a template
• Add planet-X class to all aspect and antiscia lines so they can be hidden
  later one by one
• Move houses to their separate group
• Chart base is now a separate group, as it was intended
• Move from value_name to value_nick. It's shorter and makes using the
  substring function obsolete
• Antiscion lines got their own class
• Move away from visibility to display attribute. visibility in SVG can
  can be overridden, thus switching between aspects and antiscia cannot
  be done if the future display themes tamper with the lines’ visibility
  style
2014-09-13 01:05:08 +02:00
Gergely Polonkai d2f0ab2bc6 Move used planets’ list to used_planets global array
This makes it easier to add new planets. A way should still be found to
automatically include related files in the default chart.
2014-09-13 01:05:08 +02:00
Gergely Polonkai 5c9f88326b Add CSS class to different aspects 2014-08-29 12:46:58 +02:00
Gergely Polonkai 1bdf0ee31b Add a "retrograde" attribute to <body> tags in the generated XML 2014-08-26 18:51:01 +02:00
Gergely Polonkai 3f14387018 Unify AgChart API, so ag_chart_get_*() that return strings are const 2014-08-26 13:19:17 +02:00
Gergely Polonkai 512897cfd3 Create a DEFAULT_ALTITUDE macro
It is set to 280.0, which is roughly the average altitude of dry land
2014-08-17 09:36:30 +02:00
Gergely Polonkai a44da21306 Refine dist value so icons (hopefully) don’t get too far from the chart 2014-08-12 00:06:44 +02:00
Gergely Polonkai 5d028b5e17 Add notification for property setters 2014-08-11 22:19:07 +02:00
Gergely Polonkai 6e736c9b87 Add AgChart::note property 2014-08-11 22:19:07 +02:00
Gergely Polonkai 88fb58a527 Import Placidus charts 2014-08-10 14:31:38 +02:00
Gergely Polonkai a30d19d1bb Generalize chart loading functions
* ag_app_import_chart() became ag_app_import_file(), and has the potential
  to load any file type
* ag_app_import_cb() so it can open multiple file types
* ag_chart_load_from_file() is now called ag_chart_load_from_agc()
2014-08-10 14:31:38 +02:00
Gergely Polonkai e3b109819e Merge branch 'master' into chart-db 2014-08-03 11:15:29 +02:00
Gergely Polonkai 803b0211dd Using g_clear_object() instead of g_object_unref() in ag_window_set_chart 2014-08-03 11:12:29 +02:00
Gergely Polonkai ab12922d8a Rework chart save procedure
* Fixed some design flows: AgDb should not know about the window
* AgChart now only creates an AgDbSave structure, saving is done through
  AgWindow
2014-08-02 01:37:11 +02:00
Gergely Polonkai 12e088b452 Add function ag_chart_save_to_db() to save the chart to the db 2014-07-31 21:23:23 +02:00
Gergely Polonkai 310caa9292 Add function ag_chart_new_from_db_save()
It constructs an AgChart from an AgDbSave struct
2014-07-31 01:00:22 +02:00
Gergely Polonkai cad657c1b1 Move AgChartPrivate to ag-chart.c completely 2014-07-19 10:46:41 +02:00
Gergely Polonkai bd277de1bc Add house system save functionality
This was missing from #37
2014-07-18 18:32:53 +02:00
Gergely Polonkai 427f915f62 Use enum nick instead of name in house system saving
This is easier to do, and the save file has that value already
2014-07-18 18:31:56 +02:00
Gergely Polonkai 74e8373dad Add missing g_free() call for house_system_enum_name in chart loading 2014-07-18 18:30:11 +02:00
Gergely Polonkai fa6a850331 Add house system loading to chart load code 2014-07-18 00:02:56 +02:00
Gergely Polonkai 4e5b649173 Code beautification in ag_chart_load_from_file() 2014-07-17 23:11:24 +02:00
Gergely Polonkai e745312ffe Remove err when checking for note in save file
Note is not required to be present in any save file. However,
get_by_xpath() sets err if it is not, which will never be checked for.
2014-07-17 23:11:24 +02:00
Gergely Polonkai 5671a751a9 Fix error messages in AgChart’s get_by_xpath() 2014-07-17 23:08:34 +02:00
Gergely Polonkai 2656df25cb Code beautification in `ag_chart_create_svg()` 2014-07-13 23:01:23 +02:00
Gergely Polonkai 69233be35e Add a dist attribute to XML <body> tags so planet icons won't collide 2014-07-13 22:44:15 +02:00
Gergely Polonkai a5d76beb23 Move the default xsl file to the resources 2014-07-11 15:03:54 +02:00
Gergely Polonkai 4144d6b4ff Remove CSS from the xsl file and the SVG generating code 2014-07-11 14:32:24 +02:00
Gergely Polonkai 9342ea63de Code beautification
Wrap long lines in all files
2014-07-11 10:33:04 +02:00
Gergely Polonkai 86e5438807 Add chart note support
It is saved under /chartinfo/note, and may be non-existant or an empty
tag.

Fixes #28
2014-07-09 00:38:04 +02:00
Gergely Polonkai 70d38a379d Add function ag_chart_get_planets() 2014-06-30 17:55:00 +02:00
Gergely Polonkai a6a5eff641 Add function ag_chart_add_planets() to add all known planets to the chart
This is required for a readable aspect table
2014-06-30 17:55:00 +02:00
Gergely Polonkai f744cb0150 Upgrade GLib dependency to 2.38 2014-06-30 14:12:27 +02:00
Gergely Polonkai 172518f472 Uncrustified sources 2014-06-27 21:11:17 +02:00
Gergely Polonkai c34ba055bc Add SVG export functionality 2014-06-27 17:15:57 +02:00
Gergely Polonkai f6e3f9e033 Change ag_chart_create_svg() to return the length of the SVG document
This is needed later for SVG export
2014-06-27 17:11:04 +02:00
Gergely Polonkai 306584ff70 Remove unnecessary gswe_planet_data_unref() calls
This introduced an ugly bug when changing from the Edit tab to Chart view
for the second time.
2014-03-30 09:32:49 +02:00
Gergely Polonkai f7e4c451b4 Make get_by_xpath() string return value a maybe-string 2013-10-05 03:23:38 +02:00
Gergely Polonkai 096111684e Updated for SWE-GLib 2.0 API 2013-10-04 00:16:55 +02:00
Gergely Polonkai ea3b038b57 Uncrustified sources
Also, added astrognome-uncrustify.cfg for later use
2013-09-21 18:37:27 +02:00
Gergely Polonkai 7fc700bf4e Made country and city values optional in save files
The <country> and <city> tags are still required, but may be empty
2013-09-21 15:50:16 +02:00
Gergely Polonkai 04b281c56b Added a required parameter to get_by_xpath() 2013-09-21 15:49:13 +02:00
Gergely Polonkai 616fc79d11 Made GVariant fetching code simpler 2013-09-21 15:47:48 +02:00
Gergely Polonkai 3fea7bf0a8 XSLT stylesheet is now loaded directly from file
Reading from memory kind of disabled XInclude possibility. Included
files must have been loaded one by one, which is a bit out of control.
2013-09-20 10:03:08 +02:00
Gergely Polonkai ffb00a00a0 Enabled XInclude for XSLT stylesheets 2013-09-20 09:58:31 +02:00