Commit fee7b2c9 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Refined positioning of vertex text labels

parent 6b2f501a
...@@ -436,7 +436,7 @@ public: ...@@ -436,7 +436,7 @@ public:
if (text != "") if (text != "")
{ {
double text_pos = _attrs.template get<double>(VERTEX_TEXT_POSITION); double text_pos = _attrs.template get<double>(VERTEX_TEXT_POSITION);
if (text_pos < 0) if (text_pos == -1)
{ {
cr.select_font_face(_attrs.template get<string>(VERTEX_FONT_FAMILY), cr.select_font_face(_attrs.template get<string>(VERTEX_FONT_FAMILY),
static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(VERTEX_FONT_SLANT)), static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(VERTEX_FONT_SLANT)),
......
...@@ -550,7 +550,9 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None, ...@@ -550,7 +550,9 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None,
| | correspond to an angle in radians, which will | | | | | correspond to an angle in radians, which will | | |
| | determine where the text will be placed outside | | | | | determine where the text will be placed outside | | |
| | the vertex. If the value is negative, the text | | | | | the vertex. If the value is negative, the text | | |
| | will be placed inside the vertex. | | | | | will be placed inside the vertex. If the value is | | |
| | ``-1``, the vertex size will be automatically | | |
| | increased to accommodate the text. | | |
+---------------+---------------------------------------------------+------------------------+----------------------------------+ +---------------+---------------------------------------------------+------------------------+----------------------------------+
| font_family | Font family used to draw the text. | ``str`` | ``"serif"`` | | font_family | Font family used to draw the text. | ``str`` | ``"serif"`` |
+---------------+---------------------------------------------------+------------------------+----------------------------------+ +---------------+---------------------------------------------------+------------------------+----------------------------------+
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment