Merge pull request #64 from gergelypolonkai/retrograde-mark

Mark retrograde planets on the chart
This commit is contained in:
Gergely Polonkai 2014-08-27 00:00:04 +02:00
commit 75b738dda7
2 changed files with 18 additions and 0 deletions

View File

@ -1682,6 +1682,16 @@ ag_chart_create_svg(AgChart *chart, gsize *length, GError **err)
xmlNewProp(node, BAD_CAST "degree", BAD_CAST value);
g_free(value);
xmlNewProp(
node,
BAD_CAST "retrograde",
BAD_CAST (
gswe_planet_data_get_retrograde(planet_data)
? "True"
: "False"
)
);
value = g_strdup_printf("%d", dist);
xmlNewProp(node, BAD_CAST "dist", BAD_CAST value);
g_free(value);

View File

@ -569,6 +569,14 @@
<xsl:attribute name="xlink:href"><xsl:value-of select="concat('#', $planet_base, '_tmpl')"/></xsl:attribute>
<xsl:attribute name="transform"><xsl:value-of select="concat('translate(', 330 + @dist * 35, ',-15) rotate(', @degree - $asc_rotate ,',15,15)')"/></xsl:attribute>
</use>
<xsl:choose>
<xsl:when test="@retrograde='True'">
<text>
<xsl:attribute name="transform"><xsl:value-of select="concat('translate(', 365 + @dist * 35, ',15) rotate(', @degree - $asc_rotate, ',-20,-20)')"/></xsl:attribute>
R
</text>
</xsl:when>
</xsl:choose>
</g>
<xsl:choose>
<xsl:when test="@name='GSWE_PLANET_MOON_NODE'">