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:
if (text != "")
{
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),
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,
| | correspond to an angle in radians, which will | | |
| | determine where the text will be placed outside | | |
| | 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"`` |
+---------------+---------------------------------------------------+------------------------+----------------------------------+
......
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